How it works
This workflow starts when Shopify inventory changes. It continues only when a variant moves from more than two units to one or two units. Zero stock is excluded.
Wysh finds customers who have saved the variant. Shopify Flow then fetches up to 100 matching customers whose email marketing status is SUBSCRIBED and posts a Low stock of wishlist item custom event to Attentive for each returned customer.
Before you start
- Install Shopify Flow and Wysh.
- Enable Shopify inventory tracking for the variants you want to monitor.
- Create an Attentive custom app with write access to Custom Events.
- Copy the bearer token. The downloaded workflow leaves the token blank.
- Review whether the built-in threshold of two units suits your stock model.
Install the workflow
- Download the ZIP and extract
wysh_attentive_wishlist_item_low_stock.flow. - In Shopify Flow, choose Import workflow.
- Select the extracted
.flowfile. - Review the inventory conditions, Wysh lookup, customer query, loop and HTTP request.
- Save the workflow without switching it on.
Connect Attentive
- Open the Send HTTP request step inside the customer loop.
- Find the
Authorizationheader. - Enter
Bearer YOUR_TOKEN, keeping one space afterBearer. - Leave the Attentive Custom Events endpoint and payload structure in place.
Customise the threshold
Change both inventory conditions if you need a different low-stock threshold. The default logic detects the transition from above two units to either one or two units.
How customers are selected
Wysh returns customer IDs for the affected variant. The workflow ignores an empty result, then requests up to 100 matching Shopify customers whose email marketing status is subscribed. Each returned customer receives a separate Attentive request.
The template does not continue beyond the first 100 matching subscribed customers in a single run. Review this limit for high-volume products.
Enable and test
- Use a tracked test variant saved by a subscribed test customer.
- Set its inventory above two, then reduce it to two or one.
- Confirm the Flow run passes all stock checks and returns a successful HTTP response.
- Check the
Low stock of wishlist itemevent in Attentive. - Restore the test inventory before activation.
Troubleshooting
- Workflow does not continue: confirm inventory crossed from above two to one or two.
- No customers found: confirm the exact variant is saved in Wysh.
- Customer excluded: check that their Shopify email marketing status is subscribed.
- HTTP request fails: check the bearer token, endpoint and Flow response.