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

# Batch AI Vectorize Records Action

Start a batch search-index update for Salesforce records or library Files.
The namespaced Apex action name is `rooms__BatchAIVectorService`.

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

## Transaction summary

| Effect | Behavior |
| --- | --- |
| API callout | The entry action queues work. The batch makes API callouts later. |
| Record writes | The batch can create DialogueOne Event records for processing errors. It requests search-index changes. |
| Background work | Starts Batch Apex and returns a Batch ID. |
| Platform event | The action does not directly publish a platform event. |
| Email | The action does not send email. |

Select one processing mode and supply a nonblank Query. Keep queries bounded to records or Files that the workflow is permitted to index.

Record ID alone does not define job scope. Put the intended record restriction in Query. For library File processing, supply Library Workspace ID and a nonblank Query; the selected workspace determines the library scope. File mode without a workspace is not a complete library-file workflow.

Batch Size is exposed with a declared default of `10`, but this Flow action does not apply that value. Do not rely on it to control batch chunk size.

## Inputs

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

| API name | Flow label | Required | Default or guidance |
| --- | --- | --- | --- |
| `View` | AI VectorSpace | No | The destination AI VectorSpace name. |
| `WorkspaceID` | (Files) Library Workspace ID (Vectorize entire library) | No | The library workspace for File mode. A nonblank Query is also required. |
| `RecordId` | Record ID | No | Retained input. Does not restrict the query by itself. |
| `VectorizeRecords` | Vectorize Records | No | Defaults to `false`. Select record processing. |
| `VectorizeFiles` | Vectorize Files | No | Defaults to `false`. Select library File processing. |
| `ObjectType` | (Records) SObject Type | No | The full SObject API name for record mode. |
| `Query` | Query | No | Required for a usable job, including library File mode. In record mode, include `Id` and the required fields. Do not select File VersionData. |
| `BatchSize` | Batch Size (Default=10) | No | Declared default: `10`. This Flow action does not apply the value. |

## Outputs

| API name | Flow label | Meaning |
| --- | --- | --- |
| `success` | Success | Whether the batch-start request was accepted. It does not confirm indexing completion. |
| `message` | Message | Result details or an error. Read this value with Success. |
| `batchID` | Batch ID | The Salesforce batch job ID to inspect after submission. |

## Configure the Flow

1. Set the AI VectorSpace and select record or File processing.
2. Supply a nonblank Query. In record mode, set SObject Type and include `Id` plus the intended data fields.
3. For library Files, supply Library Workspace ID and confirm the whole selected library is intended.
4. Store Success, Message and Batch ID.
5. Check the batch job and DialogueOne Events, then verify representative search results.

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 job starts but processing fails.** Check the selected mode and query fields, including record IDs. Inspect the Batch ID and events.

**Changing Batch Size has no effect.** This action does not apply that input.

**A File batch stops after an error.** An error can create an Event record before another File callout. Inspect the error and completed results before retrying.

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.
