How to receive an email when a product goes out of stock
Having up-to-the-minute information regarding your Shopify store’s inventory levels can be challenging. This post will show you how to receive an email when a Shopify product goes out of stock. Using the built-in app, Email by MESA, you can set things up in just a few clicks!
Step by Step Instructions
1. First, click your MESA Discover tab, and select the blue Create your own workflow button in the right-hand corner. You’ll need to name your workflow; we’ll call this one “Receive an email when a product goes out of stock” Click the pink Continue button when finished.
2. Second, you’ll want to pick the Trigger step, the first step in a workflow that causes automation to begin. In this case, you’ll want to start with Shopify and select Order Created.
3. Next, set up your Action Step, which is any additional step beyond the Trigger step. In the search field of the Action Step, search for “Loop By MESA.” Under the Setup Configuration, you will need to assign snippets of data called Variables to ensure the correct information is being pulled in. You can utilize MESA Tokens by clicking the {+} icon to find the right Token value for any field in the step.
Under Order Created in the right-hand menu, select Line Items, which will assign the values to loop over. MESA will repeat the next step in your workflow for each value identified in the Loop step.
4. In the next Action Step, you’ll want to type search for Shopify in the search field. This time you’ll select Retrieve Variant, and under Step Configuration in the Variant ID field, select the Loop Variant ID token.
5. Now, you’ll need to add MESA built-in app, Filter by MESA, as your next action step. Under Step Configuration in the field, select the Retrieve Variant Inventory Quantity token. This will ensure that MESA checks for an inventory of zero before moving on to the next step. If you want to change the quantity to check for, simply adjust the value in the numerical field.
Almost there!
6. Finally, add the built-in app Email by MESA as the last step in your workflow. In the Recipient field, type in {{context.shop.email}} which will pull in your store’s email address. Tailor the Subject line to any messaging you want; by adding a Retrieve Variant Sku token, you can include the product SKU in the subject line.
The Message field can include anything you’d like to be notified about. The below example uses a variety of tokens to report the SKU of the out-of-stock item and a link to the product.
7. In the end, you will be prompted to turn On, Test, or Save your workflow. We recommend testing your workflow before turning it on to ensure everything is working properly.