Looking for an expert in Message Templates . . . I am aware of the notion of including interpolated values from a message event payload in the form of {*PayloadEntriesName.DataItemName*}. What I need is the ability to have a list of data in the message body.
Use case: Background job runs and generates a number of workflow controlled pick waves in WMS (Cloud Inventory) some of which could go to Failed Release workflow state. When the wave generation background job wraps up, I want to gather a list of all waves that failed to release and send a single email with that list of failed waves and some details about the failure reason.
Can a message event payload have multiple data rows? Does the {*PayloadEntriesName.DataItemName*} syntax naturally result in multiple rows of data from the payload being present in the final message output?
While Nextworld Message Templates do not currently support multiple rows of data dynamically (based on input), you can still achieve this desired outcome using a single text string in your payload.
I’ve found that using a logic block to concatenate the desired data into a single text string, and leveraging html code directly in the logic block actions, produce this outcome when you use the same notation you have above {*ConcatenatedTextString*} in the template of the email body.
@maggie.pinkston do you have some examples of html code / logic block actions that you have used to format the concatenated text string and have a new line for each “row” of data that you want in the resulting message body?
Yes! Below are a few examples of different logic block actions you can use to leverage html formatting and Nextworld Message Templates. You can also find html generators online to provide examples of different formats (You’ll need to add opening/closing chevron brackets to the code for formatting to be picked up)
You can go with a more simple list:
Record1
Record2
ul><li>Record1</li><li>Record2</li></ul
Or you can add some html formatting to give the appearance of a table: