Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
PersonalizeCloud Portal
Sitecore Personalize
        • Getting started
        • Using traffic allocation and variant traffic assignment
        • Target a webpage
        • Apply a condition
        • Apply a segment
        • Use a decision model
            • Use FreeMarker snippets
            • Test the API request
            • Use dynamic experiment data
            • Use dynamic guest data
            • Use dynamic decision model data
    • SitecoreAI experiments
    • Using the experiment list
    • Manage experiment details
    • Set automated post-test actions
    • Set up email notifications
    • Duplicate, delete, and view details
  • Using client-side JavaScript
  • Glossary
  1. Introduction to web experiments in Sitecore Personalize
  1. Sitecore Personalize
  2. Introduction to experiments in Sitecore Personalize
  3. Introduction to web experiments in Sitecore Personalize
  4. Use dynamic decision model data in the API request

Use dynamic decision model data in the API request

If a web experiment is configured with a decision model, you must include offers or content from the decision model in the API request. On the Data tab, you can copy an attribute or path from the decision model response and paste it in as FreeMarker into the API editor. For example, you can copy Offer name and Offer URL and paste them into the API editor window.

To include dynamic decision model data in the API request:

  1. In the code editor, click the API tab.

  2. On the Data tab, in the Data selector search box, enter a guest's email address or other identifier to search. This enables you to access data model attributes and paths.

    Tip

    If there is a guest whose data you often use when configuring or testing code, click the star icon to bookmark the guest so you no longer have to search for them.

  3. Under Decision Model Response, click Copy icon next to the attribute or path and click Copy Path as FreeMarker.

    Copying attributes from the decision model response
  4. Paste into the API tab.

  5. You must then reference this data again by pasting it into the relevant HTML, CSS, or JavaScript editor.

  6. Click Save.

  7. Click to close the code editor.

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