Use FreeMarker snippets in an API request for a web experiment
Sitecore Personalize provides you with FreeMarker snippets that you can copy and paste into the API request. For example, if you selected a decision model to return offers or content, you must include the offers or content in the API request using FreeMarker.
To copy and paste FreeMarker snippets in the API requeste:
-
In the code editor, click the API tab.
-
On the Snippets tab, browse the available FreeMarker snippets that you can copy and paste into the API tab.
-
Click the Copy link next to the code snippet that you want to copy.
-
Paste the code snippet into the API tab.
-
You must then reference this data again by pasting it into the relevant HTML, CSS, or JavaScript editor.
-
Click Save.
-
Click to close the code editor.