> For the complete documentation index, see [llms.txt](https://developer.esw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.esw.com/shopify/shopify-native/integration/product-catalog-sync.md).

# Product Catalog Sync

Sync product and variant changes from Shopify into ESW.

Use Shopify **product webhooks** to detect changes.

Then upsert the latest catalog data to ESW using the **ESW Catalog API**.

### Prerequisites

* You have an integration service that can receive Shopify webhooks.
* You have ESW Catalog API credentials and the target catalog schema.
* You’ve defined your *source of truth* for pricing.

{% hint style="warning" %}
Shopify webhooks are best-effort delivery.
{% endhint %}

### Webhook-driven sync flow

{% stepper %}
{% step %}

### Subscribe to Shopify product webhooks

Create webhook subscriptions for the product lifecycle events you use.

Common topics:

* `products/create`
* `products/update`
* `products/delete`

#### Shopify docs <i class="fa-webhook" style="color:$primary;">:webhook:</i> [Webhooks](https://shopify.dev/docs/api/admin-rest/2025-04/resources/webhook)

{% endstep %}

{% step %}

### Receive and validate the webhook

When a webhook fires:

* Verify the request is from Shopify (HMAC validation).
* Parse the product payload.
* Deduplicate events (Shopify can retry deliveries).
  {% endstep %}

{% step %}

### Map Shopify fields to the ESW catalog schema

Transform Shopify product + variant data into the format ESW expects.

Typical fields to align:

* Product and variant identifiers
* SKU (per variant)
* Title, description, and images
* Options (size, color) and availability
* Taxonomy / category mapping (if required by your ESW setup)
  {% endstep %}

{% step %}

### Upsert catalog data in ESW

Call the ESW Catalog API to create or update the product record.

Recommended behaviors:

* Make the upsert idempotent.
* Retry transient failures.
* Log the ESW response for traceability.
  {% endstep %}

{% step %}

### Handle deletes and unpublishing

Decide what a Shopify delete/unpublish means for ESW:

* Remove the item from the ESW catalog, or
* Mark it inactive / not purchasable.
  {% endstep %}
  {% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.esw.com/shopify/shopify-native/integration/product-catalog-sync.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
