Branches

Updated

Add branches to workflows to personalize campaigns for your audience. We offer three branch types that you can place anywhere in a workflow— a True/False Branch, a Multi-Split Branch, and a Random Cohort Branch. They appear on the left hand of your workflow under Flow Control.

The left hand menu of the workflows step of a campaign. Towards the bottom is a list of branches under the section title Flow Control.
The left hand menu of the workflows step of a campaign. Towards the bottom is a list of branches under the section title Flow Control.

 You can use JSON dot notation in condition logic

If you store attributes or event data in JSON objects or arrays, you can use JSON dot notation in your branch conditions to evaluate these properties. Use array[] to represent any item in an array or array[0] to represent the first item in the array. See Storing and using JSON for more information about dot notation in Customer.io.

True/False Branch

A true/false branch sends your audience down different paths based on conditions. Customers matching the conditions go down one path; customers who don’t match the conditions go down the other.

You can create a true/false branch based on:

  • profile attributes
  • segment membership
  • events
  • messages (like if a certain email has ever been clicked)
  • object attributes (only for object or relationship-triggered campaigns)
  • relationship attributes (only for object or relationship-triggered campaigns)
True/False Branch
True/False Branch

To add a True/False Branch to the workflow, drag it onto the canvas just like you would any other workflow item. You can insert them anywhere in the workflow.

When dropped into the workflow, the True/False Branch will have no conditions defined.

 Note: a True/False Branch with no conditions defined will default to false.

To define conditions, click on the branch in your workflow.

  1. Name your branch in a way that makes sense to you and your teammates.
  2. Then click the Add condition dropdown and choose to add an attribute, event, segment, or message condition. If you’re creating an object or relationship-triggered campaign, you can also add a relationship or object attribute condition.
  3. Define the details of the condition and click Add.
An image of the left-hand sidebar that appears after you click a true/false branch in a campaign workflow. The title at the top is: Edit true/false branch. A field under that reads Branch Name and has a value of: Premium user? Under that are the branch conditions. They read: plan_name is equal to the value premium. There is a button below that labeled Add. At the bottom of the sidebar is the button labeled Save.
An image of the left-hand sidebar that appears after you click a true/false branch in a campaign workflow. The title at the top is: Edit true/false branch. A field under that reads Branch Name and has a value of: Premium user? Under that are the branch conditions. They read: plan_name is equal to the value premium. There is a button below that labeled Add. At the bottom of the sidebar is the button labeled Save.

Follow the same process to add other conditions. Then click Save. When you hover over your branch, you’ll see the branch condition(s) you’ve set.

The mouse hovers over the the phrase, 1 condition, and a pop-up reveals the condition: Branch conditions plan_name is equal to premium.
The mouse hovers over the the phrase, 1 condition, and a pop-up reveals the condition: Branch conditions plan_name is equal to premium.

Multi-Split Branch

A multi-split branch lets you send people down paths based on one or more conditions:

  • profile attributes
  • segment membership
  • events
  • object attributes (only for object or relationship-triggered campaigns)
  • relationship attributes (only for object or relationship-triggered campaigns)

During a campaign, a person will flow down the first path they match moving from left to right. If they do not match any path, they will flow down the default “All others” path on the right.

A screenshot of the entire workspace window. Step 4 Workflow of campaign creation is selected at the top. The center of the page is the canvas of a campaign that at the top specifies the relationship attribute the campaign triggers on: role. This points down to a multi-split branch called Plan type which reads: split on trigger Account's plan_type. This points to three branches - the left branch reads: equal to legacy. The middle branch reads: equal to premium. The right most branch reads: all others. Each branch label points to a different email in the path.
A screenshot of the entire workspace window. Step 4 Workflow of campaign creation is selected at the top. The center of the page is the canvas of a campaign that at the top specifies the relationship attribute the campaign triggers on: role. This points down to a multi-split branch called Plan type which reads: split on trigger Account's plan_type. This points to three branches - the left branch reads: equal to legacy. The middle branch reads: equal to premium. The right most branch reads: all others. Each branch label points to a different email in the path.

To add a multi-split branch to the workflow, drag it onto the canvas just like you would any other workflow item. You can insert branches anywhere in the workflow.

By default, the multi-split branch has two, empty paths and a third “All others” path.

A screenshot of a multi-split branch on the canvas with no details yet. The branch label reads: no condition selected. There are three pathways. The ones on the left and middle read - inactive: no value added. The one on the right reads: all others.
A screenshot of a multi-split branch on the canvas with no details yet. The branch label reads: no condition selected. There are three pathways. The ones on the left and middle read - inactive: no value added. The one on the right reads: all others.

 A path with no conditions defined will default to false. In other words, people will always skip a path with no conditions.

