## Overview

Webhooks are real-time notifications that enable communication between different software systems and trigger automated processes. For example, for your online store, you can set up a webhook to alert you whenever a new product is added. Using fabric Copilot’s webhook functionality, you can create event subscriptions to monitor operations between fabric apps and external systems, such as a Customer Relationship Management (CRM) or Content Management Systems (CMS). You can create webhooks for the following applications in fabric:

- [List of Product Catalog Events](https://developer.fabric.inc/v3/platform/settings/webhooks/list-of-products-events)
- [List of Orders Events](https://developer.fabric.inc/v3/platform/settings/webhooks/list-of-orders-events)
- [List of Inventory Events](https://developer.fabric.inc/v3/platform/settings/webhooks/list-of-inventory-events)

## Prerequisites

Before creating a webhook, ensure that:

- You have **Developer Admin** privileges to create a new webhook. For more information on privileges, see the [Role-Based Access Control](https://developer.fabric.inc/v3/platform/settings/rbac/role-based-access-control) topic.
- You have set up the destination server or subscriber endpoint for successful implementation.

## Procedure

01. In the left menu, click **Settings > Developer Tools**.
02. Click **Webhooks**.

The Webhooks page is displayed.
03. Click **Add Webhook**.

The **Add webhook** page is displayed.
04. Enter a name for the webhook.
05. In the **Webhook endpoint** field, enter the subscriber URL for the webhook’s endpoint to listen to the event.
06. (Optional) In the **Webhook description** field, enter a description for the webhook.

Use this field for internal notes on details about the webhook.
07. In the **API key header** field, leave the request header set to _x-api-key_.
08. In the **API key credentials** field, enter your API key value.

- This value comes from the system you are sending the webhook data to.
09. To create a webhook for a fabric application, in the **Events** section, do one or more of the following as required:

- To create a webhook for the Product Catalog application, click the **Product Catalog** tab and do one of the following:

- To subscribe to all events in Product Catalog, check the **Select all events in Product Catalog** checkbox.
      - To subscribe to all events in a specific Product Catalog service, check the checkbox next to the service name.
      - To subscribe to specific events within a Product Catalog service, expand each service menu and check the checkbox next to individual events, as required.

For a complete list of events available to Product Catalog, see the [List of Product Catalog Events](https://developer.fabric.inc/v3/platform/settings/webhooks/list-of-products-events) topic.
    - To create a webhook for the Orders application, click the **Orders** tab and do one of the following:

- To subscribe to all events in Orders, check the **Select all events in Orders** checkbox.
      - To subscribe to all events in a specific Orders service, check the checkbox next to the service name.
      - To subscribe to specific events within an Orders service, expand each service menu and check the checkbox next to individual events, as required.

For a complete list of events available to Orders, see the [List of Orders Events](https://developer.fabric.inc/v3/platform/settings/webhooks/list-of-orders-events) topic.
    - To create a webhook for the Inventory application, click the **Inventory** tab and do one of the following:

- To subscribe to all events in Inventory, check the **Select all events in Inventory** checkbox.
      - To subscribe to all events in a specific Inventory service, check the checkbox next to the service name.
      - To subscribe to specific events within an Inventory service, expand each service menu and check the checkbox next to individual events, as required.

For a complete list of events available to Inventory, see the [List of Inventory Events](https://developer.fabric.inc/v3/platform/settings/webhooks/list-of-inventory-events) topic.
    - To create a webhook for the Cart & Checkout application, click the **Cart & Checkout** tab and do one of the following:

- To subscribe to all events in Cart & Checkout, check the **Select all events in Cart & Checkout** checkbox.
      - To subscribe to all events in a specific Cart & Checkout service, check the checkbox next to the service name.
      - To subscribe to specific events within a Cart & Checkout service, expand each service menu and check the checkbox next to individual events, as required.
10. At the top of the page, click **Save**.

The webhook is saved and the **Test webhook** button is displayed. fabric recommends testing the webhook to ensure it’s successful. To learn more, see [Testing a Webhook](https://developer.fabric.inc/v3/platform/settings/webhooks/testing-a-webhook).
