Connect Shopify order events
Shopify can tell Munin when an order is created, paid, fulfilled or cancelled. Each signed webhook becomes a product event on the customer's contact — order.paid and so on — with only the order number, total, currency and status. Nothing else about the order is kept; for line items or tracking, look the order up live with commerce_lookup_order.
1. Find the connection
connectors_list_connections with domain commerce lists the Shopify connections. If there is none, set one up first (shop domain and Admin API token).
2. Get the webhook URL
commerce_get_order_event_setup returns, per Shopify connection, the webhook URL and the topics Munin listens to. Give the operator these steps in Shopify admin:
- Settings → Notifications → Webhooks → Create webhook.
- Event: one of
Order creation,Order payment,Order fulfillmentorOrder cancellation; format JSON; URL from the setup result. Repeat for each event they want. - Copy the signing secret Shopify shows under the webhook list ("Your webhooks will be signed with …").
3. Store the signing secret
The secret goes into the connection's webhookSecret field through the credential link from connectors_request_credentials — never paste it into chat. Until it is stored, signingSecretSet is false and Munin refuses the webhooks, because it cannot check that they came from Shopify.
4. Check it works
Ask the operator to place or mark a test order, then analytics_list_product_event_names should show order.paid (or the topic they chose). Orders without a customer email are skipped, since there is no one to attach them to. A guest checkout's email is whatever the shopper typed, so its event is tied to a contact only when Shopify has verified that customer's email; otherwise it is recorded on nobody and enters no journey. Each event is keyed on the signed body, so a replayed webhook is a duplicate, and an order last changed more than three days before it arrives is ignored.
Using the events
- Journey entry on
order.paid(for example a post-purchase follow-up),wait_foronorder.paidafter a quote or trial, or a goal oforder.paid. - Segment filters on events, such as "no
order.paidin the last 90 days" for win-back.