Rule Template Library
Rule Template Library allows you to create rule templates that can be easily re-used in your rules. When adding a template to a rule, you can modify the template based on the specific business need. This feature helps reduce the efforts for creating multiple rules or sub-rules that are similar to each other.
Templates can be used in all types of rules, including Feature, Redirect and Dynamic Offers.
The following example demonstrates a use case where a rule template can be used:
In the above example, Branch 1 and Branch 2 are two subsequent rules of a split test node. With Rule Template Library, you don't need to manually create the same rules twice. Instead, you only need to create a rule template and then connect it to the split test node. You can update the template for each branch.
You can create and manage your rule template from Settings > Rule Template Library.
When setting up rules for a feature, you can add existing rule templates to the rules.
Create and manage rule templates
Take the following steps to create a rule template:
- Navigate to Settings > Rule Template Library.
- Click + Add A Rule Template.
- Enter a title and description for the template.
- Select the rule builder type that fits the feature from the drop-down list.
- Create a template on the Rules Builder canvas. For more information about how to work with Rules Builder, see Get Started with Rules Builder. Note: To ensure that templates can work for different rules, you can only add output options to the template. Later when setting up specific rules, you can connect the template output options with specific outcomes or subsequent rules.
- After the template is set up, click Save Rule Template.
Tip: You can adjust the size of the canvas using the Zoom In/Out and Full-screen buttons in the lower right corner.
On the Rule Template Library page, you can preview the templates that are created. You can also edit, clone or delete templates.
Use rule templates in your rules
A rule template is added to the Rules Builder canvas as a Rule Template node. You can use the template to form rules. When adding a template to a rule, you can modify the template to satisfy the specific need.
Take the following steps to add a template to a rule:
- On the Rules Builder canvas of your rule, click Template Library in the lower right corner.
- Hover over the template that you want to use, then click Use. The Rule Template node is added to the canvas.
- The output options will be displayed under the Rule Template node. You can connect subsequent rules to each option.
Below is a simple example of a rule that contains a template:
-
To edit the template, double click the template node and then click Edit. Note that editing a template for a rule will not change the template itself.
Tags recommended by the template: article:topic-guide