How to send back in stock alerts using Shopify Flow
STOQ integrates with Shopify Flow so you can send back-in-stock alerts through Shopify Flow instead of using STOQ's built-in email system. When a product is restocked and a customer is notified, STOQ fires a trigger inside Shopify Flow. You then connect that trigger to any action — like sending a marketing email — using Shopify's visual workflow builder. This gives you full control over your restock alert emails, including design, branding, and delivery through your preferred marketing tool.
What Is Shopify Flow?
Shopify Flow is a free automation tool built into Shopify that lets you create workflows without writing any code. Each workflow has three parts:
- Trigger — the event that starts the workflow (e.g., a customer is notified for a back-in-stock alert)
- Condition — an optional check that filters which events continue (e.g., the customer has a valid email address)
- Action — what happens when conditions are met (e.g., send a marketing email)
STOQ provides its own triggers that appear inside Shopify Flow. When you select Shopify Flow as your email platform in STOQ, the app stops sending emails itself and instead fires a Flow trigger for every notification. You build the rest of the workflow in Shopify Flow.
How to Set Up Back-in-Stock Alerts Through Shopify Flow
Setting up Shopify Flow for your back-in-stock alerts requires two steps: choosing Flow as your email platform in STOQ, and creating a workflow in Shopify Flow.
Step 1 — Select Shopify Flow as Your Email Platform
- In your Shopify admin, open STOQ and go to Back in stock alerts → Settings → Notifications.
- Click Customize email to open the email template editor.
- Under Email platform, select Shopify Flow.
- Click Save.




Step 2 - Download and Import into Shopify flow (Recommended)
To save you from building the workflow from scratch, STOQ provides a prebuilt Shopify Flow file you can import directly into your store. It already includes the STOQ trigger, the customer-data lookup, the email condition, and the loop — set up for Shopify Email. After importing, you only need to design the email and turn the workflow on.
- Download the workflow file. Open the link below and download the
.flowfile to your computer: Download the STOQ back-in-stock Shopify Flow (In Google Drive, click the Download icon in the top-right corner.) - In your Shopify admin, go to Settings → Shopify Flow (or search for "Flow" in the admin search bar).
- On the Shopify Flow home page, click the Import button (or the ⋯ / more actions menu, then Import).
- Select the
.flowfile you just downloaded and upload it. - Shopify opens the imported workflow in the editor so you can review each step.
- Open the Send marketing email action and design your email template (see Step 4). You can also adjust the trigger, condition, or loop if needed.
- When you're ready, click Turn on workflow to activate it.


