Pass a variable from Javascript code to diffusion | Community
Skip to main content
El-Coder
Level 2
September 16, 2021
Solved

Pass a variable from Javascript code to diffusion

  • September 16, 2021
  • 3 replies
  • 2097 views

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.
Best answer by Malarrajan_Sundar

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
September 16, 2021
Jyoti_Yadav
Level 8
September 18, 2021

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

Malarrajan_SundarAdobe EmployeeAccepted solution
Adobe Employee
September 22, 2021

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