Skip to content

Targeting payloads

Targeting in ahead

The majority of content on ahead can be targeted to specific users. Targeting is based on defining a template that can contain

  • user groups
  • possible property values
Targeting concept in ahead

A user gets to see ahead content when they have at least one match in all defined kinds of targeting values.

The properties that can be used are the ones listed in the “Advanced target audiences” section in the “Company settings”.

Advanced targeting in the ahead administration

API

When an API supports targeting, the sent JSON should define a targeting property that follows the following structure:

PropertyTypeDescription
{property}string[]Any user property that is being targeted. If the user has any of the values listed here, the document will be used as a source to create an answer
groupsstring[]Known as predefined groups in ahead, if the asking user is a member of the group, the document will be used as a source to create an answer.

Usually the targeting-property is optional. If it is missing, we assume that the content is meant to be seen by all of the company.

Example

When an API supports targeting, this would be a valid example of targeting:

{
...
"targeting": {
"city": ["Atlanta", "Miami"],
"groups": ["476c46e5-0165-4afb-b0c7-563b56db93d5"]
}
}

Content associated with this target will be visible to users, who

  • belong to the group identified by the provided id AND
  • whose “city” property is either “Atlanta” OR “Miami”