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

# Inbound Voice Call

> Learn how to handle inbound voice call event data from Atonom

Atonom offers several kinds of voice chat event types that can be sent to your webhook URLs.

> To learn how to specify webhook URLs for your cloud employees in the Atonom app, please see the [webhook URLs](/get-started/quickstart/#configure-webhook) configuration step in the quickstart guide.

Below you will find an example of the data structure for inbound voice calls.

## Inbound Call Webhook

<Check>
  **Event Types:**

  * call\_inbound: Triggered when an inbound call is received
</Check>

When an inbound call is received, Atonom will send a webhook request to your configured endpoint. You can respond with additional information to customize how the Cloud Employee handles the call.

#### Webhook Request from Atonom

```json theme={null}
{
    "event": "call_inbound",
    "call_inbound": {
        "agent_id": "7",
        "from_number": "+11234567890",
        "to_number": "+10987654321",
        "tenant_id": 123
    }
}
```

#### Response Format

You can respond with the following structure to customize the call handling:

```json theme={null}
{
    "call_inbound": {
        "override_agent_id": "5",  // Optional: Override the default agent
        "dynamic_variables": {
            "email": "example@email.com",
            "first_name": "John",
            "last_name": "Doe"
        },
        "meta_data": {
            "company": "Example Company",
            "first_name": "John",
            "last_name": "Doe",
            "title": "Analyst"
        }
    }
}
```

#### Response Fields

| Field               | Description                                                                                                                                          |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `override_agent_id` | Optional. Specify a different agent ID to handle the call                                                                                            |
| `dynamic_variables` | Variables that can be used in the Welcome Message or prompting using <code>{'{{variable_name}}'}</code> syntax.                                      |
| `meta_data`         | Information that the Cloud Employee will know throughout the entire conversation. The agent can reference this information when answering questions. |

#### Usage Notes

1. **Dynamic Variables**
   * Can be used in the Welcome Message and prompting using <code>{'{{variable_name}}'}</code> syntax
   * Example: "Hello {'{{first_name}}'}, welcome to our company!"
   * The Cloud Employee does not access these variables during the conversation they are only used for dynamic variables in prompts and welcome messages

2. **Meta Data**
   * Available throughout the entire conversation
   * The Cloud Employee can reference this information when answering questions
   * Example: If you ask "What's my name?", the agent can answer using the `first_name` from meta\_data

3. **Response Time**
   * Your webhook endpoint should respond within 5 seconds
   * If no response is received, the call will proceed with default settings

#### Example Scenarios

1. **Basic Response with Dynamic Variables**

```json theme={null}
{
    "call_inbound": {
        "dynamic_variables": {
            "first_name": "John",
            "company": "Acme Corp"
        }
    }
}
```

Welcome Message: "Hello `first_name`, welcome to `company`!"

2. **Full Response with Meta Data**

```json theme={null}
{
    "call_inbound": {
        "dynamic_variables": {
            "first_name": "John"
        },
        "meta_data": {
            "company": "Acme Corp",
            "title": "Senior Developer",
            "department": "Engineering"
        }
    }
}
```

The Cloud Employee can now:

* Greet the caller using their first name
* Answer questions about their company, title, and department throughout the call
