Expand my Community achievements bar.

Accelerate your Campaign learning with the Adobe Campaign Mentorship Program 2023!

Push Parameter values passed in a URL of a webapp to a workflow


Level 1

Hi All,


I am working on a campaign workflow which sends out a notification email to the recipients. This email contains a button that has a webapp URL in it. This URL is also passing a parameter called as Email. Now when this button gets clicked, I want the parameter Email's value passed in the URL to be pushed to a campaign workflow. I have placed a postevent script for pushing the data from the webapp to this workflow. But somehow when i read the email variable in the workflow, I do not see any data being passed. Could you please share your insight on why the parameter value from the webapp is not be passed to the workflow? Also, I am not using any form in this webapp. This is just a confirmation page.Looking forward to your responses. Thanks!


Topics help categorize Community content and increase your ability to discover relevant content.

2 Replies


Level 5

Hi @MiliRawat 


You can define your parameter in the webapp Properties which will be a necessary field in the URL and will be passed in it. Also you need to define a variable which will store this parameter, in your case Email. in the variables tab of properties.


You can use a querydef to fetch the email of the record and assign it to a variable as below.

var query = xtk.queryDef.create(
    <queryDef schema="schemaName" operation="select">
    <node expr="@email"/>
    <condition expr={"[@email] ='"+ ctx.schemaName.@email+ "'"} />

var res = query.ExecuteQuery();
for each (var rcp in res)
   ctx.vars.email=rcp.@email; //Variable defined in the variables tab of the webapp.


After saving the the value into the variable you can use the postEvent method of workflow to post this variable as below :

logInfo("Email Variable is :"+ctx.vars.email);
xtk.workflow.PostEvent("workflowInternalName", "signal", "", <variables email={ctx.vars.email} />, false);


Once this is posted successfully after publication of the webapp, you can access those variable in your desired workflow.



Hope this helps.





Level 2

If the OP has the preloading activity, or in another way the variable he needs to pass into the workflow, he doesn't need to create a paramenter. 
Other than that it's bang on. 

The call to the workflow needs to be like this:

xtk.workflow.PostEvent("workflowInternalName", "signal", "", <variables email={ctx.vars.email} />, false);

And you can pass as much parameters as you'd like.