Decision
By using this node, you can define conditions determining whether contacts will proceed along or will be excluded from your program.
You can configure the following settings in this node:
- Name - The name of the action taken by this node.
We recommend giving descriptive names to your programs.
- Type - The decision will be made based on the selected template. The available fields and parameters depend on the chosen type. The following types are available:
Messages not sent template
By using this type, you can determine how contacts will proceed along your program based on messages that have not been sent to them.
The following fields are available:
-
Channel - The message was sent through the selected channel. You can choose from the following options:
- Push
- SMS
- Message(s) - The message that was not sent to the contact. You can select a single or multiple messages.
Event happened
This type filters contacts based on their past behavior. For example, you can use this template to check whether contacts viewed the jeans category at least 3 times in the last 48 hours.
The following fields are available:
Event - Here you can:
- Select the source of the event,
- Select an event,
- You can select only one event.
- To check the last 20 Mobile Engage events received, click the SDK Events icon next to the specific app on the Mobile Engage menu > Apps tab. You can see the attribute names in the Request column.
Attribute criteria - Contacts will continue the journey if their attributes match all the defined criteria.
- You can add a maximum of 20 attribute filters.
- When you are adding multiple attributes, they are linked by the AND operator.
Here you can specify the following values after clicking Add Condition:
- Attribute name - For more information, see Attributes.
- Operator - For more information, see Operators.
- Values
Values are case sensitive. Make sure that the required values are entered case-sensitively, otherwise those will not be recognized by the system.
- Add item conditions - You can add item conditions to your Attribute criteria if the selected event contains product lists (arrays). For more information, see Adding item conditions.
Additional criteria - Contacts will continue the journey if their events match these criteria. Here you can choose from the following options:
- Number of events - The event has to occur as many times as specified.
The upper limit of the event counter is 20.
- Sum of event attribute values - The sum of values related to the specific event attribute collected during the given Timeframe.
If you have selected a Mobile event, please always add the prefix event_attributes.
to the attribute's name, otherwise the specified attribute will be invalid.
Timeframe - The selected event occurred during the selected time period. You can specify the Timeframe by using the following options:
- In the last - the event happened in the last x days, hours or minutes.
- Between - the event happened between the specified interval.
- Since the trigger - the event happened since contacts have entered this program.
The Timeframe is limited to the last 90 days.
In the following example, we would like to filter for contacts who ran between 10-20 km in rain. Therefore, we have added the following attributes:
Event did not happen
This type filters contacts based on events that did not happen to them. For example, you can use this template to check whether contacts did not purchase a product in the last 72 hours.
The following fields are available:
Event - Here you can:
- Select the source of the event,
- Select a single or multiple events,
To check the last 20 Mobile Engage events received, click the SDK Events icon next to the specific app on the Mobile Engage menu > Apps tab. You can see the attribute names in the Request column.
Attribute criteria - Contacts will continue the journey if their attributes match all the defined criteria.
Notes:
- The Add attribute filter button is available only if you have added a single event.
- You can add a maximum of 20 attribute filters.
- When you are adding multiple attributes, they are linked by the AND operator.
Here you can specify the following values after clicking Add Condition:
- Attribute name - For more information, see Attributes.
- Operator - For more information, see Operators.
- Value
Values are case sensitive. Make sure that the required values are entered case-sensitively, otherwise those will not be recognized by the system.
- Add item conditions - You can add item conditions to your Attribute criteria if the selected event contains product lists (arrays). For more information, see Adding item conditions.
Additional criteria - Contacts will continue the journey if their events match these criteria. Here you can specify the Timeframe.
-
Timeframe - The selected event did not occur during the selected time period. You can specify the Timeframe by using the following options:
- In the last - the event did not happen in the last X days, hours or minutes.
- Between - the event did not happen between the specified interval.
- Since the trigger - the event has not happened since contacts have entered this program.
The Timeframe is limited to the last 90 days.
Trigger attributes
This type filters contacts based on the event that triggered the program. For example, you can use this template to check whether contacts have recently viewed a product that belongs to the jeans category.
Here you specify the following values after clicking Add Condition:
- Attribute(s) - Your contacts will be filtered based on the selected attributes. For more information, see Attributes.
Use an attribute filter to match the JSON payload object you want to filter for.
For example, use the attribute global.name
to filter for a name in a JSON payload as the following:
{
"global": {
"name": "example",
"last_name": "example",
"email": "example@testmail.com"
}
}
Notes:
- You can add a maximum of 20 attribute filters.
- When you are adding multiple attributes, they are linked by the AND operator.
- The available attributes of the selected Trigger event are listed in the drop-down if you click the Attribute field. You can enter attributes that you would like to use in the future manually, except for Web Extend and Channel Engagement events.
- Operator - For more information, see Operators.
- Value
Values are case sensitive. Make sure that the required values are entered case-sensitively, otherwise those will not be recognized by the system.
- Add item conditions - You can add item conditions to your Attribute criteria if the selected event contains product lists (arrays). For more information, see Adding item conditions.
In the following example, the Decision node will target those contacts who:
- ran a maximum of 10 kilometers in rain,
- between 1 and 4 days ago.
Those contacts who do not meet these criteria will be excluded from the program.
Included in segment
You can filter contacts based on whether they are part of a segment or not.
You can use all segment types in Interactions programs.
Last time the event happened
With the Last time the event happened type you can define conditions by checking whether events contained specific attributes when they were triggered the last time.
Use cases and examples
You can target customers who met the specified requirements when they triggered the event the last time by using this template. For example, you can reach contacts who fulfilled the following criteria when they triggered the specific event the last time:
- placed orders above €100 (in this case, customers who purchased something for 99 the last time will be filtered out).
- finished their running workout and ran at least 10 km (in this case, contacts who ran 9,5 km the last time will be filtered out).
How does it work?
The following example shows you how the Last time the event happened template works.
Suppose that we would like to target only those customers who ate chocolate ice cream the last time at an ice cream parlor.
Each time a customer adds an entry to their food log, we send the Mobile event called food_log_lunch_today
containing the following attributes:
food_type
food_taste
food_location
What is the difference between the Last time the event happened and Event happened templates?
Suppose that a customer:
- went to an ice cream parlor and ate chocolate ice cream on 1st May.
- ordered chocolate ice cream online and ate it at home on 14th May.
We would like to reach only those contacts who ate chocolate ice cream the last time at an ice cream parlor. To target them, we will use the event food_log_lunch_today
and the following attributes:
-
event_attributes.food_type
containsice_cream
-
event_attributes.food_taste
containschocolate
-
event_attributes.food_location
containsice_cream_shop
If we use the Event happened template, then it will find that the event triggered on 1st May meets the specified requirements, so the customer can continue their journey. However, it will lead to a false positive result because that is not the very last event triggered by this contact.
If we use the Last time the event happened template, then it will find that the last event does not fulfill the criteria, so this contact will be filtered out or continue their journey on the No branch.
To avoid having false positive results, it is important to define the conditions gradually. In this case, we have to be careful and check the location attribute only after finding the last event when the contact ate chocolate ice cream.
To make sure the Decision node returns exactly those events that we need, we have to define the conditions in two steps:
1. Configure the Decision node as follows:
a. Set the source to Mobile and select the event food_log_lunch_today
.
b. Add the following Event criteria by clicking Add Condition:
- event_attributes.food_type
contains ice_cream
- event_attributes.food_taste
contains chocolate
2. Add the following attribute to the Latest event criteria: event_attributes.food_location
contains ice_cream_shop
Here you can fine-tune the condition and answer a complex true or false question about the most recent multi-attribute defined event by adding further attributes. In the following example we selected the location attribute called event_attributes.food_location
.
Available fields
Event - Here you can specify the following values:
- Source - The trigger source.
- Event - The trigger event.
Event criteria - Contacts will continue the journey if they had an event matching all event criteria. If you add multiple attributes, they are linked by the AND operator. Here you can configure the following fields:
- Attribute - Events will be filtered based on the selected attributes. For more information, see Attributes.
- Operator - For more information, see Operators.
- Value
Values are case sensitive. Make sure that the required values are entered case-sensitively, otherwise those will not be recognized by the system.
- Add item conditions - You can add item conditions to your Event criteria if the selected event contains product lists (arrays). For more information, see Adding item conditions.
Latest event criteria - Contacts will continue the journey if their latest event matches these criteria. If you add multiple attributes, they are linked by the AND operator.
Adding item conditions
If you are using events that contain product lists (or any other data in an array), then item conditions may come in handy. You can create decisions processing each item in a product list to check whether any of them matches the defined condition. For example, Purchased and Updated cart Web Extend events contain such product lists. (Customers might add multiple products to their carts and purchase more than one item during a session.)
You can add item conditions to attribute criteria in the following Decision node templates:
Notes:
- Item conditions are available for all events containing arrays.
- Emarsys fully supports arrays on the first level. In the case of nested arrays, you can only specify the number of items contained within the array but you cannot define item conditions.
- When using Web Extend events, if the number of items contained within the list is defined, the
quantity
field of the items is not taken into account. In this case, different items in the list will be counted (e.g. product lists used in the Updated cart or Purchased event are usually counted with differentitem_id
attributes). - For more information on events containing item lists, see Purchase.
Use cases
This feature comes in handy, for example, when:
- You have an ongoing promotion for 4 exclusive items and you would like to see whether customers have purchased any of these products (based on their
item_id
attributes), so that you can send them an exclusive post-purchase campaign with tips and tricks. - You would like to know whether customers have added at least one item to their carts the price of which is over €100.
Defining item-specific conditions
Here you can see how item conditions work. In the following example, we would like to target customers who purchased more than two exclusive items in the last 30 days with the following conditions:
- the price of each product was over €60,
- the total cart value was over €300.
- Select the Event happened template in the Decision node.
- Choose the Web Extend source and the Purchase event, then click Add condition.
- Select Purchased items under Item lists (arrays).
- Select the contains more than or exactly operator and set it to
2
item(s).
Please take the following into consideration:
- Customers may purchase more items at the same time. These attribute criteria ensure that we will target only those events that were generated when customers purchased at least 2 items.
- Defining the number of items to be checked in the product list determines the number of items that should meet the specified conditions.
- To add further attributes of the purchased product to the attribute criteria, select the Add item conditions checkbox.
Items within the product list may also have attributes. A Purchased event may contain the following attributes:
item_id
quantity
price
- Define the products’
item_id
andprice
attributes.
- Add another condition:
- Select Total cart value under Single-value attributes,
- Choose the operator is more than or equals and set it to
300
.
- Specify the additional criteria as follows:
- Set the Number of events to more than or exactly
1
time(s) and - Set the Timeframe to In the last
30
days.
- Set the Number of events to more than or exactly
Please consider the following:
Suppose that a customer purchased five products last month in one session (i.e. one event) with a cart value of over €400. This customer bought one of the exclusive items we would like to promote and its price was €70. This customer does not fulfill the specified condition (i.e. Purchased item contains more than or exactly 2 items), so the contact cannot continue the journey.
Array-specific operators
Here you can see how array-specific operators work with the Updated cart Web Extend event.
In the examples below we will refer to the following case:
Suppose that a customer has added five items to the cart. Two products were more expensive than the others: each of them cost at least €60.
- contains exactly - The cart contains exactly 2 items and those have to meet the defined conditions. The customer mentioned in the example above has added 5 items to the cart, so they cannot continue the journey.
-
contains more than or exactly - The cart contains more than or exactly 2 items and those have to meet the defined conditions. The customer mentioned in the example above can continue the journey because they have added 5 items to the cart and the
price
attribute of 2 products matches the defined criteria.
- contains less than or exactly - The cart contains less than or exactly 2 items and two of them meet the defined conditions. The customer mentioned in the example above cannot continue the journey because they have added 5 products to the cart.
- does not contain any items - In this case, you cannot add item conditions (i.e. the cart should be empty). The customer mentioned in the example above cannot continue the journey because they have added 5 items to the cart.
- contains items that all match item conditions - In this case, each item (regardless of the number of products in the list) has to meet the defined criteria. The customer mentioned in the example above cannot continue the journey because they have added 5 items to the cart but only two of them match the item conditions (i.e. the price of each product is at least €60).
All you need to know about attributes and operators
Attributes
Please consider the following when using attributes:
- If you have selected a Mobile event, please always add the prefix
event_attributes.
to the attribute's name, otherwise the specified attribute will be invalid. For example,event_attributes.yourCustomAttribute
. - If you have selected a Mobile event and would like to filter contacts based on the time when an event happened, then use the
event_timestamp
attribute. - If you would like to personalize the content with details of your event, then enclose them as follows:
-
{{ event.yourCustomAttribute }}
, for example,{{ event.destination_city }}
- For campaigns using Mobile events, use the format
{{ event.event_attributes.yourCustomAttribute }}
, for example,{{ event.event_attributes.distance }}
-
- If you would like to send timestamp attributes to your custom Mobile or External events, then please consider that we use the ISO 8601 date format.
- All the available attributes of the selected event are listed in the drop-down if you click the attribute_name field. You can enter attributes that you would like to use in the future manually, except for Web Extend and Channel Engagement events.
Operators
The recommended operators are automatically detected based on the attribute type. All the recommended operators that belong to the detected attribute types are listed if you click the Operator field. If you have entered an attribute manually, then all operators are listed in the drop-down.
Examples
The following examples show you how some of the operators work:
- between 1 and 5 - includes the values 1 and 5 as well,
- at most 10 - includes values that are smaller than or equal to 10,
- at least 5 - includes values that are greater than or equal to 5.
-
is one of the following (text)/is not one of the following (text) - the defined values should exactly match the values contained by the incoming events, as the underlying text operator is "equal" (i.e. the received value should be identical with the defined value) and not "contains". The listed values are linked by the OR operator. For example, if you expect to receive events with the attribute
weather
that could contain the attribute valuesheavy rains
andmostly sunny
, then the values specified in the Decision node have to be identical with those values. If you specify the valuesrain
orsunny
in the Decision node, then the incoming attribute valuesheavy rains
ormostly sunny
will not fulfil the conditions set by this node and as a result, this decision will not be taken as expected.
Text operators
You can search in text fields without knowing the exact value you are looking for with these text operators:
- contains any of
- contains all of
- contains none of
When using the operators is any of and is none of, you need to enter the exact values and the attributes have to match the specified conditions. On the other hand, when using the new text operators, you can search for attributes by specifying only a part of the value you are looking for.
You can use these operators, for example, if you have stores in many regions but you do not remember the exact name of the locations.
In the following, example the Decision node targets customers who are browsing your website using an Android or iOS mobile device:
Values
- NULL is a value you get by not defining the value. You omit definition, leave it undefined.
- empty is a defined value. Here you explicitly define the value as empty.
- SPACE character Unicode (U+0020) is also a valid value.
If you are using any of the above values, it is crucial to see that they look the same on the UI. An everyday example would be a contact field that is either empty or NULL - you could not tell which value is there by looking at the field on the user interface of the Emarsys Suite. If you inspect the database itself or use API calls differentiation is possible.
NULL strings can be created by, for example, importing CSV files with such values:
field1,field2,field3
apple,,plum
As opposed to this, empty strings can be created by, for example, importing CSV files with such values:
field1,field2,field3
apple,"",plum
Decision splitter
By using this node, you can split your program into separate paths that provide contacts with different types of treatment. Contacts will progress along the Yes or No path of your program based on whether or not they fulfill the criteria set in the Decision splitter node.
Please consider the following:
- If contacts’ attributes contain invalid or empty values, or data that does not meet the criteria set in the Decision splitter node, then these contacts will proceed along the No path of your program instead of being excluded from it. For example, if the criteria set in the Decision splitter node contain the attribute
event_attributes.distance
at least6
, then those contacts whose attribute values are invalid, empty or less than or equal to 5 will proceed along the No path of the program. - On the Program Reporting page, those contacts who proceeded along the No path of the program because their attribute values were invalid or empty or contained data that did not meet the criteria set in the Decision splitter node will be counted as Continued.
To exclude contacts with empty attribute values from your program, use the operator is not empty when adding attributes.
You can configure the following settings in this node:
- Name - The name of the action taken by this node.
We recommend giving descriptive names to your Decision and Decision splitter nodes.
- Type - The decision will be made based on the selected type. The available fields and parameters depend on the chosen type. The following types are available:
If you have selected the Trigger attributes type, the ems_event_time
attribute means the time when the endpoint was triggered.
A/B test
You can split a program into separate paths and experiment with various contents or targeting by using this node.
How does it work?
- New contacts:
New contacts are randomly assigned to each path according to the percentage value you set. Distribution takes place on a per node basis and is based on the unique identifier of contacts, which means that all events belonging to a single contact will follow the same path when they arrive at the A/B test node.
Suppose that the A/B test node has two branches and both are set to 50% and two contacts trigger the program: contact 1 is randomly assigned to a path and contact 2 is assigned to another.
- Contacts entering the program again:
If the same contacts trigger the program multiple times, then they will proceed on the corresponding paths again. This might lead to skewed A/B test node branch results reflected by the numbers above the nodes on the Program Reporting page. Furthermore, contact deletion might also result in distorted ratios because deleted contacts do not enter the program anymore, while contacts already in the program might enter it again, in this case, they will be assigned to the same paths. Concerning how it handles contacts entering the program again, the Interactions A/B test node works in a different way than the Automation Center A/B splitter node.
You can change the percentage value after you have activated the program but you cannot add or remove branches.
To prevent further contacts from entering a path, reduce the percentage value to 0.
Wait for event
You can schedule this node to wait for an event to occur within the specified timeframe and split your program into separate paths based on that. Those contacts who fulfilled the conditions will proceed along one path and those who do not meet the criteria will continue their journey on another one.
The following fields are available:
-
Event to wait for - Here you can:
- Select the source of the event and
- Select an event.
Important:
- The selected event does not affect the original trigger event of your program. You can only use the original trigger event to define conditions applied by Decision or Decision splitter nodes using the type Trigger attributes and personalize content with the original trigger event's details.
- Events with a name longer than 1000 characters do not appear in the list of selectable events.
- Timeout - The node will wait for the specific event to occur within the specified timeframe.
A contact will progress along the Yes path immediately when the selected event occurs, otherwise they will continue their journey on the timeout path after the specified time limit.
For example, the Wait for event node comes in handy when you sent a special offer to your customers that is valid only for 48 hours and after 36 hours you would like to send a reminder for those contacts who have not purchased anything yet. In this case, we have set the Wait for event node to wait for the Purchased
Web Extend event for 36 hours. As a result, customers who triggered the Purchased
event will continue their journey immediately on the Yes path, and contacts who did not trigger this event will progress along the timeout path after 36 hours. We can send them a reminder that the offer will expire by adding a Mobile Engage push message node to the timeout path.
Wait
When using the Wait node, you can specify the delay in seconds, minutes or hours before the next step is taken in the program. The Wait node works based on your account's time zone.
Participation check
This node checks whether or not contacts are eligible to continue their journey in your program. Those contacts who fulfill the defined criteria will proceed along the Yes path, those who do not meet the conditions will be directed to the No path.
We recommend inserting the Participation check node right before your channel nodes (i.e. a Send email, Mobile Engage push message, Send SMS, Mobile in-app - add, custom node etc.)
Typical use cases
Refer-a-friend campaign
For example, you can use the Participation check node if you have a refer-a-friend campaign in which you would like to offer a more valuable incentive after the first friend of a contact joins the campaign and a less valuable incentive after another friend of the same contact joins the campaign.
Such a program would look like as follows:
In the example above, the Participation check node is set to Only once ever. As a result, the contact can only proceed along the Yes path when the event happens for the first time and this contact receives the 40% discount only once. Each time the contact triggers the same event again, the contact will be directed to the No branch and will receive the 20% discount.
Sending post-purchase vouchers
The Participation check node may come in handy if, for example, you have a delivery update program and you would like to send a voucher based on the value of the order with varying frequency after the purchased product is shipped.
Such a program would look like as follows:
In the example above, the Decision splitter node checks if the value of the order made by the customers is above or below 80€ and the Participation check node ensures that:
- Those contacts whose order exceeds that value will receive a 20€ voucher only once in every 2 months.
- Those contacts whose order value is below 80 will receive a 10€ voucher only once in every 3 months.
Using the same Participation check node settings in a single program
If you have a promotion that you would like to show your contacts who finished their workout under different circumstances, then you can use the same Participation check node settings within the same program. For example, let’s imagine that you would like to:
- Use the same trigger event in both cases but a different campaign will be displayed depending on the attributes.
- Advertise different products depending on the temperature for contacts:
- Who ran when the temperature was above 25 °C.
- Who ran when the temperature was below 10 °C.
- Display the campaign every 30 days regardless of the temperature.
Such a program would look like as follows:
This is how the Participation check node would look like:
Using the same Participation check node settings in multiple programs
You can use the same Participation check node settings in multiple programs in the following cases:
- Abandoned use cases: You can use the same Participation check settings in multiple programs to make sure that a contact receives only one abandoned campaign a week to avoid marketing fatigue or unsubscription. In this case, you can insert the same Participation check node (called Abandoned use cases in the example below) before the channel nodes in your abandoned browse, abandoned cart and abandoned checkout page campaigns. This is how such a Participation check node looks like:
- Sending a valuable voucher once in a month: You can use the same Participation check settings referring to the same limited audience in multiple programs to make sure that a contact can only receive one valuable voucher once in every 30 days.
- Back in stock and price drop campaigns: You can use the same Participation check settings in multiple programs to make sure that your contacts only receive either the back in stock or price drop campaign a week.
Configuring the Participation check node
Here you can see the following options:
- Contacts can proceed along the Yes path: You can define how often customers can proceed along the Yes path. You can choose from the following options:
You can use multiple Participation check nodes with different frequency settings in the same program.
- Only once ever - Contacts will be able to proceed along the Yes path only once.
- If the elapsed time since the contact last proceeded along the Yes path is at least - Contacts can proceed along the Yes path again after the specified time period.
Notes:
- If contacts reach the Participation check node again before the specified time period, the node will direct them to the No branch.
- A day in the context of the Participation check node means 24 hours regardless of calendar days.
- The timeframe is limited to a maximum of 13 months.
- Make this check available in other programs - You can save your Participation check settings and the audience referred to by this node to make them available in other programs or you can use an already existing configuration. You can choose from the following options:
Creating a new Participation check
To create a new Participation check:
1. Switch the Make this check available in other programs toggle and select Create new from the drop-down.
2. Give it a name, then click OK.
Using an existing Participation check
To use an already existing Participation check configuration, proceed as follows:
1. Switch the Make this check available in other programs toggle and select an existing Participation check you would like to use from the drop-down.
Notes:
- If the Participation check settings are used in multiple programs, then these will be listed in the bottom of the pop-up window.
- To edit the configuration of an existing Participation check node, click the Edit button next to it. If you modify the settings of a Participation check node that is used in multiple active programs, then the same changes will be applied to those programs when you click Save & Apply.
- When using the same Participation check node settings in multiple programs (i.e. the Make this check available in other programs switch is turned on), then the Participation check node remembers those contacts who already passed through it even if you remove it from and add it again to the program:
- new contacts will continue their journey on the Yes path,
- contacts who have already passed through it will continue their journey on the No path.
2. Once you are ready, click OK.
If you would like to copy a program to change its structure but you would like to keep your restricted audience, then we recommend following the instructions below:
- Save the Participation check settings used in your outdated program.
- Create a new version of your program and use the saved Participation check settings.
- Activate the new program.
- Deactivate the outdated program.
Editing the Participation check node in active programs
You can modify the following settings in the Participation check node:
- You can change the frequency from If the elapsed time since the contacts last proceeded along the Yes path is at least to Only once ever. In this case, the Interactions program stores the timestamp when the contact passed through the Yes branch the last time, so those contacts who have already proceeded along the Yes path cannot pass it through again if you set the frequency to Only once ever.
- You can change the frequency from Only once ever to If the elapsed time since the contacts last proceeded along the Yes path is at least. In this case, the Interactions program compares the current timestamp to the one that was saved when the contact passed through the Yes branch the last time (while the frequency was set to Only once ever).
If, for example, a contact proceeded along the Yes path on July 4 when the frequency was set to Only once ever, and you set it to If the elapsed time since the contacts last proceeded along the Yes path is at least 7 days, then:
- A contact who proceeded along the Yes branch on July 4 can pass it through again on July 11.
- A contact who passed through the Yes branch on July 19, can only proceed along that path again on July 26.
Double Opt-In
For more information, see Double Opt-In.
Finish node
The Finish node is added to the last nodes automatically, so you don't have to add it to your program manually.