Declarative Batch - User Documentation

Version 2.0 -Salesforce AppExchange – June 3, 2026

Setup

User Setup

Permission Sets

Declarative Batch Admin

Provides access to the Declarative Batch app and all batches in the org.

Declarative Batch User

Provides access to the Declarative Batch app and all batches the user has record access to.

Declarative Batch Read Only

Provides access to the Declarative Batch app and read only access to all batches the user has record access to.

User Interface Setup

Apps

Declarative Batch App

The declarative batch app contains the Batch record page, where batches can be configured, connected to flows, executed, and scheduled. Access to this app is provided in all Declarative Batch permission sets.

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.

Batch Execution

Immediate Execution

Execute Action

From the Declarative Batch record page, click Execute to immediately execute the batch. A preview of records that will be processed will be displayed. However, this preview does not contain all records, just 10example records. After the preview, a final confirmation is displayed before the batch is executed.

Scheduled Batches

Schedule Action

From the Declarative Batch record page, click Schedule to schedule the batch.

One Time

Schedules a batch to run once at the date and time specified.

Hourly

Schedules a batch to run hourly a set number of minutes into each hour. This value must be between 0 and 59 inclusive.

Daily/Weekly

Schedules a batch to run on a specified date of the week, every week, at a specified time. To run a batch daily, select all days. To run a batch weekly, select one day.

Monthly Day Of Week

Schedules a batch to run in a specific week of the month, on a day of the week, at a specified time. For example, run a batch on the first Monday of every month. The week of the month supports the first through fourth weeks of the month.

Monthly Day Of Month

Schedules a batch to run monthly on the same day of the month at a specified time. For example, run a batch on the first day of every month.

 

Note: When a batch is configured to run on a day of the month that does not exist in every month, the batch will not run in months without that many days. For example, a batch configured to run on the31st day of the month starting March 31st will not run in April. The workaround is to check the Last Day Of Month box to run the batch on the last day of every month.

Yearly

Schedules a batch to run on a specified day, in a specified month, at a specified time. For example, run a batch on April 15every year.

Custom Cron

Enter a cron expression. This is to schedule a batch to run on an interval not yet supported by the Declarative Batch scheduling wizard. See below for a tool to create a cron expression.

http://www.cronmaker.com

Unschedule Action

From the Declarative Batch record page, click Scheduled Jobs to view the batch schedule. Select the schedule(s) you would like to unschedule, and click Unschedule.

Additional Considerations

  1. It is highly recommended that the out of the box Salesforce lightning record pages included in this package are used and unchanged.
  2. Batches must be scheduled and unscheduled with the actions on the Batch record page, instead of from Scheduled Jobs in Salesforce Setup.
  3. If filters outside of the provided options are required, then create automation, such as a Salesforce Flow, to set a field on the record being processed in the batch and filter by that field using a Filter.
  4. The picklist values on Declarative Batch object fields should remain unchanged.
  5. To suggest additional features, contact support@powerblocksapps.com.

© 2026 Powerblocks LLC