Create a Rule

A rule allows you to create sophisticated logic that matches the right content to the right user. There are two types of rules: You can create Basic rules using a simple user interface, or Custom rules using your own Zephyr code.

To create a rule using the SPM Rule Builder

  1. From the SPM menu, select Rules.
  2. From the drop-down next to Add Rule, select Basic or Custom, then click Add Rule.

Create a Basic Rule

  1. Enter a Name for the rule.
  2. Choose an Algorithm that will be used to select the content from your feed or Content Library; content which can be unique for each user for whom your section is viewed.
  3. For algorithms that do not require a feed (and can source content directly from your Content Library), you’ll have the option to Restrict Content to Feed.
  4. Should your primary algorithm not return the desired number of recommendations, your Fallback Algorithm will be used to ensure the desired amount of content is provided.
  5. Enter the Number of Recommendations that should be produced.
  6. Under Content to Remove, if you want to include as possible recommendations the items that the user has already purchased, deselect Purchased Items.
  7. To view the Zephyr code produced by the rule, click View Zephyr.
  8. Click Save.

Create a Custom Rule

  1. Enter a Name for the rule.
  2. Enter custom Zephyr code. Be sure to include the personalize() function to retrieve content from your Content Library or feed, and produce a content array named recommendations, which will be available for use by the Zephyr in your HTML template or returned as JSON.
  3. Click Save.
Top