Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
PersonalizeCloud Portal
Sitecore Personalize
  • Using client-side JavaScript
    • Using JavaScript in decisioning
    • Understanding data limits
    • Understanding sessions and events
  • Glossary
  1. Using server-side JavaScript in Sitecore Personalize
  1. Sitecore Personalize
  2. Using server-side JavaScript in Sitecore Personalize
  3. Using server-side JavaScript in decisioning

Using server-side JavaScript in decisioning

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.

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