Usage
Last updated
Last updated
The flowchart below illustrates a user journey on your website, where user identity and behavior are processed to retrieve cluster data and display a personlized PLP ranked with AI scored depending on the implementation method.
The AI Score cluster that the user is assigned to will change as the user performs activities on the site.
As a cluster may expire during a user session, the version of the user cluster (designated by the generation timestamp) must be aligned with the version of the displayed clusters.
Depending on whether you're using the API or the SDK, you can retrieve clusters as follows:
When implementing tracking the response of the activity call will look as follows:
Retrieve the Cluster of the user with following call:
GET
https://collect-eu.attraqt.io/:trackerKey:/users/:idRepository:/:id:/clusters
Path Parameters
trackerKey*
string
Your account/tenant tracker key. Example: f5c09cdc-5c02-4520-8293-b1b12f44f417
idRepository*
string
The identity repository you are using to identify the user.
Example: sessionid
id*
string
The id of this user for this identity repository.
Example: 5a664160-784e-444c-a6d3-337a2d4af0a6
Example response:
Fore more information on the various types of identity repositories, see here.
AI Scores are versioned to prevent shopper/cluster mismatches when a new update has been processed. Cluster objects returned by activities or by calling the cluster API contain two generation timestamps. Each timestamp has an associated cluster value.
When the front-end generates the query string request to Fredhopper, it should use the cluster ID for the model version that matches that in the local ‘current model version’ variable.
A new display field will be enabled on the published endpoint which the front-end can use to determine the current cluster value (Epoch timestamp) that is loaded and should be used.