Friday, November 5, 2021

Sitecore CDP: Triggered Experience with decision model needs offers

 I was fortunate to be able to take Sitecore CDP training with Sarah O'Reilly (https://www.sitecore.com/products/customer-data-platform). There were a lot of interesting features in Sitecore CDP that we got to play with during this training. If you have a chance to take, do so, you won't regret it.

During day four of the training we ran into an issue when our triggered full stack experience was failing with "NO DECISION" message. The full stack experience used a decision model that simply returned a list of products in abandoned cart and had only one programmable that returned that list. Without a decision model the experience works fine and send the email, but if a decision model is added it fails.



After further investigation into the log for each failed execution it was clear that the experience is expecting the offers even though there were no offers to return. All we wanted to do is to generate a list of products in abandoned cart and send guest an email with the list of those products.

Clicking on the "View Log" brings back the details about a specific execution which allowed me to debug it further. As as you can see below the decision model returns results, and everything should be working, but it didn't. 


I figured why not to compare the executions without the decision models that succeeded with the ones with the model that are returning "NO DECISION". And I noticed that one particular property is null in the second case:



The next step was adding logging to my programmable. To do that I added "print()" statement to render the guest session details and made this variant of the decision model live. In the log property of my failed execution I started seeing values and one of those values was "status=ERROR, error=No offers returned, errorCategory=NO_DECISION".

I started suspecting that the experience expects to get some sort of offers from the decision model. So I added a decision model to the programmable that always returns an offer. It doesn't matter what the offer is as long as it is an offer. After I made that variant of the decision model live my triggered experience started working.

Sarah O'Reilly confirmed that while this limitation of Sitecore CDP was recently removed in interactive experience, it still exists in triggered one. Just something to be aware of.

No comments:

Post a Comment