---
isPublished: true
knowledgeIndex: false
hidden: true
noindex: true
template: "page.peb"
title: "AI Dialogue Chat Action Flow Reference"
description: "Inputs, outputs, transaction effects and troubleshooting for AI Dialogue Chat Action in Salesforce Flow."
contentType: "reference"
audience: "admin,developer"
---

# AI Dialogue Chat Action

Send or continue a message in an DialogueOne dialogue.
The namespaced Apex action name is `rooms__AIDialogueAction`.

## Transaction summary

| Effect | Behavior |
| --- | --- |
| API callout | Yes. The action waits for an API response or a pending-work result. |
| Record writes | An error can create an DialogueOne Event record. Enabled agent tools can also change Salesforce records. |
| Background work | Background and file-preparation requests can continue after the immediate response. |
| Platform event | The action does not directly publish a platform event. |
| Email | The action does not directly send email. An enabled agent tool can send email when the workflow allows it. |

Prefer [Run Agent Action](/content/build/flows/RunAgentAction.md) for a standard agent-start Flow. Use this action when the Flow must handle dialogue and polling results directly.

A pending result is not completed work. When Continue Polling is `true`, preserve Dialogue ID and Request ID. A later polling request must reuse that Request ID. Do not submit the user message again as a new request.

For ordinary Background requests, the immediate result is a compatibility acknowledgement. It is not proof that the agent completed. File-preparation requests require a usable acknowledgement. Preserve the returned identifiers and verify the eventual business result.

## Inputs

Required describes the Flow input setting. Additional conditions are stated in the guidance.

| API name | Flow label | Required | Default or guidance |
| --- | --- | --- | --- |
| `recordId` | Record ID | No | The source record context. |
| `contentVersionId` | Content Version ID | No | An exact primary Salesforce File version. |
| `contentDocumentId` | Content Document ID | No | The Salesforce File record. |
| `processFileBeforeRunning` | Process File Before Running Agent | No | Blank behaves as disabled. File preparation requires Background context. |
| `systemMessage` | System Message | No | Optional system instruction. |
| `userMessage` | User Message | No | The user message for a new request. |
| `dialogueId` | Dialogue ID | No | Leave blank for a new dialogue. Reuse the dialogue identifier to continue. |
| `runContext` | Run Context (default=Chat) | No | Defaults to `Chat`. Use the configured Chat or Background context. |
| `requestId` | Request ID | No | Reuse the returned Request ID for polling. |
| `polling` | Polling | No | Defaults to `false`. Set `true` only for a polling request. |
| `roomId` | Room ID | No | Optional Room context. |
| `memberId` | Member ID | No | Optional Room Member context. |
| `modelId` | AI Agent ID | No | The configured AI Agent record ID. |
| `model` | Model Name (to override AI Agent model) | No | Optional supported model name override. |
| `reasoningEffort` | Reasoning Effort (minimal, low, medium, high) | No | Optional reasoning setting supported by the selected model. |
| `verbosity` | Reasoning Effort (low,medium,high) | No | Response-verbosity setting. The Flow label repeats Reasoning Effort; map by API name. |
| `cacheTTL` | Cache TTL (Seconds) | No | Declared default: `60`. This field does not set a request cache duration. |
| `convertMarkdown` | Convert Markdown to HTML (default=True) | No | Defaults to `true`. Requests HTML conversion of Markdown output. |
| `temperature` | Temperature (0.0 to 1.0. Default=0.7) | No | Declared default: `0.7`. Model support determines whether it has an effect. |
| `maxTokens` | Max Tokens (Default=1000) | No | Defaults to `1000`. Requested response-size limit. |

## Outputs

| API name | Flow label | Meaning |
| --- | --- | --- |
| `success` | Success | Whether the action reported success. Check this value before continuing. |
| `message` | Error Message | Result details or an error. Read this value with Success. |
| `errorCode` | Error Code | A machine-readable error code when supplied. |
| `completion` | Completion (Results) | Response content or an immediate Background acknowledgement. |
| `dialogueId` | Dialogue ID | The dialogue identifier when available. |
| `totalTokens` | Total Tokens | Reported token usage. |
| `continuePolling` | Continue Polling | `true` means the request still needs a later status check. |
| `refreshWorkspace` | Refresh Workspace | Whether the response requests a workspace refresh. |
| `requestId` | Request ID | The request identifier to retain for a later polling request. |
| `pollingEndpoint` | Polling Endpoint | Returned status-location information. Preserve it with Request ID. |
| `status` | Status | Reported request status. Interpret it with Continue Polling and the execution mode. |
| `backgroundDialogueId` | Background Dialogue ID | Related Background dialogue identifier when supplied. |
| `backgroundResponseId` | Background Response ID | Related Background response identifier when supplied. |
| `parentDialogueId` | Parent Dialogue ID | Related parent dialogue identifier when supplied. |
| `parentForkResponseId` | Parent Fork Response ID | Related parent response identifier when supplied. |
| `runId` | Background Run ID | Related Background run identifier when supplied. |

## Configure the Flow

1. Select the AI Agent and the permitted record or File context.
2. Leave Dialogue ID blank for a new dialogue, or supply the existing dialogue identifier.
3. Set User Message and the intended Run Context.
4. For polling, reuse Request ID and set Polling to `true`.
5. Store Success, Error Message, Status, Continue Polling and returned identifiers.
6. Handle pending results separately from successful completion and failure.

Confirm the Flow user's action access and the required access to the referenced records.
Review the configured Salesforce API connection user's access when the action makes a callout.
Connect the action's Fault path.

## Troubleshooting

**You have uncommitted work pending.** Check earlier record writes, queued work and other actions in the same transaction.
Review the [transaction settings and debugger limits](/content/build/flows/index.md#resolve-uncommitted-work-pending).

**The action is still pending.** Check Continue Polling and Status. Preserve the returned identifiers. Do not create another dialogue to retry a pending request.

**File preparation fails.** Use Background context and an exact primary Content Version ID. Review DialogueOne Events.

**The response contains an error.** Keep Error Code and Error Message for diagnosis. A recorded error can itself create pending work before a later callout.

Confirm that the action and its fields exist in the installed package.
See the [Flow action index](/content/build/flows/index.md) for related actions and transaction guidance.
