Skip to content

Batch Parameters

Batch parameters control the execution behavior of a batch chain.

A batch chain is a series of several linked complex operations, which are executed sequentially on multiple records (as selected from list views) at the same time.

Common parameters

Common batch chain parameters that can be used with various batch chains include:

Parameter Possible Values Description
Interval x(d|w|m) Specifies the period to be considered by the business process (invoice run, export, etc.), where x is an integer, d=day, w=week, m=month.
Defaults to 1m.
x-y x and y are positive integers (1 .. 31), where x-y specifies a day range for a month. If x>y, then x is considered a day of the previous month.
Alignment previous, current or next Used to describe the Interval position relative to the execution time.
Interval = 1m and Alignment = next means that the considered period is the next month.
Interval = -3m (negative value) and Alignment = current means that the considered period is the current and the last two months.
Interval = 1w and Alignment = previous means that the considered period is the previous week.
If not set, defaults to previous.
ShiftDays x Optional. Usually, the time period calculation is based on the current date. This integer specifies a number of days by which the "anchor date" is to be moved backward or forward.
StartOfWeek 1 .. 7 Optional. Specifies the start day of the week, with 1 = Monday ... 7 = Sunday. Defaults to 1 if left empty.

You can define multiple batch parameters settings:

  1. In Setup, open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Batch Parameters.

  3. Click New.
  4. Specify the details as required.

    • Name: Must match the Job Name to be set when scheduling the job
    • Batch Chain: The name of the batch chain to be executed as listed in Scheduling Concepts
    • Parameter 1..8: Define batch chain-specific execution options using the syntax

      <parameter> = <value>

  5. Click Save.

Info

The InvoiceRunChain and TransactionBuilderChain require parameters.

InvoiceRunChain parameters example
Field Value Description
Name ir_schedule_1 Must match the Job Name to be set when scheduling the job
Batch Chain InvoiceRunChain
Parameter 1 Interval = 2w Sets the invoice run period to two weeks
Parameter 2 InvoiceDate = end-1 Sets the invoice date to the penultimate day of the invoice run period
Parameter 3 InvoiceRunFilter = MySubscriptions Sets the invoice run filter to MySubscriptions, which must be defined in Filters
Parameter 4 TransactionFilters = Cases,Orders Sets the transaction filters to Cases and Orders, which must be defined in Filters
TransactionBuilderChain parameters example
Field Value Description
Name buildtransactions Must match the Job Name to be set when scheduling the job
Batch Chain TransactionBuilderChain
Parameter 1 transactionfilter = transactions1 Specifies the transaction filter to be used