Expand my Community achievements bar.

Join us for the Community Q&A Coffee Break on May 2nd at 8 am PT with Adobe Journey Optimizer experts Robert Calangiu, Brent Kostak & Sandra Hausmann.
SOLVED

Unable to use purchase event contextual attributes in message

Avatar

Level 2

We are attempting to test functionality to send a follow-up SMS with info about their order to users who complete a purchase. We are using the current contextual event fields:

tksol95_1-1674242689757.png

Based on the following test payload for a simulated purchase event:

tksol95_2-1674242800844.png

In the SMS, the contextual fields for commerce.checkouts and webpagedetails.name are appearing, but no productListItems information appears:

 

tksol95_4-1674242954110.png

I found a similar thread that mentions "You can't use the timeseries data in the message. Check if the data is available in the dataset and the correct path for that data."

 

I am trying to understand if this is the problem that I am experiencing, and if so, how can I get productListItems information to show properly?

In addition, if my order were to contain multiple items (productListItems array has multiple elements), how do I display each element separately using contextual attributes?

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @tksol95 

 

ProductListItems is an array of objects. So you cannot directly pull the data in the content. You will have to use each method like this.

 

{{#each context.journey.events.1523932796.productListItems as |product|}}


{{ product.name }}   <!---  this prints the product name --->

{{/each}}

     Manoj
     Find me on LinkedIn

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hello @tksol95 

 

ProductListItems is an array of objects. So you cannot directly pull the data in the content. You will have to use each method like this.

 

{{#each context.journey.events.1523932796.productListItems as |product|}}


{{ product.name }}   <!---  this prints the product name --->

{{/each}}

     Manoj
     Find me on LinkedIn

Avatar

Level 2

Confirming that this format resolved my problem - @Manoj_Kumar_ thank you for the help.

 

Pasting the updated SMS script and output below for reference:

tksol95_0-1674582720380.png

tksol95_1-1674582750772.png

In order to use test mode with multiple productListItems array elements (e.g. multiple products) we had to make changes to the Code View of the Event Configuration, but this was a simple process to copy/paste and edit the previous element under productListItems