> ## Documentation Index
> Fetch the complete documentation index at: https://docs.callers.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Campaign Actions

> Trigger API calls in real time during a call to provide agents with instant information or dynamically execute custom requests..

<Note>
  Callers sends all HTTP requests from the following IP addresses:

  ```copy theme={null}
  35.245.204.86
  35.221.61.75
  ```

  If your API endpoints are behind a firewall, whitelist these IP addresses to ensure action requests are delivered.
</Note>

### Set up an Action

* **Prerequisites**: To use this feature, make sure the following requirements are met:
  * **Accessible API Endpoint**: The API must be publicly accessible and able to receive and respond to HTTP requests.
  * **Authorization**: If the API requires authentication, ensure valid authorization credentials are provided.
  * **Defined Triggers**: Identify the script step or condition within the call that should initiate the API call.

* **Adding an Action Step**: To add an Action step, press the `+ Action` button at the bottom of the subflow. You’ll need to define the **Action Phrase**, which is the spoken message during the execution of the action.

<Frame caption="Set up an Action step">
  <img src="https://mintcdn.com/voxiaai/n_GBKcCTbLOYInOl/images/documentation/build-your-campaign/action-setup.png?fit=max&auto=format&n=n_GBKcCTbLOYInOl&q=85&s=4f38d5c498f7a807e272cb8f869e908c" alt="Set up an Action step" style={{borderRadius: '10px'}} width="2980" height="1520" data-path="images/documentation/build-your-campaign/action-setup.png" />
</Frame>

* **Create an Action**: Click the *Choose Action* button at the bottom of the action block.
  A window will appear with a list of applications connected through the App Center. These are the integrations you have added and can use to perform an action (learn more about the App Center \[here]).

<Frame caption="Add an Action">
  <img src="https://mintcdn.com/voxiaai/A8WhvGNyPN1MivEh/images/documentation/build-your-campaign/add-action.png?fit=max&auto=format&n=A8WhvGNyPN1MivEh&q=85&s=fe5d33719aad78479feeb13386f024de" alt="Add an Action" style={{borderRadius: '10px'}} width="3314" height="1500" data-path="images/documentation/build-your-campaign/add-action.png" />
</Frame>

* In this example, we will look at creating a standard HTTP request to an external endpoint.
  To do this, click **Create Custom Action** in the top-right corner and start configuring the request details.

<Frame caption="Create an Action">
  <img src="https://mintcdn.com/voxiaai/n_GBKcCTbLOYInOl/images/documentation/build-your-campaign/create-action.png?fit=max&auto=format&n=n_GBKcCTbLOYInOl&q=85&s=fdbca50bf0971a10d91404fcc0dc8e9f" alt="Create an Action" style={{borderRadius: '10px'}} width="2978" height="1636" data-path="images/documentation/build-your-campaign/create-action.png" />
</Frame>

* **Configure API Endpoints**: For each trigger, specify:
  * **Action Name**: A descriptive name for the Action.
  * **HTTP Method**: Select the appropriate HTTP method (GET, POST, etc.).
  * **Endpoint URL**: Enter the full API URL.
  * **Trigger**: Describe when the action should be executed.
  * **Headers**: Define any required headers, such as authorization tokens.
  * **Parameters**: If needed, add query parameters and a request body.

<Frame caption="Set up an Action">
  <img src="https://mintcdn.com/voxiaai/n_GBKcCTbLOYInOl/images/documentation/build-your-campaign/action-body.png?fit=max&auto=format&n=n_GBKcCTbLOYInOl&q=85&s=e67a3a503e94c884d0b06d7d9b101213" alt="Set up an Action" style={{borderRadius: '10px'}} width="2986" height="1666" data-path="images/documentation/build-your-campaign/action-body.png" />
</Frame>

<Info>
  For information about using Variables on Actions, please refer to our [Campaign Variables Guide](/documentation/build-your-campaign/campaign-variables).
</Info>

### Testing an Action

* Once you have completed the Action setup, use the `Test Trigger` button to simulate the API call.

<Frame caption="Testing an Action">
  <img src="https://mintcdn.com/voxiaai/n_GBKcCTbLOYInOl/images/documentation/build-your-campaign/action-test.png?fit=max&auto=format&n=n_GBKcCTbLOYInOl&q=85&s=9cd7e76e7e648a5c090267b4437c508c" alt="Testing an Action" style={{borderRadius: '10px'}} width="2986" height="1654" data-path="images/documentation/build-your-campaign/action-test.png" />
</Frame>

* Confirm the request is correctly structured and that responses are handled properly.
* Monitor test calls to ensure the Action integrates smoothly with the conversation flow.

<Frame caption="Action test response">
  <img src="https://mintcdn.com/voxiaai/n_GBKcCTbLOYInOl/images/documentation/build-your-campaign/test-response.png?fit=max&auto=format&n=n_GBKcCTbLOYInOl&q=85&s=81ecf55fdf2070c0c2b9db5bf85abb33" alt="Action test response" style={{borderRadius: '10px'}} width="2974" height="1660" data-path="images/documentation/build-your-campaign/test-response.png" />
</Frame>

### Action Responses

* You can use API responses to enhance call flows:
  * **Check Availability**: Query stock, service hours, or agent availability mid-call.
  * **Inform Callers**: Use returned data to share real-time information with the caller.
  * **Lookup Customer Records**: Fetch user details from your CRM or database.
  * **Schedule Appointments**: Trigger bookings through external scheduling APIs.
  * **Send Confirmations**: Trigger emails or SMS messages after specific call steps.
  * **Verify Identity**: Validate caller-provided information via a secure API.
  * **Route Conversations**: Automatically guide the call flow based on API response values.
    *(e.g., route the conversation based on the value of the **active** field returned by the API)*.

<Info>
  If you want to send data **after the call ends**, you can configure a special webhook.
  Learn more in our [Advanced Webhooks Guide](/documentation/webhook/advanced-webhook).
</Info>

<Frame caption="Routing conversation based on an API response">
  <img src="https://mintcdn.com/voxiaai/n_GBKcCTbLOYInOl/images/documentation/build-your-campaign/action-response.png?fit=max&auto=format&n=n_GBKcCTbLOYInOl&q=85&s=c072d49aba92dca88839fc54a44924c2" alt="Routing conversation based on an API response" style={{borderRadius: '10px'}} width="2974" height="1538" data-path="images/documentation/build-your-campaign/action-response.png" />
</Frame>
