Conditions

Conditions supports critical features throughout Snaps including segmentation in analytics, reengagements, entry and exit conditions and conditional responses.

Every user has a set of actions that they have performed. Conditions allow you to create rules that users must meet in order for something to happen.

Create a Condition

Each condition that you create will result in either a 'TRUE' or 'FALSE' value for a specific user. Below, we will go over how to create a common condition to evaluate a group of users by - users who have been active in the last week.

Users are considered active if they have performed an action within the bot. Users that perform actions like typing text or clicking buttons will go to another block so in this case, we can consider users who have transitioned to ANY block in the bot to be 'active'.

715

Have / Have not

When you first add a condition, you must determine whether your goal is to evaluate users based on whether they have or have not done something. Our goal is to determine users who have performed an action, so we will use 'have'.

802

Action

The action that users will be evaluated against. In this example, our goal is to find users who have reached any block.

806

Named / Tagged

Certain entities like blocks, acquisition sources, reengagements and intents can be tagged. Because of this, we can evaluate the condition against entities that have a specific tag rather than just one value. Learn more about tags.

808

Value

The value of the action you selected previously. For most of these actions, the values will be names of the entities you created for acquisition sources, blocks, reengagements, user properties, tags and more. In addition, this means that you can select 'anything' as a valid value. This means that as long as a user performed this action with any value, the condition will be evaluated as true. For our example, this is what we will be selecting.

667

Advanced Conditions

For all actions except user property, once you select a value, you are able to configure advanced properties. You can do this by selecting the '+' to the right of the value.

644

The most common advanced option is 'in the last' which represents a time segment on the action selected. Essentially, you are asking that this condition only be valid and true if the user performed the action in the time period selected. By default, we have configured this to be 'ever', meaning that if a user had ever performed this action since the bot went live, the condition will evaluate to true.

Certain actions like 'clicked link', 'transition to block or group', and 'trigger pixel event' have a few more advanced options.

These options include:

  • Exactly - this specifies the number of times you are looking for a user to have performed this action.
  • Less than - only users who have performed the action greater than this number of times will have this condition evaluate to true
  • More than - only users who have performed the action greater than this number of times will have this condition evaluate to true
849

However, in the condition we are making, we only want to view analytics for the cohort of users who has performed this action in the last week.

Below is a condition that will only be met by users who have been active in the last week. One thing to consider is how you define 'activity'. Users who only clicked a link during the last week would not have this condition evaluate to true because a link click does not result in receiving a block. If link clicks fit into your definition of an active user, you might consider adding an 'OR' statement that includes users who have clicked a link in this time frame.

823

Actions

Clicked Link

Any user who clicked on a button with a link. You can narrow this group of users by specifying what the link contained. '*' will mean any link.

  • In the last
  • Exactly
  • Greater than
  • Less than

A user who comes into the bot from an acquisition sources.

  • In the last

A user who has encountered an entity that you have tagged. For example, if you tagged multiple reengagements with the same tag and a user only receives one of them, they would still count as having met this condition.

  • In the last

Entered text on block or group

A user who has entered free text while they are on a block. You can select 'anything' to represent a user who has entered text on any block.

  • In the last

A user who has received a reengagement. This does not count if a user has opened or interacted with the reengagement, merely if they have been sent one.

  • In the last

A user who triggers a certain intent with their free text. You can select 'anything' to represent a user who has triggered any intent.

  • In the last

Transitioned to a block or group

A user who reaches a block or group. Remember, users can reach blocks by typing free text, clicking buttons, or receiving reengagements.

  • In the last
  • Exactly
  • Less than
  • More than

A user who triggers a pixel event - these can vary based on the events that you have started to track. Snaps standard events include pageView, addToCart, and completeOrder, but you can add any number of custom events.

  • In the last
  • Exactly
  • Less than
  • More than

A user with a certain user property set. This is the only action in the dropdown that does not have the ability to add 'in the last'.

📘

Sentence

Multiple conditions can be combined as part of a larger sentence. Allowing for multiple sentences can be utilized to build complex decision-tree logic within your experience.

Logical Operators

The rules engine utilizes logical operators - 'AND' or 'OR' between multiple conditions and multiple sentences. Each condition can be evaluated to true or false. The value of the conditions is used to determine the overall value of the sentence or sentences.

And Operators

The logical 'AND' only yields a value of 'true' when all conditions are true. If any of the conditions is false, then the logical 'AND' operator yields a 'false' value.

Or Operators

The logical 'OR' yields a value of 'true' if any of the conditions is true. If all of the conditions are false, then the logical 'OR' operator yields a 'false' value.

The following examples below demonstrate different ways that logical conditions can be used. Learn more about logical expressions.

646

Examples

Reengagements

In the following reengagement, these conditions must be true in order to send a cart recovery message to the user. This reengagement is scheduled to be sent '1 hour' after the user performs a certain action - in this case, when the user adds an item to their cart.

1 hour later, our system evaluates whether the following criteria is met. If all 3 conditions evaluate true for the user, the reengagement will be sent. This makes sense because we only want to send a cart recovery message to users who haven't yet purchased. If they have purchased within the hour, we do not want to bombard them with further messages since they have converted successfully.

924

Conditional Responses

In conditional responses, you can utilize conditions to route users to different blocks based on events they have performed or user properties they have.

In this block, we ask the user who they are shopping for:

963

If they select 'Myself', we check their gender user property which route them to appropriate gender-specific gifts:

969

Segmentation

Use conditions in segmentation to view analytics for a group of users. A common use case for analytics is viewing analytics for users who have come from specific channels. This is helpful in answering questions like "How are media users performing vs. organic users?" and "What group of users is the most engaged and likely to convert?".

884

This rule represents organic users.

Managing Conditions

All of the conditions you've created live on the conditions page in the authoring tool. From here they can be created, duplicated, and deleted.

2880

1. Entry & Exit Conditions - Entry & exit conditions allow you to create conditions that run before and after blocks, read more here.

2. Conditional Responses - Conditional responses can be used on buttons, quick replies, intents and numerous other places, read more about conditional responses.

Archiving

Conditions can be archived by right clicking on the condition chip in the right channel.

1772

Save As

Once a condition has been saved it can be modified and saved as a new condition using the "Save As" button

1916