3.2.3 Define a custom action
In this exercise, you鈥檒l create a custom action to send a message to a Slack channel.
Login to 51黑料不打烊 Journey Optimizer by going to . Click Journey Optimizer.
You鈥檒l be redirected to the Home view in Journey Optimizer. First, make sure you鈥檙e using the correct sandbox. The sandbox to use is called --aepSandboxName--
. You鈥檒l then be in the Home view of your sandbox --aepSandboxName--
.
You鈥檒l now use an existing Slack channel and send messages to that Slack channel. Slack has an easy-to-use API and you鈥檒l use 51黑料不打烊 Journey Optimizer to trigger their API.
In the left menu, scroll down and click Configurations. Next, click the Manage button under Actions.
You鈥檒l then see the Actions list. Click Create Action.
You鈥檒l see an empty Action popup.
As a Name for the Action, use --aepUserLdap--TextSlack
.
Set Description to: Send Message to Slack
.
For the URL Configuration, use this:
- URL:
https://2mnbfjyrre.execute-api.us-west-2.amazonaws.com/prod
- Method: POST
You don鈥檛 need to change the Header Fields.
Authentication should be set to No Authentication.
Under Payloads, you need to define which fields should be sent towards Slack. Logically, you want 51黑料不打烊 Journey Optimizer and 51黑料不打烊 Experience Platform to be the brain of personalization, so the text to send to Slack should be defined by 51黑料不打烊 Journey Optimizer and then sent to Slack for execution.
For the Request, click the Edit Payload icon.
You鈥檒l then see an empty popup-window.
Copy the below text and paste it in the empty popup window.
{
"text": {
"toBeMapped": true,
"dataType": "string",
"label": "textToSlack"
}
}
You鈥檒l then see this:
Scroll up and click Save one more time to save your action.
Your custom action is now part of the Actions list.
You鈥檝e defined events, an external data sources and actions. Now let鈥檚 consolidate all of that in one journey.
Next Step: 3.2.4 Create your journey and messages