To define path values, click on the branch, then edit the fields on the sidebar.

  1. Give your branch a Name.
  2. Choose the Data Type to split based on. The options change depending on the type of campaign trigger. You can only use event attributes for even-triggered campaigns. Similarly, you can only use object or relationship attributes in campaigns triggered by objects or relationships.
  3. Define your paths - choose your attributes or segments. Add more paths if you need.
    A screenshot of the entire workspace window. On Step 4 Workflow of campaign creation, an empty, multi-split branch is selected on the canvas. An arrow points to a panel on the left. Branch details have been added on the panel. The branch name is Plan type. The data type Account is selected. The object attribute specified is plan_type. The paths split based on this attribute. At the bottom of the panel, path 1 is set equal to the value legacy. Path 2 is set equal to the value premium.
    A screenshot of the entire workspace window. On Step 4 Workflow of campaign creation, an empty, multi-split branch is selected on the canvas. An arrow points to a panel on the left. Branch details have been added on the panel. The branch name is Plan type. The data type Account is selected. The object attribute specified is plan_type. The paths split based on this attribute. At the bottom of the panel, path 1 is set equal to the value legacy. Path 2 is set equal to the value premium.
  4. Click Save and you’ll see the paths on your canvas update to match.
A screenshot of the entire workspace window. Step 4 Workflow of campaign creation is selected at the top. The center of the page is the canvas of a campaign that at the top specifies the relationship attribute the campaign triggers on: role. This points down to a multi-split branch called Plan type which reads: split on trigger Account's plan_type. This points to three branches - the left branch reads: equal to legacy. The middle branch reads: equal to premium. The right most branch reads: all others. Each branch label points to a different email in the path.
A screenshot of the entire workspace window. Step 4 Workflow of campaign creation is selected at the top. The center of the page is the canvas of a campaign that at the top specifies the relationship attribute the campaign triggers on: role. This points down to a multi-split branch called Plan type which reads: split on trigger Account's plan_type. This points to three branches - the left branch reads: equal to legacy. The middle branch reads: equal to premium. The right most branch reads: all others. Each branch label points to a different email in the path.

Split based on people’s attributes

To split based on the value of a single attribute, click ‘Attribute’ in the ‘Choose type’ dropdown. Select the attribute you’d like to split on in the ‘Attribute name’ dropdown that just appeared. And finally, enter the values of the attribute that you’d like to split on in each of the ‘Path’ text fields. To add another path, click the ‘Add’ button. Click the ‘is equal to’ dropdown if you’d like to split based on a range of values.

 Note: splits are evaluated from left to right, so make sure your conditional logic works in that order.

branching_multi-split-attribute-conditions-2
branching_multi-split-attribute-conditions-2

Add up to 20 paths if wanted and click ‘Save’ to save the paths and collapse the sidebar.

Split based on event attributes

 Note: This option is only available for campaigns triggered by events.

To split based on the value of an event attribute, click ‘Event attribute’ in the ‘Choose type’ dropdown. The event that triggered the campaign will appear in the group box along with a text field to specify which event attribute you would like to split on. Enter the event attribute name in the text field. Finally, enter the values of the event attribute that you’d like to split on in each of the ‘Path’ text fields. To add another path, click the ‘Add’ button. Click the ‘is equal to’ dropdown if you’d like to split based on a range of values.

 Note: splits are evaluated from left to right, so make sure your conditional logic works in that order.

branching_multi-split-event-conditions-3
branching_multi-split-event-conditions-3

Add up to 20 paths if wanted and click ‘Save’ to save the paths and collapse the sidebar.

Split based on object or relationship attributes

To split based on the value of a single object or relationship attribute, click “Object type name” or “Relationship” from the Data Type dropdown. Select the attribute you’d like to split on. Then enter the value for each pathway. To create another path, click Add.

 Note: splits are evaluated from left to right, so make sure your conditional logic works in that order.

Object attribute

This shows the sidebar for a multi-split branch based on an object attribute. At the top, the name of the branch is Plan type. Under that, the data type of Account is selected. Under that, the attribute plan_type is specified. Below that are the paths. Path 1 is set equal to the value legacy. Path 2 is set equal to the value premium.
This shows the sidebar for a multi-split branch based on an object attribute. At the top, the name of the branch is Plan type. Under that, the data type of Account is selected. Under that, the attribute plan_type is specified. Below that are the paths. Path 1 is set equal to the value legacy. Path 2 is set equal to the value premium.

Relationship attribute

