---
title: [Tech] Configuring a custom action
slug: flutter-crm-pillar/tech-configuring-a-custom-action
docTags: 
createdAt: 2024-01-30T23:03:21.354Z
---

:::hint{type="info"}
To log into the Adobe Experience Platform, and open Adobe Journey Optimizer, check the [Welcome!](docId:9tvwkkFf6Bbdrf9nQOIVg)  section.
:::

In this exercise you'll create the action to retrieve the bet details. The data returned by the API will be used in the journey for personalisation.

## Custom action overview

**What is an Custom Action?**

Custom actions enable you to configure connection of a third-party system to send messages or make API calls to gather data. An action can be configured with any service from any provider that can be called through a REST API with a JSON-formatted payload.. [Learn more](https://experienceleague.adobe.com/en/docs/journey-optimizer/using/configure-journeys/action-journeys/action)

To get an overview of a custom actions in Adobe Journey Optimizer:

1. In the menu on the left side, under **Administration**, click on **Configurations**. You will see a set of tiles.&#x20;
2. Click on **Manage** in the **Actions** tile, to get an overview with all existing actions.

## Configuring a custom action

We'll be configuring a custom action that we can use in our journey. The action make an API call, passing the `betID`, to retrieve bet information.

:::hint{type="warning"}
If you do not want to configure your own action, you can reuse an action that has aleady been created for you, **getBetDetails**.&#x20;

Feel free to skip this exercise and proceed to **Creating the journey.**
:::

To configure a new event, click **Create Action**. A menu will open on the right side.

- Set the **name** to  `yourname_getBetDetails`.
- For **Action type**, set the value to `Custom`.
- Leave **Access and privacy configuration** as it is.
- For **Endpoint configuration**, set **URL** with:
  1. `https://api-v5rrckz3mq-uc.a.run.app/betting/bet/`
- Set **Method** with **GET**.
- Scroll down to **Payloads**, and click on `0 fields selected`, a popup will be opened. This is the place where you can specify the response payload expected from the endpoint.
- Copy this JSON and paste into the popup:

:::BlockQuote
\{
&#x20;   "success": true,
&#x20;   "data": \{
&#x20;       "id": "33423",
&#x20;       "userId": "fH5MrLeb4y24DzRkqW",
&#x20;       "eventId": "AsEWdDSEQD",
&#x20;       "betType": "Trixie Bet",
&#x20;       "stake": 93.75,
&#x20;       "status": "WIN",
&#x20;       "placedAt": "2025-05-06T21:19:25.458Z",
&#x20;       "settledAt": "2025-05-07T07:06:19.868Z"
&#x20;   }
}
:::

- The UI will automatically identify the name and type of the fields.
- Click **Save**.
- The window will close and you should now see `9 fields selected`.

Your screen should look like the image below. Scroll up and click **Save**.

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/O4YQr75KJBedbHAVVccPc_action1.jpg)

:::hint{type="success"}
You have successfully created an **Action** to be used in our journey!&#x20;
:::

