About Decisions
Once your metric is created, you can start evaluating that data, monitor trends, and, most importantly, act on them.
Illuminate contains the Decisions module that lets you define the metrics you want to act on by creating actions of different types and rules defining when these actions are to be executed.
When creating a Decision, you:
- Choose a Business Object and one of the metrics linked to it. In an asset-tracking scenario, these can be Hours since order (data field of
Number
type) and Trailer ID (data field ofString
type). - Define actions they want to take. For example, you might want to automatically notify a transportation manager whenever a delivery is delayed.
- Set up rules using the chosen conditions and configured actions. These rules will trigger actions. For example, you may want to notify the transportation manager only when goods are delivered with a 2-hour delay or more.
Decisions are aimed at helping product managers experiment with engagement and monetization strategies before codifying and deploying. With Illuminate, they can make decisions based on actual data instead of assumptions and then act on that data through automated conditions and actions.
Decision structure
These are the three elements that a Decision can consist of: actions, conditions, and rules.
Actions
Actions define what will happen when conditions are met.
Within each action, you can add variables that you can control and dynamically change when setting up a decision. You can define new variables or use the existing conditions from your decision rules.
To add a variable, type ${
and select one of the proposed, existing variables or create a new one by typing ${Variable name}
with the open and close brackets and selecting the Create new variable: Variable name
pop-up to save it.
You have the following action types to choose from:
Action Type | Purpose |
---|---|
Send Message | Sends a message to a user or channel. Used with PubNub Publish API. In the Body field, include the message you want to send when a decision is triggered. You must embrace the message in quotes and you can optionally add variables ( ${variableThatChanges} ). You can also add variables to the Channel and Meta fields. Sample body: "Welcome to ${levelName}, enter discount code ${discountCode} within the first 5 minutes to buy ${purchaseItem}." |
Webhook | Sends a call to a specific URL by connecting to a third-party service integration. In the Payload field, include the message you want to send when a decision is triggered. You must embrace the message in quotes and you can optionally add variables ( ${variableThatChanges} ). You can also add variables to the Webhook URL and Key and Value fields under Headers. Sample body: "${message}. Use ${discountCode}" |
Update User | Sets any predefined or custom user metadata by providing the desired information as key/value pairs. You can add variables to all of the data fields. Used with PubNub App Context user. |
Update Channel | Sets any predefined or custom channel metadata by providing the desired information as key/value pairs. You can add variables to all of the data fields. Used with PubNub App Context channel. |
Update Membership | Sets any predefined or custom membership metadata by providing the desired information as key/value pairs. You can add variables to all of the data fields. Used with PubNub App Context membership. |
Facilitating collaboration
Use each action type's optional Documentation / Notes section to facilitate collaboration between different users. Imagine you add an action as an analyst, but you want a developer to validate if the webhook URL or the message payload you specified in the action is valid. You can leave a note to your colleague in this section asking for your setup verification.
Action history
You can track the history of actions that ran for a given Decision by clicking the Ellipsis (...) button from three places:
- Menu on the upper right corner of each Decision chart on your dashboard
- Menu with each Decision created on your Decisions home page
- Menu on the upper right corner of your Decision table when in view mode
The Action history page provides the most recent 50 actions executed for a Decision table. This allows you to check whether or not actions are firing successfully.
You can filter the results based on any of the values in the table, such as status, a specific trigger value, or failure reasons.
Expand a row to check what conditions triggered an action. The condition and corresponding threshold value are displayed, along with the actual value that triggered the action in parentheses.
For example, Max of Minutes waiting ≥ 1 (6) would mean the Max of Minutes waiting is the condition, the threshold value is greater than or equal to 1
, and the value that triggered the action is 6
.
An action can fail for one of the following reasons:
- Action configuration is invalid
- HTTP timeout error during dispatch
- Publish action was unsuccessful
- App Context action was unsuccessful
- Webhook action was unsuccessful
- Received status code is other than 2xx
Conditions
Conditions are criteria that must be met to trigger an action.
For example, you can decide that you want to notify a transportation manager about a delivery delay through a message (action of type Send Message) when goods are delivered two hours after the expected time (rule). You can decide which conditions must be satisfied to trigger the action you want and how often you want to verify if the conditions are met.
Rules
Rules consist of conditions to evaluate and actions to be executed when conditions are met. A single rule is a definition (row in a Decision table) stating which action should be triggered for which condition.
You can create a Decision and save it without creating a rule for it. When saving the Decision, you will be asked if you want to create a rule immediately. If you decide to postpone the rule creation, you can do that later by selecting the Decision and clicking Edit Rules. However, you must create a rule to activate a Decision.
Each decision consists of the following configuration which defines which rules should be run and how often:
Action Type | Purpose |
---|---|
Hit policy | Setting that defines if you want to trigger action(s) only for the first matching rule (Single) or for all of them (Multiple) if their conditions are met. |
Aggregation window | The only value you cannot edit in the rule configuration window. It auto-populates from the Period value chosen for Function when creating a metric. It denotes how frequently a metric runs a given function (Count , Average , Max , or other) for data fields. |
Evaluation frequency | Lookback window for the rule that defines how frequently Illuminate should run rule(s) in this Decision. |
Conditions | Set of requirements you define on your own using the configuration table. This is where you define which conditions (and thresholds they meet) should trigger which actions. |
Decision rules order
Each row in the Decision table is a separate Decision rule which consists of conditions and actions. The order of the rules determines the order in which they are executed. If you want to change the existing order, select Edit Rules in a Decision and change the order using the Move up or Move down options under the Ellipsis (...) button next to each rule.
Additional details
To work effectively with Decisions, mind the following:
- Conditions on which a Decision is based are data fields populated automatically from the selected Metric. If you aggregate that data in the metric beforehand (for example, through
Count
orSum
options), this is how the conditions will be displayed. - You must select a Business Object and a metric to create or save a Decision. You can add actions and rules for the Decision afterward and then activate this Decision.
- To activate a Decision:
- You must have at least one action configured and one rule created.
- The Business Object the Decision relates to must be active.
- Once you activate the Decision:
- The rules start running and configured actions will be executed.
- You can edit Decision or action configuration (Edit Configuration) and related rules (Edit Rule).
- You can add new rules and actions to it.
- You cannot edit the metric that’s used in this Decision.
- You can see it in a Dashboard.
- If you no longer need the Decision, you can deactivate it. Deactivating a Decision means it will no longer be evaluated and executed.
Home page
The Decisions home page provides the list of created Decisions along with the following information:
- Number of configurations (actions) created for each Decision
- Activation status
Clicking the Ellipsis (...) button next to each item in the table lets you edit the existing configuration (actions) or rules, see action history, activate/deactivate, or delete a Decision.
Settings
Within the selected Decision view, Illuminate lets you edit the Decision and actions (Edit Configuration) or rules created for it (Edit Rules), activate/deactivate the Decision, or delete it.