Expand my Community achievements bar.

We are excited to introduce our latest innovation to enhance the Adobe Campaign user experience — the Adobe Campaign v8 Web User Interface!
SOLVED

Customize the POST body od External API activity

Avatar

Level 2

Hello community,

How to send a POST request to an external API with the following body :
{
        "name" : "Jonas",
        "internal name" : "sbx2000",
        "country" : [
                            ["2000", "paris"],
                            [ "2001", "usa"]
                          ]
}

Note: when using the external API activity, the data added as input looks like this in the POST body :
{ "data":[
{ "name" : "Jonas"},
{ "internal name" : "sbx2000"},
{"country" : "country"}
]}


PS. Countries are a custom resource that will be embedded from a query activity.


Is there any way to customize the body of the JSON that will be sent in the call?

Please advice on this matter.

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hey @El-Coder,

 

Just as Manoj_Kumar mentioned, we were told by Support currently it is not possible to customize the post body in ACS.

 

I've had a similar requirement and after some research found out something can be done using Adobe IO Runtime (hopefully you have access to this). It will essentially act as a middle man between ACS and your external system. You then use it to ingest the call you make from the External API activity and then manipulate this to the required format.

 

We didn't progress further with our requirement due to other priorities, but still something that will be revisited.

 

Here's a page I found where someone did something similar. Hopefully works for you : https://medium.com/adobetech/adobe-campaign-standard-and-web-push-notifications-5c12c0f4ada2

 

Thanks,
Don

View solution in original post

2 Replies

Avatar

Community Advisor

Hello @El-Coder 

 

In the current setup, It is not possible to format the json code from external API activity.

You will have to update your code on the external platform to accept the format which ACS sends.

 


     Manoj
     Find me on LinkedIn

Avatar

Correct answer by
Level 2

Hey @El-Coder,

 

Just as Manoj_Kumar mentioned, we were told by Support currently it is not possible to customize the post body in ACS.

 

I've had a similar requirement and after some research found out something can be done using Adobe IO Runtime (hopefully you have access to this). It will essentially act as a middle man between ACS and your external system. You then use it to ingest the call you make from the External API activity and then manipulate this to the required format.

 

We didn't progress further with our requirement due to other priorities, but still something that will be revisited.

 

Here's a page I found where someone did something similar. Hopefully works for you : https://medium.com/adobetech/adobe-campaign-standard-and-web-push-notifications-5c12c0f4ada2

 

Thanks,
Don