Skip to main content

Using server-side JavaScript in decisioning

Abstract

Provides an overview to using server-side JavaScript in decisioning in Sitecore Personalize.

You can create an experiment that uses a decision model to return the next best offer or next best action. If you create an experiment to do this and you want to run server-side JavaScript, you can apply a programmable decision when you create a decision model variant. A programmable decision is the component on the decision palette that you can click and drag onto the decision canvas to apply JavaScript.

For example, you might want to run server-side JavaScript to ensure you do not show an offer for a product that a guest has added to their cart. Alternatively, you might want to prioritize showing offers of items that have been added and then removed from their cart during the current session.

You do not have to be familiar with JavaScript to apply server-side JavaScript in a decision model. You can use a decision template, which is essentially a saved programmable decision created by a technical user. After you publish a decision template, you can drag and drop it onto the decision canvas. No code is required.