Prefer to build it yourself? Follow Step 3 below instead of importing.
Step 3 — Build the Workflow Manually (Alternative to Importing)
When you create a workflow in Shopify Flow that uses a STOQ trigger and turn it on, Shopify automatically notifies STOQ through a lifecycle callback. STOQ then enables the trigger and turns on the Flow triggers master switch in your integrations settings — no manual setup needed on the STOQ side.
Follow these steps to create your workflow:
- In your Shopify admin, go to Settings → Shopify Flow (or search for "Flow" in the admin search bar).
- Click Create workflow.
- Click Select a trigger and search for STOQ.
- Select Customer notified for back in stock alert.
- Add a Get customer data action to retrieve the customer's details using an advanced query.
- Add a Condition to check that the customer's default email address is not empty and exists.
- If the condition is True, add a For each loop to iterate over the customer data results.
- Inside the loop, add a Send marketing email action.
- Configure the email action:
- Set Customer to the customer reference from the loop (e.g.,
{{getCustomerData.Foreachitem.id}}). - Choose or create an Email template with your branding and content.
- Click Turn on workflow to activate it.
Once you turn on the workflow, STOQ automatically detects that you are using its trigger. You can verify this by going to Back in stock alerts → Settings → Integrations → Shopify Flow — the Flow triggers toggle and the relevant trigger checkbox should now be enabled.
Step 4 — Design Your Email Template (Shopify Email)
- In the Send marketing email action, click Edit email to open the Shopify Email template editor.
- Customize the template with your store branding, product images, and messaging.
- Click Save when you are done.
The email template is managed entirely in Shopify — not in STOQ. This means you can use Shopify Email's full design tools, including your store logo, custom colors, product blocks, and call-to-action buttons.
Using Your Own Marketing Platform's "Send Email" Action
The steps above use Shopify Email and its Send marketing email action. If you already use another marketing platform — such as Klaviyo, Omnisend, or another email tool that offers a Shopify Flow extension — you can use that platform's own "send email" action inside your Flow workflow instead of the Shopify Email action.
To do this, build the workflow the same way (STOQ trigger → get customer data → condition → loop), but in the final step add your marketing platform's send-email action rather than Send marketing email:
- Inside the For each loop, click Add action.
- Search for your marketing platform (e.g., "Klaviyo").
- Select its send-email action and configure it with the customer and any data fields it supports.
- Turn on the workflow.
Why Product Data Cannot Be Passed into the Email Template
This is one of the most important things to understand when using Shopify Flow for back-in-stock alerts. Although STOQ sends product-level data in the trigger (Product ID, Variant ID, Variant name, checkout link, and product page link), Shopify Email templates do not accept dynamic product variables from Flow.
When you design your email in Shopify Email's editor, you pick a specific product from your catalog and that product is hardcoded into the template. There is no way to swap the product dynamically based on which item was restocked. As a result:
- Every back-in-stock email shows the same hardcoded product — not the product the customer actually signed up for.
- The Buy now / Shop now button links to the hardcoded product — not the restocked variant.
- Product images, titles, and prices are static — they do not change per notification.
This happens because the Send marketing email action in Shopify Flow is designed for general marketing campaigns, not transactional or event-driven emails like back-in-stock alerts. It was built to send the same branded content to a list of customers — not to personalize each email with different product data.
Variables Available in Shopify Email Templates
Shopify Email templates only support the following variable categories. Notice that no product variables are included — this is the core reason product data from STOQ's trigger cannot appear in the email.
Customer variables
Variable | Description |
|---|---|
Full name ( | |
Email address | |
| Phone number |
Shopify customer ID | |
| Default address on file |
| All addresses and total count |
| Order history and total count |
| Most recent order |
| Lifetime spend |
| Customer tags |
| Marketing consent status |
| Whether the customer has an account |
| Tax exemption status |
| Whether the customer is a B2B buyer |
| Saved payment methods |
| Store credit balance |
Shop variables
Variable | Description |
|---|---|
Store name | |
| Primary domain |
| Full store URL |
| |
| Store address (includes |
Email variables
Variable | Description |
|---|---|
| Email subject line |
| Preview text shown in inbox |
product.* or variant.* variables. This means the restocked product's title, image, price, variant name, checkout link, and product page link from STOQ's trigger data cannot be inserted into the email body. The only way to show a product in the email is to manually select one in Shopify Email's editor, which hardcodes it for all recipients.When to Send Alerts from STOQ or Klaviyo Instead
If you sell multiple products that go in and out of stock, the Shopify Flow approach has significant limitations. Here are the recommended alternatives.
Send Directly from STOQ
STOQ's built-in email system is purpose-built for back-in-stock alerts. It automatically fills in each email with the correct product title, image, price, variant name, purchase link, and unsubscribe link — no hardcoding needed. Every customer receives an email that matches the exact product and variant they signed up for.
To switch back to STOQ's built-in emails:
- Go to Back in stock alerts → Settings → Notifications.
- Click Customize email.
- Under Email platform, select STOQ.
- Click Save.
STOQ also supports reminder emails, per-product templates, and market-aware pricing — none of which are available through Shopify Flow.
Connect Klaviyo or Another Third-Party App
If you prefer an external marketing platform with advanced segmentation, A/B testing, or multi-channel flows, connect Klaviyo, Omnisend, or another supported integration. These platforms receive product-level data from STOQ and can dynamically populate each email with the correct product details.
To connect Klaviyo:
- Go to Back in stock alerts → Settings → Integrations.
- Open the Klaviyo integration.
- Enter your Klaviyo API key and enable the sync.
- Set Klaviyo as your email platform under Notifications → Customize email → Email platform.
Available Trigger Data
When the Customer notified for back in stock alert trigger fires, STOQ sends the following data to Shopify Flow. You can use these fields in conditions, actions, and email templates.
Field | Description | Example |
|---|---|---|
Customer ID | The customer's internal ID | |
Customer name | Full name | |
Customer first name | First name | |
Customer last name | Last name | |
Customer email | Email address used for the alert | |
Customer locale | Customer's language/locale | |
Customer phone | Phone number (if available) | |
Product ID | Shopify product ID | |
Variant ID | Shopify variant ID | |
Variant name | Name of the restocked variant | |
Market ID | Shopify market ID | |
Notification type | Channel type | |
Checkout link | Direct link to checkout with the product | URL |
Product page link | Link to the product page | URL |
Unsubscribe link | Link for the customer to unsubscribe | URL |
Alternative Trigger — Product Variant Restocked
STOQ also provides a Product variant restocked trigger for a different workflow approach. Instead of firing once per customer notification, this trigger fires once when a product variant comes back in stock.
Field | Description |
|---|---|
Product ID | Shopify product ID |
Variant ID | Shopify variant ID |
Market IDs | List of market IDs where the variant is restocked |
Use this trigger when you want to build your own notification logic entirely in Shopify Flow — for example, querying your customer list and sending bulk emails based on the restocked variant.
To enable it, go to Back in stock alerts → Settings → Integrations → Shopify Flow → Triggers tab and check Product variant restocked.
Automatic Customer Sync with Shopify
When Shopify Flow is your back-in-stock email provider, STOQ automatically keeps your customers synced to Shopify — no manual setup required. Here is how it works.
- STOQ passes the Shopify customer into the Flow trigger. Your Flow workflows can act on the actual customer — add tags, build segments, trigger follow-ups, or include them in marketing automations like abandoned cart.
- Customer sync happens automatically in real time. Whenever a visitor signs up for a back-in-stock alert, STOQ syncs them to your Shopify Customers list before the Flow trigger fires. If the customer already exists (matched by email or phone), STOQ links to their existing profile without creating a duplicate.
- No extra setup needed. Previously, you had to manually turn on customer sync in STOQ's integration settings. STOQ now handles this for you whenever Shopify Flow is your email platform.
This means the Get customer data and Send marketing email actions in your Flow workflow always have a valid Shopify customer to work with.
customer.tags, customer.orders_count, or customer.total_spent to build smarter automations — for example, only sending alerts to customers who have previously purchased, or tagging high-value customers for VIP notifications.Known Limitations
- Reminder emails are not supported. When you use Shopify Flow as your email platform, STOQ disables all reminder (follow-up) email templates. Only the first notification is sent via Flow.
- Flow events are rate-limited. For large waitlists, there may be a delay between when a product is restocked and when all trigger events are delivered to Shopify Flow.
- Shopify Flow is not available for preorder alerts. The Flow email platform option only applies to back-in-stock notifications, not preorder notifications.
- Paid STOQ plan required. Selecting Shopify Flow as your email platform and enabling Flow triggers requires a paid STOQ plan.
- Online Store 2.0 theme required. STOQ requires a Shopify Online Store 2.0 or newer theme for app embed functionality.
- Marketing email consent required. The Send marketing email action in Shopify Flow only sends to customers who have opted in to email marketing. Customers who have not subscribed to marketing will not receive the email.
- Product variables cannot be passed into Shopify Email templates. There is no way to dynamically insert product data (title, image, price, etc.) from the Flow trigger into the email. You must hardcode a specific product in the Shopify Email editor, which means every recipient sees the same product regardless of which item was restocked.
- Not ideal for multiple restocking products. Because the email template shows a single hardcoded product, this approach does not scale well if you regularly restock different products. Consider using STOQ's built-in emails or Klaviyo instead.
Troubleshooting
Symptom | Likely Cause | Fix |
|---|---|---|
Customers are not receiving emails | Email platform is not set to Shopify Flow in STOQ | Go to Back in stock alerts → Settings → Notifications → Customize email and select Shopify Flow under Email platform |
Trigger is not firing in Shopify Flow | The Flow trigger was not auto-enabled or the workflow is turned off | Verify your workflow is turned on in Shopify Flow. Then check Back in stock alerts → Settings → Integrations → Shopify Flow — the trigger should be enabled automatically. If not, enable it manually |
Workflow runs but no email is sent | Customer does not exist in Shopify or has not opted in to email marketing | Make sure Sync visitors with Shopify is enabled in the Shopify integration so customers are created in Shopify. Also check the customer's marketing consent in Shopify admin |
Emails are delayed for large waitlists | Flow events are rate-limited by Shopify | This is expected. Events are queued and delivered over time. No action needed — all customers will eventually receive the trigger |
Workflow shows an error on the condition step | Email address condition is misconfigured | Verify the condition checks that the default email address is not empty and exists |
Reminder emails stopped sending | Reminders are disabled when Flow is the email platform | Switch back to STOQ as the email platform if you need reminder emails |
FAQs
Q: Can I use Shopify Flow and STOQ's built-in emails at the same time?
A: No. You choose one email platform at a time. When Shopify Flow is selected, STOQ does not send emails itself — it fires a trigger and relies on your Flow workflow to handle delivery.
Q: Do I need to install Shopify Flow separately?
A: No. Shopify Flow is built into Shopify and available on all Shopify plans. You can access it from your Shopify admin under Settings or by searching for "Flow."
Q: Can I send SMS alerts through Shopify Flow?
A: The "Customer notified for email back in stock alert" trigger is specific to email notifications. SMS alerts are managed separately in STOQ's notification settings and are not routed through Shopify Flow.
Q: What happens if my Shopify Flow workflow is turned off?
A: STOQ will still fire the trigger, but Shopify Flow will not process it. Customers will not receive any email until the workflow is turned back on.
Q: Can I use a third-party email tool like Klaviyo or Mailchimp through Shopify Flow?
A: Yes. Instead of the built-in Send marketing email action, you can connect a third-party marketing app's Flow extension to your workflow. Many email marketing tools provide Shopify Flow actions for sending emails.
Q: Will switching to Shopify Flow affect my existing waitlists?
A: No. Your waitlists remain intact. The only change is how the notification email is delivered. Instead of STOQ sending the email directly, STOQ fires a Flow trigger and your workflow handles the rest.
Q: Why are reminder emails disabled when I use Shopify Flow?
A: Shopify Flow handles only the initial notification trigger. STOQ's reminder email system is not compatible with Flow-based delivery, so reminder templates are automatically disabled when you switch to the Flow email platform.
Q: Can I customize which data fields appear in my email template?
A: Yes. All trigger data fields (customer name, product details, checkout link, etc.) are available in Shopify Flow. You can reference any of these fields when building your email template or configuring actions in your workflow.
Q: Is Shopify Flow suitable if I restock many different products?
A: Not really. Because the email template is locked to a single hardcoded product, you would need to manually update it every time a different product restocks. For stores with multiple products going in and out of stock, STOQ's built-in emails or a third-party platform like Klaviyo are better options since they dynamically populate each email with the correct product data.
Updated on: 11/06/2026
Thank you!