How to pass List as parameter using Javascript | Community
Skip to main content
August 18, 2020
Solved

How to pass List as parameter using Javascript

  • August 18, 2020
  • 1 reply
  • 2086 views

Hi,

I have a requirement to load a audience list from a campaign workflow and share it with customer service group. The tricky part is that this list needs to be pulled and shared prior to actual email is triggerred.

 

I tried to export the audience list in a list. Now I am trying to pass this list to another export workflow using xtk.workflow.PostEvent and External Signal activity, but now I am struggling with the appropriate syntax and activities I need to use.

 

If anyone have any experience with the technical functionality and can provide guideline it will be very much helpful...

 

Thank in advance...

 

Kind regards,

Dipankar Basu

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 Jyoti_Yadav

Hi Dipankar,
 
You can achieve above functionality using below components as well.
1) Save your list in a list for your reference, if needed.
2) Use 'data Extraction' activity after list save and select all the the columns you want to export.
3) Use 'File Transfer' activity and specify the WinSCP folder path, place from where customer can pick the files.
4) You can keep wait activity, assuming customer provides approval within 3-4 hours. after waiting for that time your next activity i.e email will be triggered.
Your workflow will look like:
 
 
 Or you can pass variable like:
Below is the syntax you can use to pass a list of variables in your PostEvent JavaScript function -
xtk.workflow.PostEvent("<workflow name>", "<externalsignal name>", "", "listName='xyz'", false);
Same variable will be read in workflow as: $(vars/@listName)
 
Thanks,
Jyoti

1 reply

Jyoti_Yadav
Jyoti_YadavAccepted solution
Level 8
August 19, 2020

Hi Dipankar,
 
You can achieve above functionality using below components as well.
1) Save your list in a list for your reference, if needed.
2) Use 'data Extraction' activity after list save and select all the the columns you want to export.
3) Use 'File Transfer' activity and specify the WinSCP folder path, place from where customer can pick the files.
4) You can keep wait activity, assuming customer provides approval within 3-4 hours. after waiting for that time your next activity i.e email will be triggered.
Your workflow will look like:
 
 
 Or you can pass variable like:
Below is the syntax you can use to pass a list of variables in your PostEvent JavaScript function -
xtk.workflow.PostEvent("<workflow name>", "<externalsignal name>", "", "listName='xyz'", false);
Same variable will be read in workflow as: $(vars/@listName)
 
Thanks,
Jyoti