Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Add recipient data to delivery variables

Avatar

Level 2

I've been trying to resolve a problem for several days but I think it's just an Adobe limitation.

 

If in doubt, here is my question:

 

Is it possible to put recipient data in the variables of a delivery?

Let me explain, I would like my variable (which I am going to call gridVersion) to take the value of one of the fields in my recipient table, but I realize that in the delivery variables I cannot access the recipient table, nor even the temporary table (which would be ideal) as the values of my variable are "0","1" or "2", I thought of a ternary function but here too the conditions are made on the recipients table.

 

Thanks to anyone who can help me, I don't know if I was clear.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Ragsthenos,

What you are asking here cannot be done as this variable can have different values for different recipients, so it cannot be set on the delivery level.

If you want this value to be on the delivery, then you better split your workflow into three deliveries based on the offerCode above and then populate this variable. This way it would be static for each delivery.

You can do this by using a split activity, and then instantiate a variable in the advanced tab of the split activity or the delivery activity itself, like this:

delivery.variables._var[0].stringValue = 'hardcoded_offerCode_value1';

 

Regards,

Ishan

View solution in original post

8 Replies

Avatar

Community Advisor

Hello @Ragsthenos 

 

There is one delivery but possible options are 3. How do you want this to work?

 

If there are 3 recipients with 3 different values. Which value do you want to set in delivery variables?

 

Note: The delivery variable value will be static for all recipients.


     Manoj
     Find me on LinkedIn

Avatar

Level 2

Thank you for your response,

 

in fact I explained the problem poorly because I had to get home quickly. To explain better, in my workflow I have a JavaScript code in which I add a field to the temporary table.

 

sqlExec("UPDATE " + vars.tableName + " SET sGriddVersion="+ gridVersion +" where sMongoId= '" + mongoId + "'")

 

For each lead the value can differ between "0", "1" and "2" and I would like my broadcast variable to be able to take the value of the lead.

 

But I think there is a limitation of the tool

Avatar

Community Advisor

Hi @Ragsthenos,

Adding data to the temporary work table can be done via the OOTB workflow activities as well. You can add an attribute in the temp table via the enrichment activity like this:

Iif(targetData.mongoId = 'xxx', val1, Iif(targetData.mongoId = 'yyy', val2, Iif(targetData.mongoId = 'zzz', val3, 'defaultVal')))

Then the data is available in the delivery for personalization as a targetData attribute. If you use SQL to update the temp table, then it should be available for personalization too, but might not be visible like that on the console. You can manually type the attribute like this:

<%= targetData.gridVersion %>

 

Regards,

Ishan

Avatar

Level 2

Hi @isahore 

 

Thank you for your answer, indeed in this way I could use the syntax <%= targetData.gridVersion %> in the HTML to display the value in the email, but in my case I am not trying to display it in the email, I just want to have a diffusion variable (named offerCode) and that the value of this variable can be different depending on certain criteria

 

Ragsthenos_0-1704373087434.png

 

 

 

Avatar

Correct answer by
Community Advisor

Hi @Ragsthenos,

What you are asking here cannot be done as this variable can have different values for different recipients, so it cannot be set on the delivery level.

If you want this value to be on the delivery, then you better split your workflow into three deliveries based on the offerCode above and then populate this variable. This way it would be static for each delivery.

You can do this by using a split activity, and then instantiate a variable in the advanced tab of the split activity or the delivery activity itself, like this:

delivery.variables._var[0].stringValue = 'hardcoded_offerCode_value1';

 

Regards,

Ishan

Avatar

Community Advisor

Hello @Ragsthenos,

you can access recipient variables also variables that create down the line in your workflow and if not happy you can insert adobe list records or pass own variables into delivery directly

In any template you can see recipient data.

Marcel_Szimonisz_0-1703150048403.png

If you plug the template to any workflow you will be able to see also variables you created within workflow

 

 

Marcel

 

 

Avatar

Administrator

Hi @Ragsthenos,

Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.
Thanks!



Sukrity Wadhwa