When a product variant is restocked in Shopify, a specific chain of events fires in Galantis — from webhook receipt through restock detection, trigger evaluation, and message dispatch to every qualifying subscriber. Understanding this pipeline helps diagnose timing expectations, troubleshoot missed notifications, and configure the automation correctly.Documentation Index
Fetch the complete documentation index at: https://docs.digifist.com/llms.txt
Use this file to discover all available pages before exploring further.
What this covers
- The full notification pipeline step by step
- What Galantis detects as a restock event
- How the BACK_IN_STOCK automation trigger fires
- Which subscribers receive notifications and which are excluded
- Credit consumption
- Timing expectations
The notification pipeline
Step-by-step breakdown
Step 1–2: Shopify webhook
The pipeline starts in Shopify. When a merchant updates inventory — manually in the Shopify admin, through a warehouse or fulfillment integration, or via the Shopify API — Shopify saves the change and fires aproducts/update webhook to all registered apps, including Galantis.
The webhook fires for any product update, not only inventory changes. Galantis must identify whether the update contains a relevant inventory change.
Step 3–4: Restock detection
ProcessShopifyProductUpdatedJob receives the webhook payload and scans the variant data for inventory changes. It specifically looks for the pattern: a variant whose inventory_quantity has changed from 0 to any positive value. This is the definition of a restock event in Galantis.
Updates that do not match this pattern — a variant going from 5 to 10, a price change on an in-stock variant, or a title update — do not trigger the Back-in-Stock pipeline, even though they arrive via the same webhook.
A variant that goes from
0 to 0 — for example, a product update where inventory remains zero — does not trigger the pipeline. The detection requires a positive inventory value, not just a change event.Step 5: Trigger fires
Once a restock event is identified for a specific variant, theBACK_IN_STOCK automation trigger fires. This trigger is scoped to the variant — it fires independently for each variant that restocks, even if multiple variants of the same product restock simultaneously.
Step 6: Subscriber query
Galantis queries all subscription records for the restocked variant and filters to those withACTIVE status. Subscriptions in PENDING, NOTIFIED, or CANCELLED status are excluded at this step.
Step 7–8: Per-subscriber eligibility checks
For eachACTIVE subscriber, Galantis applies two eligibility checks before enrollment:
Consent check — The subscriber’s marketing_state must be SUBSCRIBED. Subscribers with UNSUBSCRIBED, REDACTED, PENDING, or any other non-subscribed state are excluded. See Consent & Opt-outs.
Frequency cap check — The subscriber must not be within the automation’s frequency cap window. A 24 hours cap on the Back-in-Stock automation prevents a subscriber from receiving multiple notifications within a 24-hour period — relevant if the same variant restocks and sells out multiple times in quick succession. See Automations — Frequency Caps.
Step 9–10: Enrollment and dispatch
Subscribers who pass both checks are enrolled in the Back-in-Stock automation flow. The Action Node sends the approved restock notification template immediately — no delay node is used in the standard Back-in-Stock recipe, because the customer explicitly requested to be notified as soon as the product is available. Template variable mapping at the Action Node should include the customer’s name and the product name. See Automations — Recipes — Back-in-Stock Notification for the recommended template configuration.Step 11: Status update
After the notification is dispatched, each enrolled subscriber’s subscription status moves fromACTIVE to NOTIFIED. This transition happens regardless of whether the message was successfully delivered — it is a dispatch record, not a delivery confirmation.
A subscriber whose message failed (due to a phone number error, a missing calling code, or insufficient credits) will have NOTIFIED status even though they did not receive the message. Check the automation activity log for the specific failure reason per subscriber.
Step 12: Credit consumption
Credits are consumed per notification successfully sent — not per subscriber enrolled. A notification that fails before reaching the WhatsApp API does not consume a credit. See Back-in-Stock Add-on Billing.Timing expectations
The notification pipeline is designed for near-real-time delivery. The time between a merchant updating inventory in Shopify and a subscriber receiving a WhatsApp message is typically a matter of seconds to a low number of minutes, depending on:- Shopify webhook delivery latency (typically seconds)
- Galantis queue depth at the time of processing
- WhatsApp API delivery to the subscriber’s device
What can prevent a notification from sending
| Cause | Result | How to identify |
|---|---|---|
Subscriber in PENDING, NOTIFIED, or CANCELLED status | Not enrolled | Subscription status in Back-in-Stock → Subscriptions |
Subscriber’s marketing_state ≠ SUBSCRIBED | Skipped — consent check failed | Contact profile in Audience → Contacts |
| Subscriber within frequency cap window | Skipped — cap active | Automation activity log |
Notification template not APPROVED | Flow fails for all subscribers | Template status in Templates |
| Insufficient credits | Fails after partial dispatch | Billing balance in Billing → Overview |
| Phone number missing calling code | FAILED per subscriber | Automation activity log, error: CUSTOMER_IS_MISSING_CALLING_CODE |
Related guides
- Subscription Lifecycle — How subscription statuses affect notification eligibility
- Product & Inventory Rules — Per-variant rules that affect which variants can trigger the pipeline
- Automations — Recipes — Back-in-Stock Notification — The automation flow configuration
- Automations — Activity Tracking — Diagnosing per-subscriber notification outcomes
- Support — Message Delivery — Resolving delivery failures