We’ve developed some resources to help you work effectively from home during COVID-19 Click to learn more

Extra data in mailings

Hi

Is it possible to incorporate data other than those available from [[PARSER_TREE]] in a mailing? Or is it possible to supplement the global parser before sending a mailing to incorporate additional data?

Customer wants to incorporate voucher codes from an extra table in a mailing and keep track of voucher usage by a tracked link. Each recipient of a mailing should see his or her voucher code as a clickable link, directly in the email.

Best regards
Marc

RE: Extra data in mailings

Hi,

If you add voucher_code as an extra field on person, it will be available as a parser-variable in a mailing.

Sverre

Av: Sverre Hjelm 28. jun 2019

RE: Extra data in mailings

Hi Sverre

Thanks for the nice and simple solution. It works fine. You can even use [[IF: to distinguish "priviledge" recipients that have a voucher code vs. others that do not, in the same mailing template. In source code:

<body>
<p>[[makeSalutation(customer.id)]]</p>
<p>Welcome to our exhibition at Basel World 2019.</p>
<p>[[IF:customer.x_voucher_code=""]]</p>
<p>[[ELSE]]</p>
<p>Click your voucher code <a href="[[spmLink44]]">[[customer.x_voucher_code]]</a> to get a 20% discount on all our exhibition products!</p>
<p>[[ENDIF]]</p>
<p>Best regards</p>
<p>demo.ch</p>
</body>

Best regards

Marc

Av: Marc Eberhard 30. jun 2019

RE: Extra data in mailings

Hi Marc,

I am happy it works for you. You could even simplify your code as we support the unequal operator ("!=")

[[IF:customer.x_foo!=""]]
Blah blah
[[ENDIF]]

 

Sverre

Av: Sverre Hjelm 1. jul 2019