Skip to main content
El-Coder
Level 2
Sep 16, 2021 9:07 AM UTC
Solved

Pass a variable from Javascript code to diffusion

Hello everyone,


In Adobe Campaign Classic, I want to pass a variable I created in JavaScript Code activity to a diffusion, is this possible? If so, how do I do it?

Many thanks,

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Malarrajan_SundarAccepted solution
Adobe Employee
Sep 22, 2021 7:04 AM UTC

Hi @el-coder,

 

Create JS event/instance variable: vars.xxx='test123'

  • To pass in the workflow activity: $(vars/@xxx)
  • To pass directly in the delivery : <%= vars.xxx %>

 

- Malarrajan Sundarraj

3 replies

ShrawanSaxena-1
Adobe Employee
Adobe Employee
Sep 16, 2021 6:12 PM UTC
Jyoti_Yadav
Level 8
Sep 18, 2021 4:26 AM UTC

Hi @el-coder ,

 

You save your variable as an instance variable: instance.vars.xxx="abc".

And same variable you can fetch in delivery: <% instance.vars.xxx %>

 

Thanks,

Jyoti

Translate
Malarrajan_SundarAdobe EmployeeAccepted solution
Adobe Employee
Sep 22, 2021 7:04 AM UTC

Hi @el-coder,

 

Create JS event/instance variable: vars.xxx='test123'

  • To pass in the workflow activity: $(vars/@xxx)
  • To pass directly in the delivery : <%= vars.xxx %>

 

- Malarrajan Sundarraj

Translate