Friday, 18 December 2015

Rendering transaction data in Adestra MessageFocus

I found myself doing this today, and it didn't go without some problems. I thought I'd document the outcome. Here's the data we're sending to the API: and here's the rendering logic in the email:
[*transaction.customer_first_name*] [*transaction.customer_last_name*]
[*transaction.customer_loyalty_card_number*]

[*transaction.customer_loyalty_card_balance*]

[*transaction.order_reference*]

[*transaction.order_total*]

[*transaction.order_store_address*]

[*transaction.order_collect_date*]

[*transaction.order_collect_time*]

[*transaction.till_type*]

[*transaction.address*]

[*transaction.vat_number*]

[*FOREACH item IN transaction.items*]
Name: [*item.value.Name*]
[*FOREACH subitem IN item.value*]
[*subitem.key*]:[*subitem.value*]
[*END*]
[*END*]

No comments:

Post a Comment

Comments are moderated, so you'll have to wait a little bit before they appear!