How to personalize variable in email delivery | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
vraghav
vraghavAccepted solution
Employee
Jan 2, 2017 3:38 PM UTC

Hi Sakthikumar,

Yes, it is possible.

If you have an instance variable created on a workflow say instance.vars.xxx you will have to do the following:

  1. Define a variable inside your delivery. You can do so by clicking on delivery properties and moving to Variables tab. Define a delivery variable.
  2. On the workflow canvas, inside the Initialization Script section of the delivery activity, you will have to assign the instance.vars.xxx value to the delivery variable defined in step 1.
  3. Then inside your delivery creative make use of this delivery variable for personalization

Another possible way is to use an Enrichment to add this variable value as a targetData element of the outgoing transition. This way you can make use of targetData personalization blocks.

Hope this helps.

Regards,

Vipul

4 replies

Level 2
Jun 9, 2017 9:52 AM UTC

Hi Vipul,

I've read your answer and I found it very interesting. But I'm not very accustomed to the use of variables is the initialization script, and I don't find how to assign a value to the delivery variable defined.

What's the syntax to use ?

I tried a lot of syntaxes like these :

task.eventVariables.NomPrp = vars.NomPrp

activity.scenario.variables.NomPrp = vars.NomPrp

activity.scenario.variables.NomPrp.stringValue = vars.NomPrp

task.eventVariables =  <eventVariables

                                     NomPrp = {vars.NomPrp}

                                       />

var variables = <variables

NomPrp = {vars.NomPrp}

/>

activity.scenario.variables = variables

Could you help me with the syntax to use ?

Thanks a lot in advance

Céline

Translate
New Participant
Feb 7, 2017 6:37 PM UTC

Hi Vipul,

I followed your steps, i am generating the instance.vars.test in the initialization script and assigning it to the delivery variable devtest like below:

instance.vars.test = devtest; (devtest is the variable i created in the delivery properties section)

devtest variable value is always coming up as blank in the email delivery.

any thoughts??

Translate
Level 2
Jan 3, 2017 6:57 AM UTC

Its working fine now.

Thank you Vipul Raghav

Translate
vraghav
vraghavAccepted solution
Employee
Jan 2, 2017 3:38 PM UTC

Hi Sakthikumar,

Yes, it is possible.

If you have an instance variable created on a workflow say instance.vars.xxx you will have to do the following:

  1. Define a variable inside your delivery. You can do so by clicking on delivery properties and moving to Variables tab. Define a delivery variable.
  2. On the workflow canvas, inside the Initialization Script section of the delivery activity, you will have to assign the instance.vars.xxx value to the delivery variable defined in step 1.
  3. Then inside your delivery creative make use of this delivery variable for personalization

Another possible way is to use an Enrichment to add this variable value as a targetData element of the outgoing transition. This way you can make use of targetData personalization blocks.

Hope this helps.

Regards,

Vipul

Translate