Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
PersonalizeCloud Portal
Sitecore Personalize
        • Getting started
            • Use FreeMarker snippets
            • Test the API response
            • Use dynamic experience data
            • Use dynamic guest data
            • Use dynamic decision model data
        • Apply a condition
        • Apply a segment
        • Use a decision model
        • Run an experience
    • SitecoreAI experiences
    • Using the experience list
    • Manage experience details
    • Set up email notifications
    • View performance analytics
    • View operational data
    • Duplicate, delete, and view details
  • Using client-side JavaScript
  • Glossary
  1. Introduction to experiences
  1. Sitecore Personalize
  2. Introduction to experiences
  3. Introduction to interactive experiences

Compose the API response for an interactive experience

You must compose the API response to send data to your organization's website to correctly display the offer or content on your webpage. You can include the offer or content returned by a decision model in the API response.

When you compose the API response you must enter the parameters that your organisation's website requires in order to correctly display the offer or content. You can copy and paste dynamic data from the interactive experiment response into the API response. This is required if you want to use any parameters in the API response that are requested by the dependant website, such as "uri", "region", and "pointOfSale".

You can also compose the API response to include dynamic guest data in a variant. For example, you might want the variant for the interactive experience to include the guest's first name, location, loyalty number, etc. To do this, you must configure the variant to include the dynamic data so that when the variant executes, the server requests the dynamic data and passes it to your organisation's website.

To compose the API response for an interactive experience:

  1. In the API editor, on the API tab, compose the API response using FreeMarker.

    Composing the API response using FreeMarker
    Tip

    You can copy and paste dynamic data from the guest data model 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}.

  2. Click Save.

  3. Click to close the API editor.

    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.

If you have suggestions for improving this article, let us know!

© Copyright 2026, Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use