Batch Configuration

Flow Configuration

From Template

1.    Navigate to Salesforce Setup
2.    Navigate to Flows
3.    In the list of flows, click Declarative Batch Template
4.    Click Save As
5.    Select New Flow
6.    In the Get Records elementof the new flow, select the object that the batch will run on
7.    The flow must be activated before it is selectable in the Declarative Batch app

Without Template

1. Navigate to Salesforce Setup
2. Navigate to Flows
3. Click New Flow
4. Select Autolaunched Flow as the type
5. Create a variable named recordIds
    a.     Select Text for Data Type
    b.     Check Allow multiple variables (collection)
    c.     Check Available for input
6. Use the recordIds variable to retrieve records to process in the flow with a Get Records flow element.
7. The flow must be activated before it is selectable in the Declarative Batch app.

Batch Setup

Configure Batch

Object Name

The API name of the SObject the batch will run on. You can find this in Setup > Object Manager > search for the object by its label.

Batch Name

The unique batch name of this Declarative Batch.

Flow To Process In Batch

The flow that is run in the Declarative Batch. For a flow to be selectable, it must:

·      Be Active

·      Have a package state of Unmanaged

·      Be an Autolaunched Flow

·      NOT be a Template

·      Contain a text collection variable named recordIds, with Available As Input selected

 

Additionally, the user creating the Declarative Batch must have access to flows.

Flow To Run On Batch Completion

The flow that is run in the Declarative Batch. For a flow to be selectable, it must:

·      Be Active

·      Have a package state of Unmanaged

·      Be an Autolaunched Flow

·      NOT be a Template

 

Additionally, the user creating the Declarative Batch must have access to flows.

Batch Size

The number of records processed in each batch execution. For example, if your batch size is 1000, and there are 5000 records to process, there will be 5 batch executions, so each record is processed. Lower this value if encountering performance issues in your flow. This setting is for complex flows that error out processing a larger number of records in one run.

Limit Record Count

The maximum number of records processed in the batch. This applies to all batch iterations total. For example, if your batch size is 200, there are 500 records meeting the criteria of your batch, and the Limit Record Count is 300, then 300 records will be processed across two iterations of the batch job.

Filter Settings

To create a filter, click New Filter. A filter will narrow down which records are processed when the batch runs.

Filter Type

The type of value that can be entered into the filter value field, such as a constant, custom setting, or date function.

Constant

Filter on a fixed, static value.

Custom Setting

Filter on a value defined in a custom setting field.

Date Function

Uses Salesforce supported date literals to filter based on a relative date or date range.

Related Object

Filter based on child records. For example, filter the batch to run on accounts that have an open case or filter the batch to run on orders with a specific type of order item.

Filter Logic

Determines if records are selected based on if all filters apply to the record, any filter applies to the record, or on custom logic defined in Filter Custom Logic.

All Conditions Apply

Records are only processed by the batch if all filter criteria are met.

Any Conditions Apply

Records are processed by the batch if any one filter criteria is met.

Custom Logic

Records are processed based on custom logic provided by the user in Filter Custom Logic.

Filter Custom Logic

Custom logic is applied in the same style as many Salesforce out of the box features, for example “1 AND (2 OR 3)”. The Custom Logic Tag number field on filters is automatically set when the Filter Logic is set to Custom Logic, so the tags can be used in the Filter Custom Logic. Not all logic tags on filters must be used, although not using a custom logic tag from the filter will render the filter inactive. Custom logic tags used in this field must exist on a filter, otherwise the batch may encounter an error.

© 2026 Powerblocks LLC