Expand my Community achievements bar.

SOLVED

How to trigger a workflow from an external API request

Avatar

Level 1

I am looking for instructions/examples on how to configure an API request that triggers a workflow in adobe campaign classic. My current workflow is below. Here is similar documentation I found for adobe campaign standard - but I cannot seem to find anything like this for adobe campaign classic.

 

My goal is to trigger the workflow and pass it some data that will be used in the delivery Screenshot 2021-12-20 172524.png

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

3 Replies

Avatar

Level 9

Hi @user09141 - Here is a really useful guide on how to use SOAP web services with Adobe Campaign Classic. It uses Postman in the examples but you can easily use SoapUI as well if you are more familiar with that as it allows you to ingest the web service WSDL.

https://blog.qburst.com/2020/09/a-friendly-intro-to-soap-web-services-in-adobe-campaign/

You will need to use 1. Login API then 4. Trigger Workflow API

Cheers

Darren

Avatar

Correct answer by
Community Advisor

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

Avatar

Administrator

Hi @user09141,

Were you able to resolve this query with the help of any of the given solutions? Do let us know.
Thanks!



Sukrity Wadhwa