This shows the sidebar for a multi-split branch based on a relationship attribute. At the top, the branch name is Role. Under that, the data type of Relationship is selected. Under that, the attribute is defined as: The current person is related to the triggering object where their relationship role. Below that, the paths are split based on the relationship attribute role. Path 1 is set equal to admin. Path 2 is set equal to manager.
This shows the sidebar for a multi-split branch based on a relationship attribute. At the top, the branch name is Role. Under that, the data type of Relationship is selected. Under that, the attribute is defined as: The current person is related to the triggering object where their relationship role. Below that, the paths are split based on the relationship attribute role. Path 1 is set equal to admin. Path 2 is set equal to manager.

Add up to 20 paths if wanted and click Save to save the paths and collapse the sidebar.

Split based on segment membership

To split based on a segment match, click ‘Segment’ in the ‘Choose type’ dropdown. Select the segment that you’d like to split on in each of the ‘Path’ dropdowns. To add another path, click the ‘Add’ button.

Multi-Split Branch segment conditions
Multi-Split Branch segment conditions

Add up to 20 paths if wanted and click ‘Save’ to save the paths and collapse the sidebar.

Random Cohort Branch

The Random Cohort Branch will randomly distribute people down its paths based on the percentage allotted.

branching_random-cohort-branch
branching_random-cohort-branch

To add a Random Cohort Branch to the workflow, drag it onto the canvas just like you would any other workflow item. Branches can be inserted anywhere in the workflow.

When dropped into the workflow, the Random Cohort Branch will have two paths. These will default to be split 50/50 when placed in an inactive campaign. For an active campaign, one path will default to 100% and the other to 0%. This allows you to edit the 0% path without people flowing through it right away.

To add paths or change the distribution, click on the branch item just placed. The sidebar for editing items will appear. Click the ‘Add path’ button for a new path. The new path will default to 0% unless you’ve previously set the paths to be evenly distributed by clicking the ‘Distribute evenly’ button. To modify the distribution of each path, use the sliders or text inputs next to the sliders. The total distribution must add up to 100% before changes can be saved.

branching_edit-random-cohort-branch
branching_edit-random-cohort-branch

 Note: the distribution of people into each path is truly random. This means that for small sample sizes, the distribution of people might not be exactly what was set. The larger the sample size, the closer to the exact distribution of people it will become.

Add up to 20 paths if wanted and click ‘Save’ to save the changes and collapse the sidebar.

Exit Block

Exit blocks allow you to force a set of users who are following a given path to exit the campaign wherever you place the Exit block. Exit blocks can be placed anywhere in a workflow that will not orphan another workflow item. In other words, they can only be placed at the end of a branch.

Let’s assume that you have a Multi-Split Branch configured to send to anyone whose favorite color is red, yellow, or blue, but you want to make sure that everyone else does not receive messages from this campaign. Drag an Exit block into the ‘Everyone else’ branch and anyone who does not match red, yellow, or blue will flow down the ‘Everyone else’ path and exit the workflow.

Add an Exit block

Delete an Exit block

To delete an exit and reconnect the path to the workflow, click the Exit block and click the ‘Delete’ option that appears.

Delete button for an Exit block
Delete button for an Exit block

The ‘+’ icons will appear in all the places that the path can be reconnected to its parent branch. Click one of the reconnect points.

Delete an Exit block

Moving branches

Branches can be moved like any other items in the workflow. Every item on all branch paths will move along with the branch. In other words, everything between the branch block being moved and the place where all paths reconnect will move together.

Move branch

Moving delays

If a branch contains a delay that currently has people waiting in it, the people will be moved with the delay. You will get a warning before completing the move when there are people waiting in a delay that is being moved.

Deleting branches

Branches cannot be deleted until all items in the branch have been removed from it. If you need to delete a branch, first delete or move all items on every one of the branch’s paths. Then, click the branch and click ‘Delete’ in the lower-left corner of the sidebar.

Copying branches

You can copy branches like any other workflow item by clicking Copy workflow items from… at the top of the the build menu. Decide which blocks to copy into your campaign. Select a T/F branch and its items by clicking the branch or clicking then dragging on the canvas to highlight what you want to copy.

After you click, Copy workflow items from..., a large modal appears on screen showing the workspace you're in and a dropdown at the top to select a campaign you want to copy from. The canvas of a campaign appears and a true/false branch is highlighted with a blue border along with the blocks within the branch.
After you click, Copy workflow items from..., a large modal appears on screen showing the workspace you're in and a dropdown at the top to select a campaign you want to copy from. The canvas of a campaign appears and a true/false branch is highlighted with a blue border along with the blocks within the branch.
Copied to clipboard!
  Contents
Is this page helpful?