Expand my Community achievements bar.

SOLVED

How to personalize variable in email delivery

Avatar

Level 2

Is there any way to personalize variable into delivery(Email/SMS)?

Because i am only able to personalize attribute.

1 Accepted Solution

Avatar

Correct answer by
Employee

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

View solution in original post

4 Replies

Avatar

Correct answer by
Employee

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

Avatar

Level 2

Its working fine now.

Thank you Vipul Raghav

Avatar

Level 1

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

Avatar

Level 2

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