Create Decision
Once you have a Business Object and a metric, start acting on them. Configure DecisionsDecision
A collection (or decision table) of conditions and actions. When conditions are satisfied, the corresponding actions are triggered as per defined rules.Rule
A definition (row in a decision table) stating which action should be triggered for which condition.Action
The type of activity (procedure) to execute when a condition is satisfied (for example, sending a message).Condition
A requirement that must be satisfied or evaluated to true for an action to be executed. Input in a decision table.
Use case
For our use case, we will create a Decision based on the previously created (and activated) Game engagement experiment
Business Object and the Message sum
metric.
We want to configure a Decision that defines a personalized message with a discount code to be sent to the guilds whenever the number of messages they publish within the 30 minutes
period is 100
or more.
Steps
Follow the sections to configure a Decision with actions and rules.
Create actions
Start by creating a Decision and defining what actions you want to trigger.
- Watch video
- Step-by-step guide
-
On the Decisions home page, click the Create Decision button. The Create new Decision modal is displayed.
-
Provide Decision name (
Send discount code
) and add an optional description explaining what this Decision does and is for. -
Choose the source for your Decision by clicking Select Business Object and select the previously-created
Game engagement experiment
Business Object from the list. -
Select the
Message Sum
metric available for the selected Business Object on the dropdown list.After selecting the metric, Conditions for the decision will automatically populate from the data fields mapped to the chosen metric.
You'll also see an empty Decision table preview at the bottom containing all auto-populated conditions as columns.
-
Now that you have set the conditions for your Decision, choose an action you want to execute when the rules for your Decision are met. Select + Add action, enter the action name (
Send discount code - Rockin Guild
), add an optional description, and select Configure. -
Choose the Send message action type to create an action that sends a personalized message with discount codes to the guild members.
-
Enter the publish and subscribe keys to be used to send the message to the guild’s channel ID, and enter the Body of the message you want to send (
"${message}. Use ${discountCode} to buy ${purchasedItem}."
).Variables can be defined in two ways. If you need to populate variables dynamically based on real-time data, use one of your conditions or add the data field as a condition. If you have static strings or valus you want to use, create new variables that can then be defined in the decision table. We’ll define static variables in further steps.
-
Add optional Headers or Documentation / Notes and Save the action configuration.
-
Variables added in the action payload are shown on the Decision table preview as new columns. If you like, you can update their values.
-
Repeat steps 5-9 to create the
Send discount code - Hurrah
action for the Hurrah guild. -
Select Create to finalize the Decision.
Add conditions and rules
Create rules that trigger actions whenever predefined conditions are met.
- Watch video
- Step-by-step guide
-
You can start either directly through a link from the module that pops up when you create a decision or by accessing the Decision and selecting the Edit Rules button on top.
-
Press + Add rule and define the following two rules for your Decision (set Hit Policy to
Multiple
and Evaluation frequency to30 minutes
). -
When you’re done, Save the changes.
Once you configure and save the Decision (with actions and rules ready), you must activate the Decision.
Activate Decision
To evaluate the conditions and rules and execute actions connected in previous steps, you must activate the Decision.
Conditions for activating a Decision
Head to the Additional details section for details on conditions that must be met to activate a Decision.
- Watch video
- Step-by-step guide
To activate a Decision, Click the Activate button.
You have one of these two options to choose from:
- Activate until manually deactivated.
- Set dates between which the rule will be active (dates will show your browser’s time zone).
After activating the Decision, you can still edit the values in the Decision rules.
Once you activate the Decision, the defined rules will start running, and the configured actions can get triggered. You can see that on a Dashboard with a chart created for the same metric you used in the Decision.