- Manage headless experiences
Request and render a headless experience
Feature availability is part of a phased rollout. Your organization may not see this functionality yet. It will become available when your environment is included in the rollout.
When your application runs a headless experience, it sends visitor and request information to SitecoreAI. SitecoreAI evaluates the request and returns the configured response for the personalization or assigned A/B/n test variant.
Your application uses the returned values to render the experience.
Request the experience
A request can include the following context:
| Field | Purpose |
|---|---|
clientKey | Identifies your tenant |
channel | Identifies the channel making the request |
browserId | Identifies an anonymous visitor |
identifiers | Identifies a signed-in visitor |
language | Identifies the visitor's language |
currencyCode | Provides the relevant currency |
pointOfSale | Identifies the site or property |
uri | Identifies the current page or screen |
params | Provides additional context for the response |
For signed-in visitors, use identifiers rather than relying only on browserId.
The information you provide depends on the integration method. For example, an SDK can reuse visitor or site information that was provided during initialization.
Render the response
SitecoreAI returns the configured API response for the personalization or assigned A/B/n test variant.
Use the returned values to render the experience in your application.
For example:
Your application controls how and where the experience is displayed.
Handle an empty response
If SitecoreAI returns no response, for example because the visitor does not qualify or the service is unavailable, display your application's default content.
For applications with intermittent connectivity, request the experience while connectivity is available and store the response locally as appropriate. Responses are not cached on the device automatically.
Next step
To implement the request, run the headless experience using the integration method that matches your application.