Invoking external REST API from Campaign Workflow | Community
Skip to main content
Level 2
Jun 18, 2017 10:58 PM UTC
Solved

Invoking external REST API from Campaign Workflow

We have a requirement where we need to make an external API call from Campaign Workflow for initiating a third-party service. The external REST API is protected by OAuth 2.0. Can you please help suggest if there any OOTB activity that can used for this purpose, if not, then what possible options do we have? We are on Campaign V7.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Amit_Kumar
Amit_KumarAccepted solution
Level 10
Jun 19, 2017 12:42 AM UTC

Hi,

You have three options:

1. Use web download, if you are using rest call to dowwnla something to campaign server. Read more Web download.

2. Use JS to make the call example:

  • var http = new HttpClientRequest("https://...");
  •   http.header["UserName"] = strLogin;
  •   http.header["Password"] = strPwd;
  •   http.method = "GET"
  •   http.execute();
  •   var resp = http.response;

3. if you have a website server than make this rest as soap call and use Loading (SOAP).

Regards,

Amit

8 replies

Amit_Kumar
Level 10
Dec 11, 2018 1:40 PM UTC

No, Adobe is not designed to scale for API calls like this. imagine if you have 100 million users in your database in a year number of email will reach 2 billion. so you need 2 billion API calls. Adobe can not scale to such levels.

It's best to redesign the API to support Bulk operations or Change the approach.

Translate
New Participant
Dec 11, 2018 12:53 AM UTC

Hey Amit_Kumar​,

I have this use-case to call external API for every recipient in a campaign and use the response to personalise the email for them. Do you think Adobe Campaign can handle that? If we have, say 1m users in the target audience, would we be able to call the API 1m times without affecting overall performance?

Abi

Translate
New Participant
Jul 3, 2018 1:58 AM UTC

Thanks Adhlyan for quick reply,

The above documentation giving info about how can we make a calls to ACS API's through REST. But my requirement is, Need to call third-party API's from ACS workflows. In Classic I used to call third-party API's through JS activity in workflow like as below JS snippet

  • var http = new HttpClientRequest("https://...");
  •   http.header["UserName"] = strLogin;
  •   http.header["Password"] = strPwd;
  •   http.method = "GET"
  •   http.execute();
  •   var resp = http.response;

In Standard am not able to see any JS activity. Is there any other approaches to call third-party API's from ACS workflows?

Translate
Adhiyan
Employee
Jul 2, 2018 6:06 PM UTC

Hi Harish,

For ACS , you need use a REST Client like Postman and then follow the documentation given here :

Adobe Campaign Standard API

Using this , you can make external REST calls using the Campaign standard APIs

Regards,
Adhiyan

Translate
New Participant
Jul 2, 2018 11:32 AM UTC

Hi Amit, I couldn't able to see any JS activity in Adobe Campaign Standard, please let us know how can I make external API call for Standard?

Translate
davidl14970702
Level 4
Apr 6, 2018 3:51 PM UTC

Did you get it working? Could you provide an example of how you parsed the response and saved/used it?

Translate
Level 2
Jun 19, 2017 4:40 AM UTC

Thank you Amit. This is exactly what I was looking for. Option 2 should work for us.

Translate
Amit_Kumar
Amit_KumarAccepted solution
Level 10
Jun 19, 2017 12:42 AM UTC

Hi,

You have three options:

1. Use web download, if you are using rest call to dowwnla something to campaign server. Read more Web download.

2. Use JS to make the call example:

  • var http = new HttpClientRequest("https://...");
  •   http.header["UserName"] = strLogin;
  •   http.header["Password"] = strPwd;
  •   http.method = "GET"
  •   http.execute();
  •   var resp = http.response;

3. if you have a website server than make this rest as soap call and use Loading (SOAP).

Regards,

Amit

Translate