---
isPublished: true
knowledgeIndex: false
hidden: true
noindex: true
template: "page.peb"
title: "Document Item Merge Action Flow Action"
description: "Request document generation for one template Item in an existing Room."
contentType: "reference"
audience: "admin,developer"
---

# Document Item Merge Action

Request document generation for one template Item in an existing Room.
The namespaced Apex action name is `rooms__DocumentItemMergeAction`.
Check action availability and input fields in your installed package.

## Transaction summary

| Effect | Behavior |
| --- | --- |
| API callout | No immediate API callout. Generation is queued after merge-data preparation. |
| Record writes | Merge-field error handling can create DialogueOne Event records in the calling Flow transaction. Generated documents and Item state are updated later. |
| Queued work | Yes, when the Item is a valid template and merge preparation succeeds. |
| Email | No email is sent. |

The Item must be a document template with valid File and merge settings.
The immediate Success output does not confirm generation. It can also remain true when merge preparation rejects the Item.
Inspect the Item and Events before continuing. Attach to Record is retained and does not control current merge behavior.

## Inputs

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

| API name | Flow label | Required | Default or guidance |
| --- | --- | --- | --- |
| `itemId` | Document Room Item ID | Yes | Existing template Room Item ID. |
| `recordId` | Record ID | Yes | The source record to merge with the Item template. |
| `attachToRecord` | Attach to Record | No | Retained compatibility input. It does not change current merge attachment behavior. |

## Outputs

| API name | Flow label | Meaning |
| --- | --- | --- |
| `success` | Success | Immediate wrapper result. It does not prove merge acceptance or completion. |
| `message` | Message | Wrapper-level details when supplied. Inspect Item status and Events for generation failures. |

## Configure the Flow

1. Select the template Room Item and source record.
2. Submit the action and connect its Fault path.
3. Verify the generated Item document separately before delivery.

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

**Success is true but no document appears.** Check whether the Item is a template and whether its File and merge data are valid. Do not rely on Success alone.

**A merge-field error appears.** Correct the template field reference before retrying. Error logging can also leave pending work.

**A later callout fails.** Generation preparation can log an Event or queue work. Review the transaction boundary.

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