To deep dive into the mechanism of rules, you must first get familiar with the basic elements that build up rule workflows.
This is the basic condition of the workflow to begin. There are two types of triggers:
- An ‘Event’ trigger is used to define an event as the primary condition for the workflow to be executed. An event can be any type of action that happens in the context of the loyalty program (eg. checkout, opt-in, level up, etc.)
There are two settings for an ‘Event‘ trigger:
- Event: you need to define a customer event that must be completed in order for the workflow to begin (e.g. you want to give an instant coupon reward to customers who make a purchase)
- Start and end dates: the workflow will only begin if the event is made within a given timeframe (e.g. you want to give an instant reward to customers who upgrade to a higher level in May)
Please note that start and end dates are not available for General rules.
Event trigger outputs
Event triggers have two types of outputs: modifiers and actions
– Modifiers: The filters and actions attached to the modifiers output of the event trigger will be executed before the event is written into the database.
– Actions: The filters and actions attached to the actions output of the event trigger will be executed after the event is written into the database.
- The ‘On a date’ trigger is used to time your workflow to a specific date. There are two options to define the date:
- On date: the workflow will run on a specific date and time, or right after the activation (e.g. rewarding all customers or specific customer segments at one specific time)
- Repeat: the workflow will run periodically (once a day/week/month) at a specific time of the day, within a given timeframe (e.g. rewarding customers on their birthday)
On a date trigger outputs
The On a date trigger has only one output (ON). This is where all the filters, actions and modifiers should be connected.
By applying filters, you can be more specific in defining your triggers as a trigger can have multiple filters. Furthermore the use of ‘AND’ and ‘OR’ relations provides a high-level of flexibility for creating complex rules. After adding a filter parameter, you can set the condition of the filter by select an operator (depending on the filter parameter) and defining the value.
There are two types of attributes to filter to:
- ‘Event attributes’: you can add any parameter of the Event trigger as the condition of the workflow to begin (e.g. name of the product in the checkout event or the social network on which the customer has shared your pages)
Event attributes are not available when employing an ‘On a date’ trigger, as there’s no event trigger to be specified.
- ‘Customer attributes’: these filters helps you specify which customers the workflow should be applied to (e.g. customers who have earned more than 1,000 points or those who have reached a certain tier)
In case you have custom properties, feel free to use them for filtering!
Customer attribute filters are available for both ‘On an date’ and ‘Event’ triggers.
Each filter has two types of outputs: success (green) and failure (red).
- Success: The actions attached to the success output of the filter will only be executed when the all the filtering criteria is met.
- Failure: The actions attached to the failure output of the filter will only be executed when the filtering criteria is not met.
The Wait element is a flow controller built into the Rule editorm that can delay the continuation of the workflow. The time period ( minutes, hours and days) can be set by double clicking on the Wait element. The minimum time value is 1 minute and there is no a maximum limit.
Actions are essentially the end results of your workflow. They perform the tasks that the workflow is set up for. However, you can add multiple actions to a workflow, either on different branches or next to one another.
Here’s the list of actions that you can work with:
- Trigger Marketing Communication: Triggers an external event in your newsletter provider.
Currently external events are available for Dotdigital, Bronto and Emarsys users.
- Sync data: Synchronizes data to your newsletter provider.
- Set level: Upgrades customers to a specific tier.
The customers won’t be downgraded if the defined level is lower than the customer’s current level.
- Set hidden level: Moves customer to a new hidden level.
The customers won’t be downgraded if the defined hidden level is lower than the customer’s current hidden level.
- Webhook message: Sends a request to any web service.
- Reward claim: Assigns rewards, which you have previously set up in the Rewards module, to customers.
You can choose to give the reward for free or deduct the point price of the reward (set in the reward editor) from the customers’ point balances.
- A/B test: Divides the audience to test different actions.
The A/B test action automatically adds customers to predefined lists.
- Assign coupon: Issues a discount coupon to the customer.
Note: Customers will not receive information about the reward automatically. You must take care of informing customers and sending the coupon codes through your newsletter provider. Please set up a webhook message or external event action at the end of your workflow.
- Add to list: Adds customers to lists that you have set up under the Customer Insights menu.
- Remove from list: Removes customers from lists.
If a customer is not in a selected list, the workflow will fail, which means that you may want to set up the failure (red) output of the ‘remove from list’ action as well.
- Campaign bonus: Rewards customers with bonus points.
Note: The campaign bonus adds extra points for customer actions, in addition to the points that you applied on the module configuration pages.
- Referral bonus: Rewards referrers with bonus points based on the actions of their invited friends
- Assign activity: Makes the customer complete a predefined challenge and grants the points associated to the challenge
Each action has two types of outputs: success (green) and failure (red).
- Success: Further actions attached to the success output of the action will only be executed when the action has been successfully executed.
- Failure: Further actions attached to the failure output of the action will only be executed when the action has not been executed successfully.
Modifiers are special types of actions designed for advanced use cases. They work in three different ways:
- Interrupt modifier:
Interrupt modifiers break the entire workflow by preventing the event to be written into the database. Consequently, the interrupt modifier can only be added to the modifier output branch of an event trigger.
E.g. you can interrupt the opt-in process if the customer is younger than 18 years of age.
- Modify event:
The event modifier makes change(s) in the event that triggers the workflow. Just like the interrupt modifier, it can only be used on the modifier output branch of the event trigger, as it modifies the event before it’s written into the database.
E.g. you can flag checkout events in which customers have spent at least 1,000 points, thus reducing the total basket value.
- Modify customer:
The customer modifier can change properties of the customer object itself. You can add it anywhere in the flow to add or change information that the loyalty program stores about the customer.
E.g. the currency associated with a customer can be changed each time the customer uses a different currency when making a purchase.
Each modifier has two types of outputs: success (green) and failure (red).
- Success: The actions attached to the success output of the modifier will only be executed when the modification was successful.
- Failure: The actions attached to the failure output of the filter will only be executed when the modification was unsuccessful.
With Notes you can add comments, reminders, or explanations of the whole workflow or each element on the canvas. These are not executed as a part of a workflow and are placed by drag and drop a Note element then adding text.