SPM

Site Recommendations is a personalized area of your site that may exist across any number of pages.

For each section, you will specify:

  • A content feed and rules written in the Zephyr language to select and prepare content from the feed, for example, to filter by tag and request user-specific content recommendations.
  • A template or JSON object name.
    • If you choose to receive a JSON object of feed items, you can present the content using your own JavaScript code.
    • If you want the system to render the HTML for the section, specify template code (using Zephyr, HTML, CSS, and/or JavaScript) along with the ID of the HTML div on your page where the content will be displayed.
  • One or more optional section audiences, to vary the feed, rules, and/or template based on whether the viewer is part of a particular user list. Each audience is assigned a unique list, chosen from the lists in your account. If no audience is matched, default section parameters are used.
Each template and set of rules is stored as a string in its own block object. Blocks are referenced by sections and can be reused across multiple sections.

Personalization Engine Section Data Structure

Users of my.sailthru.com can configure sections and their attributes through the site. As a developer, you can also do this using Site Personalization Manager’s block and section API endpoints.

block

MethodDescriptionParametersResponse
GETGet all blocks’ data (excluding content)required: noneArray of block objects:
[
  { 
    "id":<string>,
    "name":<string>,
    "type":<string>,
    "create_time":<string>,
    "create_user":<string>,
    "modify_time":<string>,
    "modify_user":<string>
  },
  {...}
]
GETGet all data for a blockrequired: id: <string>
{
  "id":<string>,
  "name":<string>,
  "type":<string>,
  "content":<string>,
  "create_time":<string>,
  "create_user":<string>,
  "modify_time":<string>,
  "modify_user":<string>
}
204: if the block ID does not exist 404: if client ID does not exist or block ID is malformed
POSTCreate a blockrequired: name: <string> type: <string>
  • setup (i.e. rules), html (template), or json
content: <string>
201 (created) 400/500 (on failure)
PUTUpdate a blockrequired: id: <string> optional : name: <string> type: <string>
  • setup (i.e. rules), html (template), or json
content: <string>
204 (on success) 400/500 (on failure)
DELETEDelete a blockrequired: id: <string>

section

MethodDescriptionParametersResponse
GETGet the array of all sections’ data excluding audience data (list, feed, blocks)required: none
{
  "id": ,
  "name": ,
  "create_time": ,
  "create_user": ,
  "modify_time": ,
  "modify_user": 
}
GETGet all data for a sectionrequired: id: <string>
{  
  "id":,
  "name":,
  "audiences":[  
    {  
      "list_id":,
      "feed_id":,
      "blocks":[  
        {  
          "block_id":
        },
        {  
          <additional blocks>
        }
      ]
    },
    {  
      <additional audiences>
    }
  ],
  "create_time":,
  "create_user":,
  "modify_time":,
  "modify_user":
}
POSTCreate a sectionrequired: name: <string> audiences: <array>201 (created) 400/500 (on failure)
PUTUpdate a sectionrequired: id: <string>optional : name: <string> audiences: <array>204 (on success) 400/500 (on failure)
DELETEDelete a sectionrequired: id: <string>204 (on success; no content returned) 400/500 (on failure with error message(s) returned)
{
  "errormsg": <messages>
}