Including print statements in programmable decisions


Provides the benefit of including print statements in a programmable decision (Sitecore Personalize).

It is a best practise to include print statements in a programmable decision. Later, when you test the decision model variant you can view the results of the programmable decision on the Logs tab. This is very useful for checking that any functions and other code is working as expected. The following image shows the addition of three print statements, which prints the guest's gender, city, and guestType when you test the decision model variant.


The following image shows the guest's gender, city, and guestType printed on the Logs tab during testing.