Feature Rule Options
Use this guide to understand the different option available to you when creating a Feature Rule within the Zephr Feature Rule Builder.
The options that make up a potential rule are broken down between Segments, and Transformations. Segments allow you to determine who the rule applies to, and transformations specify the resulting outcome of the rule.
The following Segments available within a Feature Rule are:
User Segments
- User Field: Allows you to segment users based on User Schema information stored within their profile. Note: this requires user attributes to be set up within Zephr, and site users to be stored in the Zephr Identity Store.
Session Segments
- Logged In: For rules based on whether a user is logged in, or not.
- Partially Registered: For rules based on whether a user is partially registered, and needs to complete their registration process.
Content Segments
- URL: Define rules based on a specific URL or URL path.
- Published Date: Define rules that are older or newer than a certain time period (in hours)
- Meta Tags: Define rules for specific meta tags and values.
Request Segments
- Device Type: Define rules for users of specific devices – desktop, mobile, appliances, or crawlers.
- Verified Crawler?: Define rules specifically for verified crawlers, such as Googlebot.
- Referrer: Define rules based on a user’s referrer.
- User Agent: Define rules for users based on user agent.
- Browser: Define rules for users based on the browser they are using.
- JWT Token: Define rules for specific JWT tokens
- Country: Define rules for users browsing in specific countries.
Time Segments
- Date/Time: For rules required before or after a specific date and time, with the ability to choose a particular time zone, or to use the local time of your user.
- Date/Time Range: For rules required during a specific date and time period, with the ability to choose a particular time zone, or to use the local time of your user.
- Time: For rules required before or after a specific time of day – e.g. Before 6am, every day – with the ability to choose a particular time zone, or to use the local time of your user.
- Time Range: For rules required during a specific time of day – e.g. 6am-8am, every day – with the ability to choose a particular time zone, or to use the local time of your user.
A/B Test Segments
- A/B Test: Used to create a rule variation based upon an A/B Test Group, as set up via Settings > A/B Tests.
Entitlement Segments
- Entitlement: Used to make decisions dependent on the presence of a specific entitlement – e.g. If user has x entitlement, do y.
- Meter Count: Used to determine outcomes dependent on a user’s meter count – e.g. If user has x views remaining, do y.
- Credit Count: Used to determine outcomes dependent on a user’s credit count – e.g. If user has x credits remaining, do y.
- Bundle Granted: Used to determine outcomes based upon whether a user has a particular bundle granted – e.g. If user has x bundle, do y.
Advanced
- Multiple Choice: Multiple Choice allows you to create a more simple rule when you want to make variations based on particular segments. For example, if you add Multiple Choice to your canvas, and then drag Device Type into Multiple Choice, you will be able to choose multiple Device Types for your rule, and specify differing outcomes accordingly.
- OR: Decision point to branch a rule depending on whether a user one of a series of options – e.g. having the Article Entitlement OR the Trial Entitlement. Add OR to your canvas, and then drag in the relevant segment. Following this, you will be able to set your segment details.
- AND: Decision point to branch a rule based upon a user meeting a series of criteria – e.g. having the Article Entitlement AND the Trial Entitlement. Add AND to your canvas, and then drag in the relevant segment. Following this, you will be able to set your segment details.
- Custom Decision: Allows you to write a custom script for use as a custom decision point.
The following Transformations are available within a Feature Rule:
Transformations
- No Transformation: Allows access to the content being served by the CMS – no changes will be made.
- Remove: Strips the content wrapped within the relevant Zephr tags.
- Truncate: Allows you to create a lead-in/cut content based upon a set number of words.
- Hosted UI Component: Allows you to add a UI component that is being hosted outside of Zephr, to display in place of transformed content.
- UI Component: Allows you to choose a UI component, hosted in Zephr, to display in place of transformed content. Note: You will need to have created a UI Component in order to see this option.
- Form: Allows you to choose an out-of-the-box Zephr form to display in place of transform content. Note: you will need to have created a Form in order to see this option.
Advanced
- Concatenate Transforms: Allows you to add multiple transformations to a single rule outcome. Drag in Concatenate Transforms and then drag other transformations on top of it. For example, Truncate, then a Form to cut an article after 100 words, then display a registration wall.
- Add to UI Component Scope: Allows you to add a Scope Variable and Value to be used in a UI Component.
- Run Custom Script: Allows you to set a custom script to be run when a decision reaches that point of your rule.
Feature Rules also allow you to create Sub-Rules and Sub-Branches within them:
Sub-Rules
- Run Branch: Allows you to create a Sub-Branch within the current rule.
- Run Sub-Rule: Allows you to create a Sub-Rule within the current rule.
- Run Global Branch: Allows you to choose a globally created Feature Sub-Branch, and choose the version applicable to your Feature rule.
- Run Global Sub-Rule: Allows you to choose a globally created Feature Sub-Rule, and choose the version applicable to your Feature rule.
Note: Read our guide to Sub Rules for more information.