> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/analyze/integrated-webhooks/integrated-webhooks-common-questions/integrated-webhooks-shopify-for-sprinthub.md).

# Integrated Webhooks - Shopify for Sprinthub

## Adding a Webhook Event in Shopify

To create a new Webhook in the Shopify dashboard, follow the steps below:

1. Access **Settings > Notifications**.
2. Click on the section **Webhooks** and click on **Create Webhook**.
3. On the creation screen, select the **event** that will be responsible for sending the data to SprintHub.
4. Enter the **Passive Webhook URL**, which will be responsible for handling this data. For example, creating a lead or performing additional actions on an existing lead in the instance.

In this example, we will use the event **Customer Creation**.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FZQQMaSIRi9OJC7VigkOG%2Fshopify-0.5.png?alt=media&amp;token=d11b0020-0449-4652-86b2-042e88969579" alt=""><figcaption><p><em>Shopify Notifications.</em></p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FpmsCS1ivPX73K897CfDy%2Fshopify-1.png?alt=media&amp;token=f1d64e11-31de-4cb7-93f6-8e87086f8bc1" alt=""><figcaption><p><em>Shopify Webhooks</em>.</p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2F1IEFXh4fIGKvkKgUrhu7%2Fshopify-2.png?alt=media&amp;token=ab857429-57cf-42a1-a3ee-b7c6a670797a" alt=""><figcaption><p><em>Add Webhook Modal.</em></p></figcaption></figure>

## Performing Automatic Event Mapping

To perform automatic mapping:

1. In SprintHub's Passive Webhook, click on **Automatic Mapping**.
2. Then, access Shopify and click on **Send Test** within the Webhook settings.\
   This will send a test trigger to SprintHub, allowing the platform to identify and map the fields automatically.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FZ8ed3KDuNyzyAXzkAdnq%2Fshopify-2.5.png?alt=media&amp;token=d5a6d789-cbbc-4d7a-a355-b76c13bbd46a" alt=""><figcaption><p><em>SprintHub Webhook.</em></p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FKsTglCXRtEUOlVwo4mZu%2Fshopify-3.png?alt=media&amp;token=28a884f6-0348-420d-828b-a7a610132ffc" alt=""><figcaption><p><em>Send Test button.</em></p></figcaption></figure>

## Webhook Settings

The field **"Identifier for"** defines which JSON key will be used as the lead's unique identifier — for example, the WhatsApp number — as soon as the data arrives at SprintHub's Passive Webhook.\
If a lead with this identifier already exists in the database, it **will not be recreated**; only the **configured extra actions** will be executed.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2F0SrstJexUVxAsFWcok0X%2Fshopify-4.png?alt=media&amp;token=66e9f079-07f6-4f2e-b1c5-6e0a0a6dad11" alt=""><figcaption><p><em>Identifier for.</em></p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2F87WkQ92EqchIdmwBVWPl%2Fshopify-6.png?alt=media&amp;token=dd37038b-c588-4f09-a028-a02a15c76bdf" alt=""><figcaption><p><em>Automatic Lead Creation.</em></p></figcaption></figure>

## Checking the Webhook Record

Inside the Webhook, it is possible to view the **log record**, including information such as created leads, identified leads, and other relevant details.\
It is important to note that all data sent by Shopify will be present in the **request body** (key `body`).\
There, it is possible to analyze each field sent in the event — such as **customer ZIP code**, **full name**, **email**, among others — making it easier to understand and map the data.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FAP2Z908mN3P5mWjTmMzD%2Fshopify-7.png?alt=media&amp;token=4edcd0ed-9e59-4ef7-ae09-5ae3a7d13ec4" alt=""><figcaption><p><em>‘Webhook Received’ record.</em></p></figcaption></figure>
