---
title: "Shopify events"
description: "Events the Shopify integration handles and what each does."
sidebar:
  label: Events
---

The integration receives catalog, price, stock, category, collection, market, warehouse, and merchant user events and writes to the Shopify Admin GraphQL API. Writes are throttled to the GraphQL cost budget that matches the configured plan tier, and unchanged payloads are not sent again.

## Products

With publications configured, the product is evaluated per publication against the store group and markets it covers. A product active for that scope is published to the channel, and a product that is not stays unpublished and is removed from the channel if it was there before. Without publications, Enad syncs against the default store group only.

| Event | What Enad sends |
|---|---|
| Product created or updated | The product and all its variants. Products with variant groups sync either as one Shopify product per variant group or as a single Shopify product with all variants; when the layout changes, Enad deletes the stale Shopify products and re-creates them in the other layout. |
| Product not active | Synced as a Shopify draft instead of active. |
| Product deleted | Deletes the Shopify products and their mappings. When the layout splits products per variant group, every group product is deleted. |

The product payload carries title, handle, description, tags, vendor (the brand), SEO fields, images and videos, linked collections and categories, the Google product taxonomy of the main category, and the metafields from the field mapper. If the Enad-to-Shopify mapping is lost, Enad re-adopts the existing Shopify product by matching variant SKUs.

## Variants

| Event | What Enad sends |
|---|---|
| Variant updated | Price, media, weight, HS code and country of origin from custom fields, barcode, SKU, and the metafields from the variant field mapper. The base price comes from the default store group in the default currency, with the sale price written as the price and the regular amount as the compare-at price. New variants are created, existing ones updated in batches, and all market price-list prices are written right after a creation. |
| Variant status changed | Ignored. Variants publish through the parent product sync. |
| Variant deleted | Clears the stored mapping in Enad. The Shopify variant itself is not removed by this event. |

Enad keeps Shopify product options in step with the synced option set, including linked-option values that resolve to metaobjects. A variant is skipped when it has no value for a synced option, when a linked option has no matching metaobject, or when its option combination duplicates another variant.

## Prices

| Event | What Enad sends |
|---|---|
| Prices updated (store group) | One price entry per market country code on the Shopify price lists for the store group: the tax-inclusive amount as the price, and when the price is on sale, the sale price as the price with the regular amount as the compare-at price. Ends by reconciling whether the variant belongs in the market catalogs. |
| Single price updated (one market) | The same pipeline for that market's price. |
| Price for the default store group and default currency | Also written directly onto the variant as its base price. |

A missing price list for a market is created automatically. Markets without a currency, and price lists whose currency differs from the market's, are skipped.

## Stock

| Event | What Enad sends |
|---|---|
| Stock updated | Sets the variant's available quantity at the matching Shopify location. Also toggles inventory tracking to match the variant's stock validation, and activates the item at the location when needed. |
| Stock delta | Adjusts the quantity by the delta. A zero delta is ignored. |
| Stock validation config | Toggles inventory tracking on the variant's inventory item. |
| Inventory removed | Sets the quantity at that location to 0. |

Stock changes that originated in Shopify are ignored, so the two systems do not loop.

## Images and videos

Images and videos attach to the Shopify product media gallery during product sync. Images are uploaded through a staged upload and created as Shopify files with the Enad alt text; existing media is re-adopted by matching the source URL. The media list is reordered to Enad priority order, and alt-text translations are registered for the shop locales.

| Event | What Enad sends |
|---|---|
| Image relationship created or deleted | Re-syncs the affected product, including its media. |
| Image updated or deleted directly | No effect. Media syncs with the product. |
| Video upsert | Uploads the video to Shopify Files through a staged upload, with the description as alt text, and polls until Shopify reports it ready. |
| Video delete | Clears the mapping in Enad. The Shopify file stays and detaches on the next product sync. |

Variant images attach per variant: the first allowed variant image goes on the variant, additional ones are uploaded to the product, and media that no longer belongs is detached from the variant or deleted from the product when no live Enad image backs it.

The image attribute filter applies to uploads and pruning. Images carrying an excluded attribute are removed from Shopify, and when an include-list is set, only images carrying one of those attributes are kept.

