Skip to main content

Automations Template Designer

A detailed overview of how to create multi-step automations using Courier's Automations Visual Designer.

What Are Automation Templates?

An automation template is a re-usable, pre-defined list of automation steps created in the Courier Automation Designer. Published templates are run or "invoked" using Courier's Automations API automations/{templateId}/invoke endpoint, or a Segment Event.

info

Edits you make to an automation template will not apply retroactively to any recipients or lists already added to an automation run.

How to Create an Automation Template

Creating a New Template

You can create automation templates from scratch by clicking. "Create Template" or by starting with one of the predefined templates for common use cases:

  1. Batch send
  2. Schedule a message
  3. Send a reminder
  4. Cancel an automation
Create an Automation Template

Adding Automation Steps

Automation steps are a set of discrete actions, which are used together to implement complex messaging workflows. The Automation Visual Designer lets you click to add automation steps, then drag and drop them to change and set the automation order.

automation template gif

Automation Designer Steps

Toggle Between the Visual Designer and Code View

If you want to view or edit the automation template you've built with the visual designer as code, you can enable it by toggling the code editor.

Toggle Between Editors

automation toggle gif

Automation Code Toggle

Visual Designer Step Details

There are eight automation steps that you can use to build your workflow - all of them can be added using the visual designer.

Send Step

Automation Send Step

Step Requirements:

  • Notification ID of the template you want to send.
  • Recipient ID for the recipient.

Optional Fields:

  • Brand ID
  • Data
  • Idempotency Key
  • Idempotency Expiry
  • Override
  • Profile
  • Condition (boolean)
  • Reference

Send List

A send-list step will deliver a message to a list of recipients previously created via the Courier Lists API. See the article Lists API & List ID Pattern guidelines for more information on creating and naming lists.

Automation Send List Step

Step Requirements:

  • Notification ID of the template you want to send.
  • Recipient ID for the recipient.

Optional Fields:

  • Brand ID
  • Data
  • Idempotency Key
  • Idempotency Expiry
  • Override
  • Profile
  • Condition (boolean)
  • Reference

Fetch Data

A fetch-data step will fetch data from an API resource and store it into run context to be used for subsequent step executions.

Automation Fetch Data Step

Step Requirements:

  • Webhook
  • Merge Strategy

Optional Fields:

  • Idempotency Key
  • Idempotency Expiry
  • Condition (boolean)
  • Reference

Update-Profile

An update-profile step will update the recipient's profile according to the "merge" strategy provided in the step.

Automation Update Profile

Required:

  • Profile Data
  • Recipient ID
  • Merge Strategy

Optional Fields:

  • Condition (boolean)
  • Reference

Delay

There are two ways to delay an automation step:

  • Until

  • Duration

    • Delay for a period of time - increments include minute(s), hour(s), week(s), month(s), and year(s).
Automation Delay Step

Required:

  • Duration or Until

Optional Fields:

  • Condition (boolean)
  • Reference

Cancel

Automations can be marked as cancelable by providing a cancelationToken. All automations with matching tokens will be canceled when that cancelationToken is called in a subsequent automation.

If you want to cancel a templated automation on a per-recipient basis, use Step Conditionals to specify the recipient ID along with the template's cancelationToken.

Automation Cancel Step

Required:

  • Cancelation token

Optional Fields:

  • Condition (boolean)
  • Reference

Subscribe to List

Subscribe to List Step

Step Requirements:

  • List ID: The list to be subscribed to
  • Recipient ID: The recipient being subscribed

Optional Fields:

  • Subscription
  • Condition (boolean)
  • Reference

Invoke

The invoke step allows you to execute another automation template.

Invoke Automation Step

Required:

  • Template (ID of the automation you want to invoke)

Optional:

  • Data
  • Condition
  • Reference

Field References

References can be used to access data from the request that was passed in.

In Text Fields

To use a reference in a text field, just type the path to the references. All references should start with refs

Field Reference

In JSON

To use a reference in JSON configuration, construct an object that has a single key $ref with a value that is a pointer to the field to reference.

JSON
"recipient": {
"$ref": "data.userId"
},

JSONNET Support

If you want to edit your automation in JSONNET:

  1. Toggle the code view on.
  2. Click on "Switch to JSONNET".
Can't Undo

Switching the template to the JSONNET editor cannot be undone.

Code Toggle
JSONNET Warning

Invoking an Automation Template With a Trigger

You can trigger an automation template via trigger types in the Automations Visual Designer.

Automation Triggers

Segment Trigger

Once you have fished setting up Courier's Segment Integration:

  1. Open the Automation you wish to trigger via Segment event
  2. Click to open the Start step
  3. Select the segment event type(s) you want to trigger this event.
caution

Track Event requires an exact name match.

If you select a Segment Track event trigger to invoke your template, you must provide an event name that is the exact match to the event's name in Segment.

Segment Trigger

Cron Job Schedule Trigger

If you want to trigger an Automation using a Cron Job Schedule, click the Scheduled Trigger button then provide the Cron Value.

Cron Job Trigger

Audience Event Trigger

You can trigger a send to a user when they Match or Unmatch the set of audience filters. Click Match or Unmatch then paste in the name of the audience.

Audience Trigger
Was this helpful?