Skip to main content
Ad hoc automations let you define workflows in a single API request without a saved template. Each step has an action field that specifies its type.
For visual designer documentation, see Batching, Digests, Throttle, and Control Flow.

Add to Batch

Add the data object to a batch. Steps after “add-to-batch” are not executed until the batch conditions are met and released. Subsequent steps are invoked only once per batch run.

Fields

Schema

Overriding Batches In Flight

When making a batch call, you can make changes to the batching settings to a batching automation mid-flight. Retain Settings Users can initially set the retain parameters when invoking a batch for the first time and make changes to the retain.count on subsequent calls. The automation batch will be overwritten with the new retention policy. For example, if you send a batch to retain the first 10 items, and then edit the automation to retain the first 20, the batch will not release until the first 20 are retained while it’s less than the max_items parameter. Send Step Send steps cannot be overwritten mid-flight in a batch. The first send step method introduced in the batch will run before the overwritten one takes place.

Cancel

Cancel an Automation Run that is In Progress.

Fields

Schema

Delay

Wait a duration of time, before proceeding to the next Automation Step.

Fields

Either until or duration is required.

Schema

Fetch Data

Fetch data via https and write the response to the data property of the Automation Run Cache.

Fields

The merge_strategy property can be any of the following values:
  • replace
    • overwrite all properties in the Automation Cache with the http response. Removes all properties in the Automation Cache that do not exist in the http response.
  • soft-merge
    • only overwrite properties in the Automation Cache with the http response properties that do not yet exist in the Automation Cache.
  • overwrite
    • overwrite all properties in the Automation Cache with the properties from the http response.
  • none
    • do not make any changes to the Automation Cache if the Automation Cache already exists and has data. Otherwise initialize the Automation Cache.
The webhook can be configured with any of the following properties:

Schema

GET Profile

Bring a profile stored with Courier into scope. See GET Profile for usage details.

Fields

Schema

Invoke

Invoke another Automation Template

Fields

Schema

Send (Legacy)

Send a Notification Template

Fields

Schema

Send

Send a Notification Template

Fields

Schema

Send List

Send a message to each recipient in the list. Optionally fetch data for each recipient via http and merge the response into the data property of the Automation Run Cache.

Fields

The merge_strategy property of the steps data_source object, can be any of the following values:
  • replace
    • overwrite all properties in the Automation Cache with the http response. Removes all properties in the Automation Cache that do not exist in the http response.
  • soft-merge
    • only overwrite properties in the Automation Cache with the http response properties that do not yet exist in the Automation Cache.
  • overwrite
    • overwrite all properties in the Automation Cache with the properties from the http response.
  • none
    • do not make any changes to the Automation Cache if the Automation Cache already exists and has data. Otherwise initialize the Automation Cache.
The webhook property of the steps data_source object, can be configured with any of the following properties:

Schema

Update Profile

Update the Courier Profile given a recipientId.

Fields

The merge property can be any of the following values:
  • replace
    • overwrite all properties in the recipient profile with the http response. Removes all properties in the recipient profile that do not exist in the http response.
  • soft-merge
    • only overwrite properties in the recipient profile with the http response properties that do not yet exist in the recipient profile.
  • overwrite
    • overwrite all properties in the recipient profile with the properties from the http response.
  • none
    • do not make any changes to the recipient profile if the recipient profile already exists and has data. Otherwise initialize the recipient profile
Profile Merging: When using update-profile steps, be mindful with the aforementioned merge strategies that can update an existing profile that was created with a Segment Identify event.

Schema

Subscribe

Subscribe a user to a Courier List.

Fields

Schema