> For the complete documentation index, see [llms.txt](https://doc.batch.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.batch.com/getting-started/how-to-send-a-trigger-automation.md).

# Create your first trigger automation

**Trigger automations** allow you to respond to **user actions or events in real time** with personalized messages. They’re ideal for onboarding sequences, re-engagement flows, or any scenario where timing matters. This guide will walk you through setting up your first trigger automation in Batch, covering **targeting, scheduling, and message composition**. Let’s get started! 🚀

{% hint style="info" %}
The ‘Automations’ tab is dedicated to ‘automated’ campaigns such as **Recurring** and **Trigger.**
{% endhint %}

Here is a short guide to help create your first omnichannel trigger automation on Batch following the 4 steps of the automation builder:

1. **Set up entrance**: which event triggers the campaign, its lifetime, its target, etc;
2. **Manage the first delay and cancellation events**: when to send the email and which event can cancel it;
3. **Compose your message**: the content of the campaign that will be sent to the user;
4. **Add a second message** sent after a delay.

First, go to Automations > New automation, start a new Omnichannel trigger, and name it:

<figure><img src="/files/aHlIiMaaZ6HMhRnROE0x" alt=""><figcaption></figcaption></figure>

**Optional:** you can add [labels](https://doc.batch.com/getting-started/features/customer-engagement-platform/settings/labels) to your automation (up to 5):

<figure><img src="/files/foHJWmXj0ntVYr7kn8Ac" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
[Labels](https://doc.batch.com/getting-started/features/customer-engagement-platform/settings/labels) serve two main purposes: they allow you to set a marketing pressure limit across all campaigns/automations sharing the same label, and they enable you to filter campaigns/automations based on their assigned labels.
{% endhint %}

Then, let's set up your trigger automation! 💪

## Automation Settings <a href="#h_7e8a7b9160" id="h_7e8a7b9160"></a>

It is time to define when to send your automation and who to send it to!

### 1. Entry

First, you need to choose your trigger type. You have the choice between two:&#x20;

* **Event**: the triggering of a **custom or native event**

By clicking on the Event frame a new modal opens. There, you will be able to choose the right trigger event and add filters on it if needed.

{% hint style="info" %}
2 native trigger events are available: **Subscribed to mobile push notifications** (iOS/Android) and **Subscribed to web push notifications.** For more informations on there use, check [our article detailing the feature](https://doc.batch.com/getting-started/features/customer-engagement-platform/orchestration/trigger-automations#entering-and-exiting-the-scenario)!
{% endhint %}

💡 Let's take the example of a cart abandonment scenario! The idea is to bring in all users who have reported the “added\_to\_cart” event with a value of 50 euros or more:

<figure><img src="/files/D9IFAEHkooSzW49bt2cy" alt=""><figcaption></figcaption></figure>

* **Parallel automations**&#x20;

By default, if the user fires the trigger event of the automation multiple times, it will be **reset**.

You may want to parallelize automation flows and allow the user to trigger several times the same automation. You can do that by activating the Parallel automations mode.

The [**Parallel** **automations**](https://doc.batch.com/getting-started/features/customer-engagement-platform/22-cep-orchestration/05-trigger-automations#:~:text=Enable%20Parallel%20Automations,into%20the%20Automation.) mode allows you to trigger an automation each time the user fires the trigger event with a new event parameter (Ex: Trigger an email for each trip booked by the user based on the trip ID parameter). This ID must be one of the attributes attached to the event or the event label and can only be a String.

<figure><img src="/files/OSlv7EYmSNAKGsRxzdWz" alt="" width="375"><figcaption></figcaption></figure>

* **Attribute change**: a change in the value of a **custom** **profile attribute**

By clicking on the Attribute Change frame a new modal opens. There, you will be able to choose the right attribute and set the old attribute value (optional) and the new attribute value (mandatory).

💡 Let's take the example of a loyalty status change scenario! The idea is to bring in all users who have went from “silver” to "gold" in their loyalty\_status attribute:

<figure><img src="/files/RxolEh2y4e1vXdB5loLU" alt=""><figcaption></figcaption></figure>

Once you're ready, click Continue to Targeting to move on to the next step of your automation setup!

### 2. Targeting

You can access the targeting settings either by clicking on the **Continue to targeting** button or on **Add targeting** in the automation builder right under the trigger you chose.

There, you will be able to select the type of your communications: Marketing or Transactional.&#x20;

By default, Batch considers that you will target your entire audience. First, you can add one or more countries and/or languages.

Then you can refine your segmentation by clicking:

* '**Add** **Condition**': from then on, you will be able to select native targeting elements (Email domain, etc.), but also profile attributes (data specific to your app business and selected thanks to the tagging plan).
* '**Use** **Segment**': this will allow you to call [Segments](https://doc.batch.com/getting-started/features/customer-engagement-platform/profiles/segments) as blocks in the targeting and combine segments (*inclusions and/or exclusions*) by calling up to 10 segments in your targeting. When a segment is linked to an orchestration, you can access / view the segment by clicking on the eye icon 👀
* '**Use** **Audience**': you can add a specific [Audience](https://doc.batch.com/getting-started/features/mobile-engagement-platform/analytics/audience) to your email (*find how to create a Custom Audience* [*here*](https://help.batch.com/en/articles/3539787-how-can-i-send-a-test-to-several-devices-at-once)).

<figure><img src="/files/8gvzkD9Y4PNQeOacBclF" alt=""><figcaption></figcaption></figure>

Also, note that if you focus sendings on opt-in contacts (which will happen for all non-transactional use cases), **the opt-in status will be checked before each message sendings**, to make sure the user is still opted-in. If, along with an automation, the person opt-out, it will continue its progress but not be messaged (until the user potentially re-optin).

#### Play with AND/OR option

You can add up as many conditions as you want, and create specific scenarios by clicking on 'AND/OR':

<figure><img src="/files/uxPiwZPhd1H6OEF37FwI" alt=""><figcaption></figcaption></figure>

When you are satisfied, click on the **Continue** button!

### 3. Other settings

After finishing your targeting, there are 3 other settings you can play with:

<figure><img src="/files/OoQ90PwEooZPujOfgGik" alt=""><figcaption></figcaption></figure>

#### **Re-entry rules**

* **Capping**

The capping is the limit on the total number of entrances followed by at least one message sent to the user.

If you put “2”, it means the user will not enter more than twice an automation that sent him at least a message.

🔎 More examples

If the capping is “2” in an automation that has 5 messages steps:

* case 1: the person enters, waits in a delay step and ends up being excluded from the automation by a cancel event before being addressed by a message, it’s not counted for capping.
* case 2: the person enters once and receives 5 messages, it counts as “+1”
* case 3: the person enters and receives only 2 messages and then is excluded due to a cancel event, it counts as “+1".

By clicking the toggle button you will be able to define that limit 👇

<figure><img src="/files/sJxE6OcJWvsDsd880J94" alt="" width="375"><figcaption></figcaption></figure>

* **Grace period**

Use the grace period to set a minimum delay in hours or days for a user to re-enter an automation after exiting it. A user can exit an automation for two reasons:

* Because of an **exit** event
* He arrived at the **end** of the automation.

{% hint style="info" %}
Note that if a user enters the automation but exits it before receiving any messages, we do not apply the grace period. So they could re-enter the automation right after exiting it if they trigger the event again.
{% endhint %}

<figure><img src="/files/dubXTxPPdI3LP8ZMQJZu" alt="" width="375"><figcaption></figcaption></figure>

#### **Timing** <a href="#h_16a9f3f5c9" id="h_16a9f3f5c9"></a>

Click on the **Timing** icon to manage the lifetime of the automation by choosing specific starting and ending dates:&#x20;

<figure><img src="/files/AX7mM4Np9ka10TapzSP1" alt=""><figcaption></figcaption></figure>

#### Quiet times <a href="#h_c260e12d7a" id="h_c260e12d7a"></a>

You can add Quiet times to specify either quiet hours or quiet days, during which the profiles in this automation will not be messaged.

Click on the Quiet times icon to choose the right timeslot:

<figure><img src="/files/YAaWxLacKI5cxppyRsLq" alt=""><figcaption></figcaption></figure>

You have two fallback strategies to choose if your communication is sent during these Quiet Times:&#x20;

* Send at the next available time;
* Skip the message and continue.

## Wait and Exit events <a href="#h_7ccd822588" id="h_7ccd822588"></a>

Now that you have successfully set up your trigger event, you can manage **when to send your automation** and if you want to **cancel** the **sending** after the occurrence of chosen events.

### Wait

There are two types of wait:&#x20;

* delay
* wait for event

{% hint style="info" %}
Note that the profile Time To Live (TTL) within your automation can be up to 367 days.
{% endhint %}

#### Delay - Wait for, Wait Until and Wait Until Best Time

The delay can be set to **wait for** several minutes/hours/days after the trigger event occurred.&#x20;

For example, you set up a +2 days timer. If a user triggers your entry event the 1st of January, they will receive the next message on the 3rd of January.

You can also set your delay in order to **wait until** a certain time on a certain day.&#x20;

For example, you can set up a wait until 11am on Tuesday. Therefore, if your user triggers the entry event on Friday, they will receive your next message on the following Tuesday at 11am.

{% hint style="info" %}
The first delay and all others can also be a simple delay of up to 90 days.
{% endhint %}

<figure><img src="/files/5zKmO5O4lS6cZUKQKOJ4" alt=""><figcaption></figcaption></figure>

The **Wait Until Best Time**  allows sending messages to each user at the hour they are most likely to engage (open and/or click the message), based on their own interaction history.

<figure><img src="/files/sg6xFkrDLaMWBhca2WTO" alt=""><figcaption></figcaption></figure>

Ex: If a user enters an automation at 11 a.m. and Batch IA engine has calculated that the Best Time to send a message to this user is 6 p.m., they will exit the wait until best time step at 6 p.m. the same day and they will receive the following message straight away.

* A fallback hour (in profile's local time) must be configured : it applies when no engagement data is available or a technical error occurs.
* An exit event can also be defined to handle status changes while a profile is waiting.

Note that a profile entering the Wait step will exit it within 24 hours at most, which is the time required to evaluate all potential optimal sending times.

{% hint style="info" %}

* Quiet times are compatible with Best Time but applied independently (at the message level). If the Best Time falls within a Quiet Time window, sending is delayed until the Quiet Time ends.
* Send Rate is compatible but may introduce slight delays compared to the computed Best Time for some profiles. This is expected behavior.
  {% endhint %}

{% hint style="warning" %}
**Best Send Time** is a priced offering. Reach out to your CSM or Account Manager to learn more.
{% endhint %}

#### Wait for event

The "**Wait for Event**" step allows you to wait for up to 4 events over a defined time period. The first event triggered is the one that will end the wait and make the user continue down its branch.

{% hint style="info" %}
The wait time is configurable from 1 minute up to 90 days.
{% endhint %}

<figure><img src="/files/NDXCFdXpCSuK8UDoHiMg" alt=""><figcaption></figcaption></figure>

It works as follows: once the user enters the Event step, they are put on hold for a custom-defined duration. Two outcomes are possible:

* The user triggers one of the expected events. They will then immediately proceed down that event's branch (without waiting for the timer to expire).
* The user does not trigger any of the expected events. They will wait for the timer to expire and then proceed down the timer's branch.

{% hint style="success" %}
The step only listens for events that are triggered *after* the profile enters the "Wait for Event" step.
{% endhint %}

Also, you can filter the wait events on their attributes (event filtering is optional). For example, wait for a `purchase` event where `category` = "shoes".

If an expected event occurs (e.g. `puschase`) but the specified attributes value does not match  (e.g. `category` = "pants" instead of `category` = "shoes"), the event will be ignored and the profile will continue to wait.

{% hint style="warning" %}
It is not possible to filter on complex attributes like arrays or objects. All other attribute types are supported.
{% endhint %}

<figure><img src="/files/WEsMPPu0QA3zvnnSwA68" alt=""><figcaption></figcaption></figure>

Note that the **events supported** are all your **Custom Events** (except your Automation Trigger Event) and **two built-in Retargeting Events**:&#x20;

* clicked message,
* opened message.

These retargeting events can be set for a message in your current automation or any other automation or campaign.

This feature allows you to create **channel fallbacks using retargeting events** in the event step.

For example: you can wait 1 hour for a Push Open, if not, send an SMS.

It can also help you to **manage transactional flows**.

For example: wait for email validation in an onboarding scenario before processing to the next step.

### Exit event(s)

By clicking the toggle button you will be able to add one or several **exit** **events**:&#x20;

<figure><img src="/files/wMH58HyUu1Ftkto9hmyn" alt="" width="375"><figcaption></figcaption></figure>

Users who trigger one of the exit events will exit the automation. You can use a custom event and apply filters based on additional event data (*Label, Attributes, Tag collection*).

{% hint style="danger" %}
If you are using **Parallel automations,** the exit event **must have the same ID** as the entry event. If the ID differs, the cancellation will not be processed.
{% endhint %}

## Add further messages and delays <a href="#h_4cbcbd1b48" id="h_4cbcbd1b48"></a>

You can add **other** **automation** **steps** with delays after your first message by clicking on the + icon!

<figure><img src="/files/6CZX7ldm0Be9M5OXhVU6" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The maximum number of automation steps is 40.
{% endhint %}

## Yes/No Split <a href="#h_7e8a7b9160" id="h_7e8a7b9160"></a>

Set up complex flows in your Automations and split users based on a new targeting rule along the journey!

Imagine different scenario branches based on Profiles conditions and unlock a wide variety of sophisticated and personalized CRM scenarios without losing the simplicity of Batch Dashboard.

The Yes/No Split leverages all Profiles data to split the workflow into 2 branches:

* Yes, people match the condition;
* No, they don’t.

Then, you can send a different message or even a different type depending on whether the user matches or doesn't match the new rule.

*Example: Here the split will depend on whether users are opt-in to marketing emails or not. If they are, they'll get an email. Otherwise, they'll get an SMS message* ✅

<figure><img src="/files/8qtsLGheTOPgkdUmDG0f" alt=""><figcaption></figcaption></figure>

### How to use it? <a href="#h_7e8a7b9160" id="h_7e8a7b9160"></a>

Once you have chosen the trigger event, you can add the Yes/No Split at every step of an omnichannel trigger automation. Click on the + button and then select Yes/No Split:

<figure><img src="/files/jxWlMENR3aqNKXcU0gca" alt=""><figcaption></figcaption></figure>

Then, choose a new segmentation rule to set up the split and give it a name or let our AI smart naming feature do it for you:

<figure><img src="/files/LtZu5a5PJhfEecDexdsj" alt=""><figcaption></figcaption></figure>

It can be through Segments (*more information on user Segments* [*here*](https://help.batch.com/en/articles/9352214-how-to-save-a-user-segment)), or Custom Audiences (*more information on Custom Audiences* [*here*](https://help.batch.com/en/articles/3539787-how-can-i-send-a-test-to-several-devices-at-once)).

{% hint style="warning" %}
Be aware that entry event information cannot be used as split targeting rules.
{% endhint %}

{% hint style="info" %}
Our AI smart naming feature powered by our AI Assistant will automatically generate descriptive labels for Message and Yes/No Split steps based on their actual content and configuration.
{% endhint %}

## Random Split <a href="#h_7e8a7b9160" id="h_7e8a7b9160"></a>

The Random Split allows you to divide the users of an automation into 2 to 4 groups based on algorithms. You may choose the percentage of users entering each group according to your use case and customize everything on the branch such as delays or exit events.

<figure><img src="/files/9w9gIpn3cYmm6lrBUy5Q" alt=""><figcaption></figcaption></figure>

This allows you to test and optimize use cases. Try different series of messages, various delays and times of sending, other content and types of messages. Learn more about use cases in [our Blog's article](https://batch.com/blog/posts/random-split-in-automation-builder) 👈

Let's now see how to create these branches! 💪

### How to use it?

Once you have chosen the trigger event, you can add the Random Split at every step of an omnichannel trigger automation. Click on the + button and then select Random split:

<figure><img src="/files/Sok45Vo9kt4OR5h2jR08" alt=""><figcaption></figcaption></figure>

Choose between 2, 3 or 4 branches and adjust the percentage of users of each of them. Just keep in mind that the sum of branches must always be 100%.

<figure><img src="/files/9fDW45pQH3OwXRn0rcWK" alt=""><figcaption></figcaption></figure>

Then customize the branches as you wish! By clicking again on the '+', add messages, delays, exit events or even another split on the branches.

<figure><img src="/files/vm4A3FRWqxgyP5BCumeY" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The randomization algorithm performs well with large sample sizes but is less accurate at very low volumes. For example, if you send 30 people through an automation with three branches split at 33%, 33%, and 34%, you may not end up with exactly 10 people in each branch.
{% endhint %}

## Move your steps if you need to <a href="#h_4cbcbd1b48" id="h_4cbcbd1b48"></a>

You can move your step messages one by one:

<figure><img src="/files/92wJ9a0xnOZXBQJNOfWF" alt=""><figcaption></figcaption></figure>

When you add a split (Yes/No or Random) to an Automation that already has steps after it, a modal appears allowing you to choose what to do: keep the steps below, move them to the first branch, or move them to the second one. Illustrations help you to choose the best option.

<figure><img src="/files/lHE0KP9d5KJkwmURalxn" alt=""><figcaption></figcaption></figure>

## Automation quick analytics <a href="#h_7e8a7b9160" id="h_7e8a7b9160"></a>

### Entry and Exit data

The automation builder interface clearly shows the number of profiles that have entered and exited the Automation.

* This data is displayed for three key periods: 7, 30, and 90 days.
* A trend indicator shows performance change over the previous period.

<div align="center"><figure><img src="/files/LAf213avounbvkdnknPz" alt="" width="375"><figcaption></figcaption></figure></div>

<p align="center"><img src="/files/nhUflezM5rFSHUiZnU86" alt="" data-size="original"><img src="/files/Rf0mT7IKGt1cD2KfTV43" alt=""></p>

## Messages <a href="#h_7e8a7b9160" id="h_7e8a7b9160"></a>

Message editors vary from one channel to another. To learn more about composition, visit the following sections:

<table data-view="cards"><thead><tr><th></th><th data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td>Email message</td><td><a href="/pages/EU34sU8GAJq7Pn5GQ9rF">/pages/EU34sU8GAJq7Pn5GQ9rF</a></td><td><a href="/files/iYRpjaLswoHrxWY21ZaJ">/files/iYRpjaLswoHrxWY21ZaJ</a></td></tr><tr><td>SMS message</td><td><a href="/pages/yraVR3MUo0jLYbUWJNy0">/pages/yraVR3MUo0jLYbUWJNy0</a></td><td><a href="/files/WbXFeOputvBxD1d4fiab">/files/WbXFeOputvBxD1d4fiab</a></td></tr><tr><td>Push message</td><td><a href="/pages/KKOK15ItxUlb54JiOups">/pages/KKOK15ItxUlb54JiOups</a></td><td><a href="/files/x0DILI1SocIGtwCk1Pyx">/files/x0DILI1SocIGtwCk1Pyx</a></td></tr><tr><td>Whatsapp &#x26; RCS message</td><td><a href="/spaces/fiAYaWDWqtFZeXxyg67F/pages/W4XXQxPolohNIL9zEOmL">/spaces/fiAYaWDWqtFZeXxyg67F/pages/W4XXQxPolohNIL9zEOmL</a></td><td></td></tr></tbody></table>

## **Run your Trigger Automation**

Now that your trigger automation is ready, you can either run it or keep it as a draft and launch it later 🌟

Once your campaign is live, you can track its performance in the [**Analytics**](https://doc.batch.com/getting-started/features/mobile-engagement-platform/in-app-messaging/analytics) section.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.batch.com/getting-started/how-to-send-a-trigger-automation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
