Skip to main content

Sub Rules


Sub Rules

A Zephr Sub Rule allows you to add additional complexity to your rule, without taking up additional space on the canvas. They group complex series of decisions and can as the endpoint/outcome of your rule or connect to other decision points within your main rule canvas.

Common use cases include grouping decisions used for user segments or bucket tests of users and grouping decisions used for determining template redirect variables.

The following tutorial walks through how to create a basic sub rule, for an advanced use case, see the Simplify User Journeys with Sub Rules section.

Creating a Sub Rule in a Feature or Redirect

Sub Rules can be used in both Features and Redirects, and are implemented in the same way across each. For this example, we’ll use a Feature rule for Articles.

Navigate to (or create) the Feature you wish to add the Sub Rule to.

Select Sub Rules, then drag the Sub Rule node onto your rule canvas.

Sub Rule Name

Start by giving your Sub Rule a title. This will be shown as a label to your Sub Rule node within the rule, so give it a recognisable name.

Sub Rule Canvas

Saving your Sub Rule’s title will load a fresh rule canvas, specifically for the Sub Rule. You’ll know you’re in this, as the Page View node is replaced by a Start Sub Rule node, and you’ll find a pink Done button in the top right of the canvas.

Sub Rules - Canvas

Output Options

The Sub Rule canvas has all the same decision points as a regular rule, so complete your rule as required.

If you wish the rule to end within the Sub Rule, add the relevant Outcome as usual.

If you wish to connect your Sub Rule to further decisions in your main rule, select Sub Rules, then Output Option.

Output Option allows you to add additional outputs to your Sub Rule, which then display on your main rule canvas.

For example, in our social sampling rule, users who have been referred from Facebook enter a trial to get one free view of content per day. Users within the trial will see the full piece of content (in this case Article Content), so their journey ends within the subrule.

Sub Rules - Complete

However, users who have not come via Facebook may be eligible for other decisions, so we have added a ‘Non Social’ output to link their journeys back to the main rule.

Connecting Your Sub Rule

Once your you’ve completed your Sub Rule, click Done, and you’ll be navigated back to your main rule canvas.

Sub Rules - Outputs

Here you will see your Sub Rule in pink. If you have not added any Output Options, your rule will end here. If you have, you will see the Outputs on your Sub Rule node, and can connect them to further decisions and outcomes accordingly.