Hi @user09141 ,
Let's take a simple example:
1) Your API request has recipient email address or recipient ID sent in the SOAP request. You need to write a 'Javascript Code' to enable the API request login to Adobe Campaign and fetch the SOAP request data.
2) Write a 'Javascript Code' first to authorise the Login either using 'Login/password' or using 'sessionToken' based on 'serverConf.xml' setting.
3) Write another function in the same JS code, this function will fetch the SOAP parameters and then send the data to the workflow you want to trigger.
4) Use below code to trigger the workflow:
// Pass the variable value
var varAppend= <variables emailAddress +" ' "+attribute.AttributeName+" ' /> ";
// Trigger the workflow
xtk.workflow.PostEvent(workflowName, "signal", "", varAppend, false);
5) Above code will trigger your workflow and then you will be needed to read the value passed to the external signal. Use below code in JS activity in your workflow:
instance.vars.varName=vars.emailAddress;
6) Use the same variable to query the nms:recipient table and fetch the details of the recipient.
7) Then use delivery activity and it will send the emailer to the desired recipient.
Thanks,
Jyoti