> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://molsoft.crisp.help/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 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

1. **Navigate to MinCart** and create a new limit.
2. **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.
* **Enforce on the storefront:** keep it on.
* **Audience Type**: **Everyone**
* **Tags Exclusion**: Leave this field blank.
![](https://storage.crisp.chat/users/helpdesk/website/4dd3899948d8e000/monosnap-molsoft-shawn-dev-sto_1k7w94l.png)
* **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_1gik1p2.png) ![ ](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.
![](https://storage.crisp.chat/users/helpdesk/website/4dd3899948d8e000/monosnap-molsoft-shawn-dev-sto_1ehwhtf.png)
* **Text for Maximum Not Respected**: Customize the message displayed to customers, explaining why the product cannot be added to their cart.
3. **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.

1. **Trigger**: Inventory level changes.
2. **Condition**: If inventory reaches the specified level (e.g., 0).
3. **Action**: Add the tag **"Online Out of Stock"** to the product.
4. 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

1. Open your **Shopify Admin**.
2. Navigate to **Apps** and open **Shopify Flow**.

### Step 2: Select the Template

1. Click on **Browse templates**.
2. In the search field, type: **"Tag out of stock products for a single location only"**.
3. Select the template from the search results or directly access it here: [Tag out of stock products template](https://shopify.com/admin/apps/flow/editor/templates/f310fc68-64c7-4234-91ea-888555a3ab8e).

### Step 3: Install and Adjust the Workflow

1. Click **Install** to add the Flow template to your workflows.

#### Modify the Workflow Actions:

1. **Delete Unnecessary Actions**:
* Locate and delete the last two actions labeled **"Send Internal Email"**, as this step is not required.
![](https://storage.crisp.chat/users/helpdesk/website/4dd3899948d8e000/monosnap-molsoft-shawn-dev-sto_2tps63.png)

2. **Adjust Inventory Level Settings**:
* Click on the **first Check If box** in the workflow.
![](https://storage.crisp.chat/users/helpdesk/website/4dd3899948d8e000/monosnap-molsoft-shawn-dev-sto_1us9k4v.png)

* Adjust the **inventory level** to set when the tag should be added (e.g., when inventory = 0).
![](https://storage.crisp.chat/users/helpdesk/website/4dd3899948d8e000/monosnap-molsoft-shawn-dev-sto_ts3trz.png)
* Update the **Tags\_item** field with the tag you created in MinCart.
![](https://storage.crisp.chat/users/helpdesk/website/4dd3899948d8e000/monosnap-molsoft-shawn-dev-sto_oquk4b.png)
3. **Remove Location-Specific Conditions**:
![](https://storage.crisp.chat/users/helpdesk/website/4dd3899948d8e000/monosnap-molsoft-shawn-dev-sto_a2u5hd.png)
* Delete the step: **\[inventoryLevels\_item.location.name]** (this step is not needed).

4. **Modify the "Otherwise - Check If" Condition**:
* Click on **"Otherwise - Check If"**.
![](https://storage.crisp.chat/users/helpdesk/website/4dd3899948d8e000/monosnap-molsoft-shawn-dev-sto_1gsk4hx.png)
* Under **Tags\_item**, add your MinCart tag.
![](https://storage.crisp.chat/users/helpdesk/website/4dd3899948d8e000/monosnap-molsoft-shawn-dev-sto_u8idwh.png)
* In the **Available Step**, configure the **available quantity** to remove the product tag when inventory is replenished.

  ![](https://storage.crisp.chat/users/helpdesk/website/4dd3899948d8e000/monosnap-molsoft-shawn-dev-sto_1y8qv06.png)
* Delete the step: **\[inventoryLevels\_item.location.name]**.
![](https://storage.crisp.chat/users/helpdesk/website/4dd3899948d8e000/monosnap-molsoft-shawn-dev-sto_i50leb.png)
### Step 4: Turn On the Workflow

1. 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.