## Files (PDFs)

Product files never attach to the product gallery. They sync only when a metaobject mapper mapping with a file source exists, either `file` for all files or `file.<type>` filtered by file type.

| Event | What Enad sends |
|---|---|
| Product created or updated, file changes | Uploads each file to Shopify Files (Shopify downloads it from the Enad file URL), creates or updates a metaobject with the handle `file-<file ID>` holding the title, type, URL, and file reference, and writes the metaobject references to the product or variant metafield the mapping targets. |
| File deleted | Deletes the `file-<file ID>` metaobjects for file-source mappings. The Shopify file itself stays. |

## Categories and collections

Categories and collections sync as Shopify collections, adopting an existing collection by handle when one exists.

| Event | What Enad sends |
|---|---|
| Category or collection upsert | Title, handle, cover image, SEO fields, translations, and a parent collection reference metafield. Category collections also store the mapped Google product taxonomy ID. |
| Category or collection deleted | Removes the Shopify collection and its mapping. A category delete removes its child collections first, then its own. |
| Category or collection relationship changed | Re-syncs the affected product. |

## Markets and store groups

| Event | What Enad sends |
|---|---|
| Market upsert | Creates or updates the Shopify market, including its region conditions (the market's country codes) and base currency. |
| Market delete | First removes the market catalog and price list tied to the market, then the market itself. |
| Store group update | Ensures a Shopify market catalog and a matching price list for each of its markets. |
| Store group market changed | Keeps the catalog and price list pair for that group-market pair in step. |
| Store group delete | Clears the catalog and price-list mappings for the group. |

## Attributes

| Event | What Enad sends |
|---|---|
| Attribute upsert | One metaobject per attribute value for each matching metaobject mapper mapping, with locale translations, and the mapped metafield values on every product that owns the attribute. |
| Attribute deleted | Detaches the attribute's metaobject references from the owner products and deletes the mapped metaobjects. |
| Attribute relationship created or deleted | Sets or clears the attribute's mapped metafields on the product. Variant-owned attributes sync during variant sync instead. |

## Merchant users

| Event | What Enad sends |
|---|---|
| User created or updated | Upserts a Shopify customer, matched by the stored Shopify ID or looked up by email and phone number according to **User lookup strategy**. The payload carries email, name, phone, locale, one address, and email and SMS marketing consent from the user's communication preferences. |

The Shopify customer ID is stored on the Enad user and reused. A customer already linked to a different Enad user fails permanently.

## Shop setup

| Event | What Enad sends |
|---|---|
| App upsert | Enables each Enad app language as a Shopify shop locale and publishes the default language. These supported locales gate all translation registration. |

## Field mapping

| Enad data | Shopify destination |
|---|---|
| Product name | Product `title` |
| Slug | Product `handle` |
| HTML description | `descriptionHtml` |
| Status | Product `status` (`active` becomes active, everything else draft) and per-publication publishing |
| Brand | Product `vendor` |
| Tags | Product `tags` |
| Meta title and description | Product `seo` |
| Main category | Google product taxonomy on the product `category` |
| Categories and collections | Shopify collection membership and the `enad/parent_collection` reference metafield |
| Images and videos | Product media gallery, uploaded through staged uploads |
| PDF files | Shopify Files plus a `file-<file ID>` metaobject referenced from the mapped `list.metaobject_reference` metafield |
| Attributes | One metaobject per value, plus the mapped metafields on owner products |
| Variant number | Variant SKU |
| Price and sale price | `price` and `compareAtPrice` from the default store group and default currency; other markets go to price lists |
| Barcode, HS code, and country of origin custom fields | Inventory item fields |
| Weight | Variant weight in grams |
| Stock validation | `inventoryPolicy` and inventory tracking |
| Market prices | One price list per store group and market |
| Stock | Available quantity at the matching location |
| Merchant users | Shopify customers with marketing consent |

## Related

- [Shopify](/integrations/shopify)
- [Shopify configuration](/integrations/shopify/configuration)
- [Variant options](/integrations/shopify/variant-options)
