Compose the API response for an interactive experiment

Abstract

Provides details of how to compose the API response for an interactive experiment (Sitecore Personalize).

You must compose the API response to send data to your organization's website to correctly display the offer or content on your webpage. The API response enables you to include dynamic data from the guest data model, decision model response, experience response, and more.

To compose the API response for an interactive experiment:

  1. Create an interactive experiment.

    interactive_api.png
  2. Compose the API response using FreeMarker.

    Tip

    You can copy and paste dynamic data from the guest data model, experiment response, and decision model response, as required. You can also type directly in the API editor to replace parts of the response with context attributes such as ${guest.firstName}.

  3. Click Close. You return to the Build screen.

    Notice

    We recommend that you set a timeout of 600 milliseconds on our system's response to cover 100% of our response times. This does not include any latent network time in communicating with our servers. You should take into account the location of the client servers which differs per client. All timeouts that you set for clients that depend on API responses should be adjusted accordingly, for example, UI rendering of dynamic offers.