How to personalize variable in email delivery

Accepted Solutions (1)

Accepted Solutions (1)

Vapsy

Employee

02-01-2017

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

Answers (3)

Answers (3)

Céline_7773

09-06-2017

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

karunakarr23191

07-02-2017

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??