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

# AI Batch Update Action

Start a batch that runs the configured Flow for each selected record, then saves returned records.
The namespaced Apex action name is `rooms__AIBatchUpdateRecords`.

**Reference status: Limited.** Review the supported behavior and limitations below.

## Transaction summary

| Effect | Behavior |
| --- | --- |
| API callout | The entry action does not make a direct API callout. The invoked processing Flow can make callouts later. |
| Record writes | The batch finish step updates returned records and creates DialogueOne Event records. The processing Flow can have additional effects. |
| Background work | Starts Batch Apex. Success reports job acceptance, not completed record updates. |
| Platform event | Publishes an AI batch-completion platform event after the finish step. |
| Email | The action does not send email. |

The selected AI Agent must define a query and an autolaunched processing Flow. That Flow accepts `recordId` and returns a record output named `record`. The batch collects those records for a later update.

Keep the processing Flow's callout sequence clear of earlier pending writes. The run can process at most 10,000 returned record updates in its finish step.

Run Async is an exposed compatibility control. This action starts Batch Apex regardless of its value.

## Inputs

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

| API name | Flow label | Required | Default or guidance |
| --- | --- | --- | --- |
| `modelId` | Model ID | No | The AI Agent record that defines the query and processing Flow. Required for a usable request. |
| `batchSize` | Batch Size (50 for real-time update. Async=1,000 max) | No | Defaults to `50`. Select a size that fits the processing Flow's callout and governor limits. |
| `sleepSeconds` | Sleep Delay (For use in optimizing batch runs. Default=0) | No | Declared default: `0`. Do not rely on this input to schedule or delay processing. |
| `runAsync` | Run Async (Default=false. If true, results may take up to 24 hours to process.) | No | Declared default: `false`. The action starts Batch Apex regardless of this value. |

## Outputs

| API name | Flow label | Meaning |
| --- | --- | --- |
| `success` | Success | Whether the batch-start request was accepted. It does not confirm finished updates. |
| `message` | Error Message | Validation details or the accepted batch job ID. |

## Configure the Flow

1. Configure the AI Agent's record query and processing Flow developer name.
2. Confirm that the processing Flow returns the intended `record` value.
3. Set Model ID and an appropriate Batch Size.
4. Store Success and Error Message. Retain the job ID reported in the message.
5. Inspect the batch job, events and changed records after completion.

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).

**No job starts.** Check Model ID, the configured query and the processing Flow.

**The processing Flow returns no record.** Define the `record` output. Check events before starting another batch.

**The batch was accepted but records are unchanged.** Check the batch job and its finish result; immediate Success does not confirm completion.

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.
