Skip to main content

Tracked event catalog

SHOPIFY_TRACKED_TOPICS is the source of truth for webhook registration and subscriber eligibility. The current allowlist contains 39 topics across 12 resource modules.

Topic-to-module mapping

ModuleTracked Shopify topicsHandler / serviceSnapshot table
Ordersorders/create, orders/updated, orders/paid, orders/cancelled, orders/fulfilled, orders/partially_fulfilled, orders/delete, orders/editedShopifyOrdersHandler / ShopifyOrdersServiceshopify_orders
Checkoutscheckouts/create, checkouts/update, checkouts/deleteShopifyCheckoutsHandler / ShopifyCheckoutsServiceshopify_checkouts
Cartscarts/create, carts/updateShopifyCartsHandler / ShopifyCartsServiceshopify_carts
Productsproducts/create, products/update, products/deleteShopifyProductsHandler / ShopifyProductsServiceshopify_products
Customerscustomers/create, customers/update, customers/delete, customers/enable, customers/disableShopifyCustomerHandler / ShopifyCustomersServiceshopify_customers
Customer groupscustomer_groups/create, customer_groups/update, customer_groups/deleteShopifyCustomerGroupsHandler / ShopifyCustomerGroupsServiceshopify_customer_groups
Payment termspayment_terms/create, payment_terms/update, payment_terms/deleteShopifyPaymentTermsHandler / ShopifyPaymentTermsServiceshopify_payment_terms
Refundsrefunds/createShopifyRefundsHandler / ShopifyRefundsServiceshopify_refunds
Selling plan groupsselling_plan_groups/create, selling_plan_groups/update, selling_plan_groups/deleteShopifySellingPlanGroupsHandler / ShopifySellingPlanGroupsServiceshopify_selling_plan_groups
Returnsreturns/approve, returns/cancel, returns/close, returns/decline, returns/reopen, returns/requestShopifyReturnsHandler / ShopifyReturnsServiceshopify_returns
Reverse deliveriesreverse_deliveries/attach_deliverableShopifyReverseDeliveriesHandler / ShopifyReverseDeliveriesServiceshopify_reverse_deliveries
Reverse fulfillment ordersreverse_fulfillment_orders/disposeShopifyReverseFulfillmentOrdersHandler / ShopifyReverseFulfillmentOrdersServiceshopify_reverse_fulfillment_orders

Allowlist enforcement points

The same tuple is reused in three places:

  1. shopify.webhooks.WEBHOOK_TOPICS registers only these topics with Shopify.
  2. subscriber.router creates handler mappings only for normalized versions of these topics.
  3. parse_shopify_event() rejects any normalized event type outside the tuple.

Tests assert that every allowlisted topic has a handler, parses with a minimal object payload, maps to the expected resource table, and round-trips between slash and dot notation.

Examples explicitly rejected by tests include fulfillments/create and app/uninstalled.

Operation semantics

The parser sets is_deleted = true only when the text after the first slash is exactly delete.

This means:

  • orders/delete, checkouts/delete, products/delete, customers/delete, customer_groups/delete, payment_terms/delete, and selling_plan_groups/delete soft-delete their snapshots.
  • Returns operations such as cancel, close, and decline remain active snapshots with is_deleted = false; their business state remains inside the payload.
  • reverse_fulfillment_orders/dispose also remains is_deleted = false under the generic parser.

Parsing depth by event family

Event familyStructural validationField-level typed parsingStored parsed_payload
Customers create/update/deleteYesYes, existing customer dataclass parsersDataclass converted to JSON dictionary
Customers enable/disableYesNoOriginal payload
All other 10 modules plus customer groupsYesNoOriginal payload

The handler/service split makes future module-specific parsers straightforward: each service can call a dedicated parser while keeping storage and retry behavior unchanged.