Troubleshooting programmable decisions

Abstract

How to troubleshoot the JavaScript syntax programmable decisions.

Sitecore CDP helps you validate the syntax of the code in the programmable decision by providing you with a Validate button. It is best practice to periodically click the Validate button as you write the programmable decision, not just before saving.

You can still troubleshoot a programmable decisions even though the code syntax is correct. To facilitate this, make sure to include print statements in the programmable decision.

Later, when you test the decision model variant you can view the results of the programmable cecision on the Logs tab. This is very useful for checking that any functions and other code is working as expected.