# Frontline Conversations Webhooks

Twilio uses [webhooks](/docs/glossary/what-is-a-webhook) to let your application know when an event is happening. These webhooks allow you to monitor and intercept user actions in your own backend service.

## Enable Conversations webhooks

To [handle inbound conversations](/docs/frontline/handle-incoming-conversations) in Frontline, you need to enable two **Conversations** webhooks:

* onConversationAdd
* onParticipantAdded

### onConversationAdd

The `onConversationAdd` webhook is triggered before creating a conversation. This webhook can be used for setting the `friendlyName` and `avatar` for the conversation. This information is [stored as attributes](/docs/frontline/data-transfer-objects#conversation) in the Conversation object.

Please refer to the following table for a detailed description of the Conversation resource attributes:

| **Property**        | **Type**         | **Description**                                                                                   |
| ------------------- | ---------------- | ------------------------------------------------------------------------------------------------- |
| `friendlyName`      | String, optional | The human-readable name of a conversation.                                                        |
| `attributes.avatar` | String, optional | An absolute URL to the conversation avatar image. A custom attribute defined by Twilio Frontline. |

### onParticipantAdded

The `onParticipantAdded` webhook is triggered when a participant has joined a Conversation. This webhook can be used for setting the `customer_id` and optionally setting the `avatar` and `display_name` for **customer** participants. This information is [stored as attributes](/docs/frontline/data-transfer-objects#participant) in the Participant object.

Please refer to the following table for a detailed description of the Participant resource attributes:

| **Property**              | **Type**         | **Description**                                                                                                                      |
| ------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `attributes.customer_id`  | String           | An ID used to tie together a conversation participant and a customer in your system. A custom attribute defined by Twilio Frontline. |
| `attributes.avatar`       | String, optional | An absolute URL to the participant's avatar image. A custom attribute defined by Twilio Frontline.                                   |
| `attributes.display_name` | String, optional | The participant's display name. A custom attribute defined by Twilio Frontline.                                                      |

## Configure Webhook URLs and filters

Now, let's take a look at the configuration of the **Conversations API Webhook.**

Open your [Twilio Console](https://console.twilio.com/?frameUrl=%2Fconsole%3Fx-target-region%3Dus1) in a new browser. Click on **Explore Products** link in the left navigation pane and select **Conversations** product, then navigate to **Manage** > **Global webhooks.**

You should now see the **[Conversations API Webhook Configuration](https://console.twilio.com/us1/develop/conversations/manage/webhooks?frameUrl=%2Fconsole%2Fconversations%2Fconfiguration%2Fwebhooks%3Fx-target-region%3Dus1)** page.

Under the **Webhook Target** section, set the **Pre-Event URL** and **Post-Event URL** to target your ngrok URL.

![Webhook URLs for pre-event and post-event with HTTP POST method selected.](https://docs-resources.prod.twilio.com/8855a983880a90cbcc9c93a973263bde5a85de6429baef4e2d820f9989d5411d.png)

Under the **Webhook Filtering** section, select the **onConversationAdd** and **onParticipantAdded** options.

![Webhook filtering options with onConversationAdd and onParticipantAdded selected.](https://docs-resources.prod.twilio.com/5c89431343f2925a39f39a1d85d627bd8946a82f033d7e24fed63564f4dbc90a.png)

Click **Save**.

Now, you're all set with Conversations webhooks!

Take a look at the [Conversations webhooks](/docs/conversations/conversations-webhooks) guide for more information.
