Customize the POST body od External API activity | Community
Skip to main content
El-Coder
Level 2
March 25, 2022
Solved

Customize the POST body od External API activity

  • March 25, 2022
  • 2 replies
  • 1275 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by dsmims

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

2 replies

Manoj_Kumar
Community Advisor
Community Advisor
March 31, 2022

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  | https://themartech.pro
dsmimsAccepted solution
Level 2
April 26, 2022

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