Expand my Community achievements bar.

Adobe Journey Optimizer Community Lens 7th edition is out.
SOLVED

Putting variable in Custom actions POST Body payload

Avatar

Level 6

Hi all,

 

We are just getting onboarded into AJO, and we started building test journey to test a few things. One of the thing I am testing is to for AJO to read a segment, and send a POST Call to a slack integrated channel to display a simple message.

 

The Slack POST endpoint looks something like this: https://hooks.slack.com/services/xyz and accepts a BODY data:

{text: "abc"}

 

The test is to display "Abc" as a message in the slack channel, and this has been successful.

 

I am wondering if there's a way to add variable values (say, I want to add a profile attribute value, the ID - all readily configured in data sources) into the POST body?

 

The end output I am looking for is something like this: "text: "Account:" & @IDvariable & "received the message"

Output: Account 123 received the message.

 

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@akwankl, You should be able to include that as part of the payload (variable) that you defined in the custom action. Once you defined the AccountID variable use the custom action within the journey to map it to the ID attribute on the AJO. For example with this, I have included email, firstname, lastname, and ID as a variable. 

{
"email": "abc@test.com",
"Data": {
"FirstName": "Test",
"LastName": "AJO",
"ID":"1234"
}}

SatheeskannaK_1-1696020279289.png

 

 

Thanks, Sathees

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

@akwankl, You should be able to include that as part of the payload (variable) that you defined in the custom action. Once you defined the AccountID variable use the custom action within the journey to map it to the ID attribute on the AJO. For example with this, I have included email, firstname, lastname, and ID as a variable. 

{
"email": "abc@test.com",
"Data": {
"FirstName": "Test",
"LastName": "AJO",
"ID":"1234"
}}

SatheeskannaK_1-1696020279289.png

 

 

Thanks, Sathees