Hi,
I have created one simple workflow in which first activity is JS Code - here, I am trying to store value in instance variable. I have logged this and it is showing under journal. Second acitivity is query in which I am fetching test account and this is working. Third activity is the recurring delivery. I am trying to show instance variable in this delivery. I have added "script" in this delivery and I have also added "variable" under properties.
However, emails are not being sent at all.
I have followed step as per URL - https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic/tuesday-tech-bytes-adobe-cam...
@ParthaSarathy - can you please help?
JS Code
1. instance.vars.temp = functioname('parameters');
2. logInfo(instance.vars.temp);
Query
1. Temp player ID
Delivery
HTML:
Data is <%= variables.temp %>
Script:
delivery.variables._var[0].stringValue=instance.vars.temp;
Variables under properties:
"temp"
Views
Replies
Total Likes
Can anyone please help ?
Views
Replies
Total Likes
Hey @vinay16,
Your setup looks mostly correct from what you shared.
To help pinpoint the issue, could you please share the exact function (functioname) you’re using in your JS activity? Also, if you can check and share any errors or details from the delivery audit tab, that would be super helpful.
Sometimes the problem comes down to what the function returns—whether it’s a string, object, or function—which affects how you assign it to the delivery variable.
Happy to take a closer look once you share that info!
Thanks,
Views
Replies
Total Likes
Hi! It is not feasible in my experience to write to delivery variables from JS like that. Instead you could create an additional variabel in your query and set the value to the instance.vars.test value. Then you can simply reference <%=targetData.temp%> in the delivery. This is tested and works like a charm 🙂
So:
3. Rerefence that variable in the delivery with "<%=targetData.test%>"
Hope that helps!
Views
Replies
Total Likes
Views
Likes
Replies