Articles on: Scenarios

Blocking Products Based on Inventory Levels Using MinCart

Blocking Products Based on Inventory Levels Using MinCart



In this scenario, MinCart will be used to block products from being added to the cart once they reach a specific inventory level. This setup involves creating a limit in MinCart and automating product tags through Shopify Flow based on inventory levels.

How It Works



When a product's inventory reaches the specified level, Shopify Flow will add the "Online Out of Stock" tag to the product.
MinCart will detect the tag and block the product from being added to the cart.
The custom message will guide customers on what to do next.

Step 1: Create a Limit in MinCart



Navigate to MinCart and create a new limit.
Configure the Limit Settings as follows:
Limit Type: Tag
Limit Name: Assign a clear and unique name to identify the limit's purpose. Example*: "Limited Inventory"
Activation Dates: Set to today's date to activate the limit immediately.
Active: Ensure this box is checked.
Audience Type: Everyone
Tags Exclusion: Leave this field blank.

Items to Target: Enter the product tag that will be added/removed via Shopify Flow. Example*: "Online Out of Stock"
![](https://storage.crisp.chat/users/helpdesk/website/4dd3899948d8e000/monosnap-molsoft-shawn-dev-sto_14e7g7t.png)
Set Limits: Select By Quantity.
Maximum Tag Quantity: Set to 0 to block tagged products from being added to the cart.

Text for Maximum Not Respected: Customize the message displayed to customers, explaining why the product cannot be added to their cart.
Save the limit.

Step 2: Automate Product Tags in Shopify Flow



To complete this process, you’ll need to create an automation in Shopify Flow that adds or removes the tag ("Online Out of Stock") based on product inventory levels.

Trigger: Inventory level changes.
Condition: If inventory reaches the specified level (e.g., 0).
Action: Add the tag "Online Out of Stock" to the product.
Optionally, remove the tag if inventory becomes available again.

Support Guide: Setting Up Shopify Flow to Tag Out-of-Stock Products for a Single Location

Follow these steps to configure Shopify Flow to automatically tag out-of-stock products for a specific location using a pre-built template:

Step 1: Access Shopify Flow



Open your Shopify Admin.
Navigate to Apps and open Shopify Flow.

Step 2: Select the Template



Click on Browse templates.
In the search field, type: "Tag out of stock products for a single location only".
Select the template from the search results or directly access it here: Tag out of stock products template.

Step 3: Install and Adjust the Workflow



Click Install to add the Flow template to your workflows.

Modify the Workflow Actions:



Delete Unnecessary Actions:
Locate and delete the last two actions labeled "Send Internal Email", as this step is not required.


Adjust Inventory Level Settings:
Click on the first Check If box in the workflow.


Adjust the inventory level to set when the tag should be added (e.g., when inventory = 0).

Update the Tags_item field with the tag you created in MinCart.

Remove Location-Specific Conditions:

Delete the step: [inventoryLevels_item.location.name] (this step is not needed).

Modify the "Otherwise - Check If" Condition:
Click on "Otherwise - Check If".

Under Tags_item, add your MinCart tag.

In the Available Step, configure the available quantity to remove the product tag when inventory is replenished.


Delete the step: [inventoryLevels_item.location.name].

Step 4: Turn On the Workflow



Click Turn on workflow to activate it.

Workflow Summary


This setup will:

Tag products as out of stock when inventory reaches a defined level (e.g., 0).
Use your MinCart tag to streamline product limitation.
Automatically remove the tag when inventory becomes available again.

Updated on: 17/12/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!