Tests and Actions
Tests and actions are a way of building logical behaviours into your button matrix. The idea is that the selection of fields and/or buttons which are visible (and/or available to be selected), can be contingent on the value of fields elsewhere in the profile. The section for adding or editing Tests and Actions is below the ‘Datapoints and UTMs’ section of the editing suite.
JPEG
There are four distinct types of actions which can be triggered:
Disable Buttons, Enable Buttons, Hide Fields, Show Fields.
JPEG
In order to trigger any of these actions to happen, there are two conditions which must be met:
1) At least ‘actionable’ is required. The ‘hide fields’ action cannot happen unless you specify at least one field to be hidden. This concept holds for the other three types of action as well.
JPEG
2) A criterion must be specified and met. This is why tests are necessarily paired with actions. A test must be reducible to a boolean. If a test is well designed, it should be ‘sometimes true’ – the truth of the boolean should depends on which values in the field are selected, and hence the action should sometimes be triggered, and sometimes not be triggered.
JPEG
This allows dynamic, logical behaviours in the button matrix. For example, we might consider a situation in which I have two teams using my profile: My CRM team and my social media team. My CRM team exclusively use, let’s say, Email and Newsletter as the source of clicks, while the social team exclusively use Instagram and Facebook as their source of clicks. I don’t want a member of my CRM team clicking a source associated with my social team, or vice-versa. I will use tests and actions to prevent this from happening. At the top of my profile, I will have a field for specifying my team, with two buttons: CRM and Social. (This field may be associated with its own datapoint, if I wish, but that does not have to be the case).
I will create a test and action, which will disable the buttons ‘Instagram’ and ‘Facebook’ from the ‘source’ field when the ‘Team’ field’s value is ‘CRM’.
JPEG
Additionally, I will create a complementary test and action: I will disable the buttons ‘Newsletter’ and ‘Email’ when my team is set to ‘Social’.
JPEG