# Add Your Constraints

{% hint style="info" %}
**Quick Answer:** Open your plan, click the **Constraints** tab, then click **Add Constraints**. Search for a SKU, Product Type, or Product Line, enter your minimum and maximum order quantities, and click **Add**. Run a Rebuild to apply them to the plan.
{% endhint %}

## What Are Constraints?

**Constraints are rules you apply to a plan** that reflect the real-world limits of your supply chain — supplier minimums, case pack sizes, target stock levels, and ordering frequencies. Without constraints, Mo's buy recommendations are based purely on demand math. With constraints, they're shaped to match what you can actually order.

**Time Required:** 5–10 minutes\
**Difficulty:** Beginner

**Before you begin:**

* [ ] An active plan already created
* [ ] Supplier MOQ data available for your key SKUs

***

## Types of Constraints

### Minimum Order Quantity (MOQ)

**MOQ** is the smallest quantity your supplier will accept per order. If Mo recommends 45 units but your supplier's MOQ is 50, setting this constraint ensures the plan always recommends at least 50.

### Maximum Order Quantity

**Max order quantity** caps how much Moselle will recommend in a single order. Useful for managing cash flow, storage capacity, or supplier allocation limits.

### Min/Max Stock Levels

**Min stock** sets a floor for ending inventory — Moselle will recommend ordering enough to stay above this level. **Max stock** caps ending inventory — Moselle will not recommend orders that push stock above this ceiling.

### Lead Time

**Lead time** (in days) tells Moselle how long it takes from placing an order to having usable inventory available. This controls when orders are triggered relative to projected stockouts — Moselle works backward from your projected depletion date by the lead time to determine the latest you can act.

For brands that **manufacture their own products**, lead time has two components that both need to be factored in:

| Lead Time Type                         | What It Covers                                                                             | Who It Applies To                                  |
| -------------------------------------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------- |
| **Manufacturing lead time**            | Time from placing a production order to finished goods being ready to ship                 | Brands that manufacture or assemble products       |
| **Raw material procurement lead time** | Time for components or raw materials to arrive at your factory before production can start | Brands that source components before manufacturing |

If your manufacturing process requires 90 days and your raw material supplier needs 30 days, your effective lead time is 120 days — Moselle needs to see the combined total to trigger orders at the right time.

Lead times can be set at the SKU level via custom attributes (highest priority) or as plan-level defaults when you create the plan.

***

## How to Add Constraints

{% stepper %}
{% step %}

### Open Your Plan

Navigate to **Planning** in the left nav and click into the plan you want to configure.
{% endstep %}

{% step %}

### Go to the Constraints Tab

Click the **Constraints** tab at the top of the plan page. This opens the constraints panel alongside your order schedule.
{% endstep %}

{% step %}

### Click "Add Constraints"

Click **Add Constraints** to open the search panel.
{% endstep %}

{% step %}

### Find the Item or Group

Search for the **SKU**, **Product Type**, or **Product Line** you want to constrain. Constraints can be applied at any level of the product hierarchy.

{% hint style="info" %}
**Setting constraints at scale:** Apply a constraint at the Product Line or Product Type level to cover all SKUs within that group at once. SKU-level constraints always take precedence — see the hierarchy below.
{% endhint %}
{% endstep %}

{% step %}

### Enter Your Values

Fill in the constraint fields relevant to your situation:

| Field            | Description                              | Example  |
| ---------------- | ---------------------------------------- | -------- |
| **Min Quantity** | Minimum units per order (MOQ)            | 50       |
| **Max Quantity** | Maximum units per order                  | 500      |
| **Min Stock**    | Minimum ending inventory (units or days) | 30 days  |
| **Max Stock**    | Maximum ending inventory cap             | 180 days |

You don't need to fill in every field — set only what applies.
{% endstep %}

{% step %}

### Click "Add"

Click **Add** to save the constraint. It will appear in your constraints list.
{% endstep %}

{% step %}

### Rebuild the Plan

After adding or changing constraints, click **Settings (⚙️) > Rebuild** to recalculate the plan with your new rules applied.

{% hint style="danger" %}
**Important:** Rebuilding the plan recalculates all buy recommendations from scratch. Any order quantities you have manually edited in the plan will be reset. Review and save any manual edits before rebuilding.
{% endhint %}
{% endstep %}
{% endstepper %}

***

## The 3-Tier Constraint Hierarchy

When constraints exist at multiple levels, Moselle uses a **3-tier priority system** to determine which one applies:

```
SKU Level         ← highest priority (always wins)
      ↓
Product Type Level
      ↓
Product Line Level ← lowest priority (broadest)
```

**In practice:**

| Scenario                                          | Which constraint applies? |
| ------------------------------------------------- | ------------------------- |
| SKU has its own MOQ + Product Line also has a MOQ | SKU-level MOQ wins        |
| No SKU constraint, but Product Type has a MOQ     | Product Type MOQ applies  |
| No SKU or Product Type constraint                 | Product Line MOQ applies  |
| No constraints at any level                       | No MOQ enforced           |

{% hint style="success" %}
**Recommended approach:** Set a baseline constraint at the Product Line or Product Type level, then override with SKU-level constraints only where individual products have different supplier requirements.
{% endhint %}

***

## Troubleshooting Constraints

### My MOQ constraint doesn't seem to be applying

1. Open the Constraints tab and confirm the constraint is saved (it appears in the list)
2. Check the hierarchy — a SKU-level constraint may be overriding your Product Line setting
3. Run **Settings (⚙️) > Rebuild** — constraints only apply after a rebuild
4. Verify you're looking at the correct plan — constraints are per-plan, not global

### My recommendations look too high or too low after adding constraints

* **Too high:** Check for a Min Stock constraint that's set very high, or a Min Quantity (MOQ) that's inflating orders beyond true demand
* **Too low:** Check if a Max Quantity or Max Stock constraint is capping orders below what demand requires
* Use Mo: "Show me constraint conflicts for my Grade A items" or "Why is this SKU's suggested order so high?"

### How do I remove a constraint?

In the Constraints tab, find the constraint in the list and click the delete icon. Then rebuild the plan.

***

## Using Mo to Debug Constraints

Mo can help you find and fix constraint issues without manually scanning the list:

* "Show me all SKUs where the MOQ constraint is inflating my order quantities"
* "Are there any constraint conflicts for my Grade A items?"
* "Why is the Product Line constraint not applying to \[SKU name]?"
* "Check if any SKU-level constraints are overriding my product line settings"
* "List items where max stock constraints are limiting my coverage"

***

## Related Guides

{% content-ref url="/pages/8QlNv4eTnXy8INtmWeyS" %}
[Create a Replenishment or Allocation Plan](/planning-and-execution/replenishment/create-a-production-plan.md)
{% endcontent-ref %}

{% content-ref url="/pages/XujjS3140dWgq4aagxaz" %}
[Manage Your Production Plan](/planning-and-execution/replenishment/production-planning.md)
{% endcontent-ref %}

{% content-ref url="/pages/I9gucwtJ2LWj6vkAOOjb" %}
[Advanced Production Plans Guide](/planning-and-execution/replenishment/advanced-production-plans.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.moselle.io/planning-and-execution/replenishment/add-your-constraints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
