---
isPublished: true
knowledgeIndex: false
hidden: true
noindex: true
template: "page.peb"
title: "Add Room Item Action Flow Action"
description: "Add a Salesforce File version to a Room and return the created Item."
contentType: "reference"
audience: "admin,developer"
---

# Add Room Item Action

Add a Salesforce File version to a Room and return the created Item.
The namespaced Apex action name is `rooms__RoomItemAction`.
Check action availability and input fields in your installed package.

## Transaction summary

| Effect | Behavior |
| --- | --- |
| API callout | No immediate API callout. File and Room synchronization are queued after Item creation. |
| Record writes | Inserts Room Item records and can update Room status. Preparation errors can create DialogueOne Event records. |
| Queued work | Yes. Room and File synchronization occur after the immediate action result. |
| Email | No email is sent. |

Supply Room ID and a Content Version ID or Content Document ID. These are required for processing although the inputs are marked optional.
Content Version ID takes precedence. With Content Document ID, the latest published version is selected.
Adding a template File does not confirm that its merged document has been generated.

## Inputs

**Required** describes the Flow input setting. The processing rules above also apply.

| API name | Flow label | Required | Default or guidance |
| --- | --- | --- | --- |
| `recordId` | Record ID | No | Compatibility input. The action uses the selected Room and File; this does not request document merge. |
| `roomId` | Room ID | No | Required for processing. Existing Room ID. |
| `contentDocumentID` | Content Document ID | No | Salesforce File ID (`069`). Selects its latest published version if Content Version ID is blank. |
| `contentVersionID` | Content Version ID | No | Exact Salesforce File version ID (`068`). Takes precedence over Content Document ID. |

## Outputs

| API name | Flow label | Meaning |
| --- | --- | --- |
| `Success` | Success | Whether Item preparation reported success. It does not confirm queued synchronization. |
| `Message` | Message | Preparation or save error details. |
| `roomId` | Room ID | The selected Room ID. |
| `itemID` | Item ID | The inserted Room Item ID when available. |
| `contentVersionId` | Content Version ID | The selected File version ID. |
| `item` | Room Item Record | The inserted Room Item record. Verify its Room and File references. |

## Configure the Flow

1. Select the existing Room and File reference.
2. Store Success, Message, Item ID and the returned Item record.
3. Check that the Item belongs to the intended Room and verify later File synchronization.

Review the Flow context, Apex action access and the object and field permissions needed by this operation.
Record writes can run other Salesforce automation.
For API work, also review the configured Salesforce API connection user's required access.

## Troubleshooting

**No Item is created.** Supply Room ID and a valid accessible File reference. Check Item create access and Fault details.

**The Item is visible but document work is incomplete.** The action queues synchronization. Confirm the File is ready before delivery.

**An unsuccessful result follows partial preparation.** Inspect the Room, returned Item and Events before adding the File again.

See the [Flow action index](/content/build/flows/index.md) for transaction guidance and related actions.
