Highlighted

How to call the variables set in the seed list?

algerz81927054

12-07-2018

Hi everyone,

How could we call the variables set in the seed list?

I tried setting variables in the "Additional Data" tab of the seed addresses like below:

1526575_pastedImage_2.png

But I don't know how to use the variable in the HTML.

I've tried getting the variable by using "message.seedMember.targetData.recip_type". Though the system doesn't report any error, it just shows me "undefined" as the value of the variable.

Could anyone tell me how to use it?

Replies

Highlighted

Vapsy

Employee

13-07-2018

You should define the targetData section either like this

<targetData recip_type="SEEDS"></targetData>

You can use the personalisation code <%= targetData.recip_type %>

OR like this

<targetData>

     <recip_type code="SEEDS" />

</targetData>

You can use the personalisation code <%= targetData.recip_type.code %>

Hope this helps.

Regards,
Vipul

Highlighted

algerz81927054

16-07-2018

Hi Vipul, thank you so much for the reply! It's good to know the correct XML format.

However, I'm still not able to call the variable. If using the definition:

When I try "<%= targetData.recip_type.code %>" in the HTML source. The system just reminds me it is “undefined”. I should have already previewed the code against the correct seed address.

Currently, I can only get the "recipient" data from the seed address correctly. And not able to get the data from "additional data". I also added enrichment executions in the workflow, will that affect the seed address' additional data's working?