Configure Planning Rules
Use Planning Rules to resolve product, category, vendor, warehouse, ordering, stockout, transfer, supply, and quantity behavior from one scope layer.
Planning Rules are the scope-resolution layer for replenishment. A rule can apply broadly, while a more specific rule can override it for a product, category, vendor, or warehouse.
Create a rule
- Open Inventory > Niyu AI > Configuration > Planning Rules.
- Create a rule with a clear business name.
- Set Company and optional Warehouse and Vendor.
- Choose at most one product scope: Product, Product Template, or Product Category.
- Set Priority for intentional tie-breaking between otherwise comparable matches.
- Configure the behavior groups and add a short reason in Why this rule exists.
- Save, run a forecast, and use Open Matching Lines to verify the result.

How a rule is selected
The planner prefers the most specific matching scope. Exact products normally outrank templates and categories. Warehouse and vendor conditions narrow the match, while Priority resolves intentional overlaps. The Action Line shows the selected Planning Rule, Applied Rule Summary, and override summary.
Avoid ambiguous overlaps
Do not create several active rules with the same effective scope and priority unless the tie-break is deliberate and tested.
Service and coverage fields
- Service Level Target: the desired service input used by the planning policy where applicable.
- Minimum Days of Stock: the lower coverage threshold used for health and action decisions.
- Maximum Days of Stock: the intended target coverage for continuous review, subject to cadence protection.
- Safety Stock Days: extra demand coverage added to the protected period.
Lead time
- Use Vendor Lead Time: use the applicable supplier lead time.
- Simple Lead Time: set one planning lead-time value on the rule.
- Cargo Ready + Transit: separate supplier preparation from transport time.
Lead time affects when supply can arrive and how much demand must be protected. For periodic ordering, the complete protection period also includes the interval until the following review.
Order constraints
- Fixed Order Quantity: use one fixed executable lot when the rule applies.
- Quantity Multiple: round to a carton, pallet, batch, or other order step.
- Minimum Order Quantity: raise a positive requirement to the minimum.
Executable purchase quantities also respect the stock UoM, purchase UoM, supplier minimums, Order Step, and Case Pack. The final RFQ is converted to the purchase UoM.
Supply to count before buying
- Include Incoming PO: reduce the requirement with eligible dated purchase supply.
- Include Incoming Transfers: reduce the requirement with eligible dated inbound internal transfers.
- Include Draft RFQs: count draft requests only when they are reliable operational commitments.
Ordering Cadence
Select an Ordering Profile for reusable cadence, or configure continuous, recurring, or manual dates directly on the rule. The form previews next review, following review, and the total protection period.
Profiles apply through rules
A Default Vendor or Default Warehouse on an Ordering Profile helps users identify the profile. It does not assign the profile to products. Link the profile to a matching Planning Rule.
Stockout Handling override
Choose Use Global Setting, Flag only, Estimate constrained demand, or Ignore stock availability. Use a narrow override for special product groups instead of changing the global treatment for every item.
Internal Rebalancing overrides
- Internal Rebalancing Strategy: use global, transfer first, buy direct, or transfer only.
- Replenishment for Destination: allow planning or block replenishment for the matched product-warehouse scope.
- Transfer In and Transfer Out: independently allow or block receiving and supplying stock.
- Transfer Scope and Allowed Transfer Networks: narrow eligible warehouse routes.
- Transfer Lead Time: use global/network timing or define a rule-specific value.
Purchase Schedule Profile
Link a Purchase Schedule Profile when the final executable buy should be split into dated batches. Scheduling happens after the central recommendation and planner quantity are resolved.
Bulk maintenance
Use Bulk Update Rules for large controlled changes. Prepare a UTF-8 CSV with a product identifier and only the planning fields that should change. Test a small sample, review created, updated, skipped, and error counts, then verify matching Action Lines after the next sync.
User Roles and Company Access
Assign Forecast User or Forecast Manager access while preserving Odoo company, warehouse, purchasing, and inventory security.
Ordering Profiles for Continuous and Periodic Review
Create reusable continuous, recurring, or manual purchasing calendars and apply them to products through Planning Rules.
