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
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”.
API
When an API supports targeting, the sent JSON should define a targeting property that follows the following structure:
Property | Type | Description |
---|---|---|
{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 |
groups | string[] | 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:
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”