0

When creating a full stack experience (or experiment) in Sitecore Personalize, I need to write FreeMarker either an API Response or Webhook. What is FreeMarker?

1 Answer 1

0

Full Stack Triggered experience/experiment

When you create a full stack Triggered experience/experiment, the Webhook Composer allows you to design the payload that will be sent to your destination (e.g. email service provider) when your triggered experience is executed.

Full Stack Interactive experience/experiment

When you create a full stack interactive experience/experiment, the API Response allows you to design the response that will be returned when a request is received for your interactive experience.

FreeMarker

In the Webhook Composer/API Response section of the experience build, the payload is shown in JSON and starts an empty body (i.e. with {}) . To add dynamic fields, such as data from the CDP or from a decision model, a markdown language called FreeMarker is used. For details on FreeMarker see: https://freemarker.apache.org/

Resources

To help you create the payload, use the panel on the right-hand side of the Webhook Composer/API Response screen. In this panel there are three tabs:

  1. Data: This tab allows you to search for a guest in the Sitecore CDP and see all the data in the CDP against this guest. For each of these fields there is a copy button where the fields can be copied as FreeMarker. Once a field is copied as FreeMarker it will be dynamically populated when the Full Stack Experience is executed. The data tab also shows the data from any decision models connected to the experience and the payload of the experience you are developing. If your response is not returning valid JSON an error will also be shown in this tab.

  2. Snippets: This tab displays library of helpful FreeMarker code snippets that you can copy into your payload. Snippets are particularly helpful when using decision models with your Full Stack Experience.

  3. Help: This tab gives links to the documentation and helpful advice.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.