# Discord Webhooks

{% hint style="info" %}
The free version of Sonoran CAD is limited to one (1) Discord webhook.\
For more information, see our [pricing](https://docs.sonoransoftware.com/cad/pricing/faq) or view how to check your community [limits](https://docs.sonoransoftware.com/cad/tutorials/getting-started/view-your-limits).
{% endhint %}

{% hint style="warning" %}
Currently, Discord webhooks can only be created using the Desktop version of Discord.
{% endhint %}

<figure><img src="https://232668649-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4pGN81fb4R6zFhodcu%2Fuploads%2FzzVVhw9her62EsiGehpg%2Fwebhook.png?alt=media&#x26;token=4d616065-6a3a-4782-a437-2c1285e9d284" alt=""><figcaption></figcaption></figure>

### 1. Open your Server Settings

Open the "Server Settings" panel in the top right of your Discord server.

![](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MFE_lahQaWasYSozSMY%2F-MFEa1pGxpts7G4ttcje%2FScreen%20Shot%202020-08-20%20at%2010.56.54%20PM.png?alt=media\&token=7a2bc94d-e510-470d-85d5-5d714c98be01)

### 2. Open your Discord Integrations

In the server settings panel, select the “Integrations” tab.

![](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MFE_lahQaWasYSozSMY%2F-MFEaJH6mlYI40cZbdCj%2FScreen%20Shot%202020-08-20%20at%2010.54.04%20PM.png?alt=media\&token=4c7ec784-80ba-4017-ac50-019900041dc5)

### 3. View your Webhooks

On the right, click to view all of your current Discord webhooks.

![](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MFE_lahQaWasYSozSMY%2F-MFEaS_B1pOi1Mte9jpu%2FScreen%20Shot%202020-08-20%20at%2010.54.37%20PM.png?alt=media\&token=f21b0671-6190-45ad-b612-2eb162b0aa3b)

### 4. Create a New Webhook URL

Select the "New Webhook" button.

![](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MFE_lahQaWasYSozSMY%2F-MFEaVHatwC1pj80FzmG%2FScreen%20Shot%202020-08-20%20at%2010.54.59%20PM.png?alt=media\&token=8965fa4e-5585-4cd9-b066-541d4d10326c)

### 5. Customize the New Webhook

Here, you can set the Webhook name, channel and icon.

Press the "Copy Webhook URL" button to copy the webhook's URL.\
Press the "Save Changes" button to save your new webhook in Discord.

![](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MFE_lahQaWasYSozSMY%2F-MFEatrMGOX-skht5dV-%2FScreen%20Shot%202020-08-20%20at%2010.55.39%20PM.png?alt=media\&token=e7fd073c-0bcd-4b6c-8e76-0a1b1ae79793)

### 6. Configure the Sonoran CAD Webhook

{% hint style="warning" %}
New webhooks are created as "discord.com". If you are having problems please change the URLs of the old webhooks from "discordapp.com" to "discord.com" so they will function.
{% endhint %}

In the Sonoran CAD Admin panel, select “Advanced > Discord Integration”\
Paste your Webhook URL in the desired webhook configuration box.\
Toggle the desired notification events for the specific webhook. Press the “Save Configuration” button.

![](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-MFE_lahQaWasYSozSMY%2F-MFEb7CR8nyAzOFyB0cl%2FScreen%20Shot%202020-08-20%20at%2011.02.11%20PM.png?alt=media\&token=d24c13bc-6371-4341-95b1-757e72771334)

{% hint style="info" %}
*Note:* Some webhooks allow you to customize the notification settings even further. For example, you can specify to only receive a webhook when a police record is added, edited or removed.
{% endhint %}

### 7. Footer Metadata

{% hint style="danger" %}
As of Sonoran Bot v2, the ability to react to webhooks to create actions has been depreciated.

Footer metadata is still available to all communities.

[Submit a suggestion](https://support.sonoransoftware.com) to see this reimplemented!
{% endhint %}

### Footer Metadata

Webhook footers contain metadata that can be pulled from a bot for further integration.\
These follow the format: `USERNAME or UUID` | `TYPE` | `ID`

![Sonoran CAD - Webhook Footer Data](https://232668649-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4pGN81fb4R6zFhodcu%2F-Map0ki3s3_FPjYz2i82%2F-Map0sbAHqkjqVdAAmHb%2Fimage.png?alt=media\&token=6a85e507-3389-46e9-87ae-98b410e7b7f2)

| Type               | ID Value                            |
| ------------------ | ----------------------------------- |
| 0: UNIT\_PANIC     | Identifier ID                       |
| 1: TEN\_CODES      |                                     |
| 2: PENAL\_CODES    |                                     |
| 3: SIGNAL          | Signal Value                        |
| 4: ACCOUNT         |                                     |
| 5: NEW\_DISPATCH   | Call ID \| Server ID                |
| 6: EDIT\_DISPATCH  | Call ID \| Server ID                |
| 7: CLOSE\_DISPATCH | Call ID                             |
| 8: EMERGENCY       | Call ID \| Server ID                |
| 9: RECORD\_ADD     | Record ID                           |
| 10: RECORD\_EDIT   | Record ID                           |
| 11: RECORD\_REMOVE | Record ID                           |
| 12: TONE\_PLAYED   | Tone Label                          |
| 999: SYSTEM        | Systemwide Broadcast (From Sonoran) |
