xMatix
Sign in Request demo
xMatix
PRODUCTS
SalesField SalesCRMRewardsClaimsInventoryProcurementWarehouse ManagementField ServiceServiceSupportTelephony & MessagingFinance & AccountingPayrollExpense ManagementCommercePortalsAnalytics & ReportingData StudioMobile AppSee all products →
PLATFORM
Platform overviewApp BuilderAutomationIntegrationsSecurity & GovernanceChange ManagementDevelopers
SENSE AI
Sense AI overviewSense AssistSense ControlSense VisionAI StudioTrust & governanceIn Claude & ChatGPTUse cases
SOLUTIONS
FMCG & DistributionManufacturing & Dealer NetworksAutomotive & DealershipsPharma & HealthcareConsumer DurablesAgri-InputsBuilding MaterialsService NetworksWarehousing & 3PLFinancial AccountingERP SoftwareIndia GST ComplianceUAE VAT & e-InvoicingSaudi ZATCA & VATAll solutions →
RESOURCES
Knowledge CenterDeveloper & CLIBlogGuidesWhat is xMatix?Company facts
COMPANY
AboutCareersPartnersEventsContactAuthorsLegal
Sign in Request demo
Home/Docs/Procurement/Auto-order: rules-based purchase suggestions
HOW-TO · Last reviewed

Auto-order: rules-based purchase suggestions

VIDEO
Auto-order: generating purchase suggestions with full arithmetic
A 5-minute walkthrough of this page is coming soon — the written steps below cover the same ground.

An auto order is a worksheet of purchase suggestions computed by explicit stock rules — not a prediction. Three engines cover three buying styles, and every suggested line stores the numbers that produced its quantity, so you can always read why before you buy. Nothing is purchased automatically: you review the lines, adjust them, and only then generate the purchase order.

Open the Procurement app and choose Auto Orders. The list is titled All Auto Purchase Orders; a saved record has four tabs — Auto Order Setting, Lines, Related and Details.

The engines

An auto order's Auto Order Type picks its engine. The picklist offers five values; the code implements four of them.

TypeWhat it doesSuggested quantity
Minimum Stock LevelSuggests an item when its available stock at the branch is below the planning row's minimum stock level. Only branch-scoped planning rows are read by this engine.The row's reorder quantity — or, when no reorder quantity is set, the shortfall up to the minimum. An item with a planning row but no stock record at all is suggested at its reorder quantity or minimum.
ReplenishSuggests what was consumed — allocated to order or service-order fulfilment at the branch — since the branch's most recent Replenish auto order date.The allocated quantity since that date: buy back what went out.
ForecastingProjects the stock position forward by netting inbound supply and committed demand, then applies a reorder-point rule.Whatever tops the item back up to its maximum order quantity.
TemplateA reusable Forecasting configuration. It never holds lines; it spawns a fresh, dated Forecasting order that copies its scope, price list, budget and include/exclude flags.Not applicable — the spawned order runs the Forecasting engine.
Back OrderPresent in the picklist but not implemented by any engine. Lines is refused on an order of this type.None.

All the per-item inputs — minimum stock level, reorder quantity, minimum/maximum order quantity, lead time, average consumption, ABC and FSN categories — come from the item's inventory planning attributes (Item Inventory Attributes), which can be scoped per SKU, branch and partner account. See the configuration reference.

How Forecasting projects the pipeline

Forecasting is the only engine that looks forward. For every planning row in scope (branch and partner match, or unscoped), it nets the pipeline and applies a fixed min/max rule:

projected     = available + in-transit shipments + pending purchase orders
                − open requisitions − open sale orders
reorder point = lead time × average consumption + minimum order quantity
suggested     = maximum order quantity − projected   (only when projected ≤ reorder point)

The Inventory Projections switches on the saved order's Auto Order Setting tab choose which pipeline sources count: Include In-Transit Shipments, Include Pending Purchase order, Consider Open Sale Order and Consider purchase requisition. Any individual shipment, purchase-order, requisition or sale-order line can opt out of the maths with its Exclude In Auto Order flag. Where several planning rows match the same item and SKU, their numeric parameters are averaged.

The fifth switch, Consider High probability quote, is stored and copied to spawned orders but is not read by the engine — the quote quantity in the projection is always zero. Leave it off; ticking it changes nothing.

What gets excluded

Exclusion flags on the Auto Order Setting tab skip whole item categories on every engine:

  • Exclude FSN Items: fast-moving, slow-moving or non-moving items.
  • Exclude ABC Items: A-, B- or C-category items.

Categories come from the item's planning row; an item with no row has no category and is never excluded this way — and, having no parameters, it is never suggested either.

Fit to Budget

Fit to Budget (field BudgetAmount) caps the priced worksheet. After the engine has produced lines and priced them, if the total amount exceeds the budget every priced line's quantity — suggested, derived and pending — is scaled down by the same factor (budget ÷ total) and rounded to two decimals so the order fits. Lines whose price-list lookup returned zero are left untouched: they consume no budget, and trimming them would only hide a missing price. Zero or blank means no cap.

The cap is applied by the Lines and Order from Template actions. The scheduled job prices and totals the lines it generates but does not apply the budget cap, so a scheduled Forecasting order can exceed its budget until someone regenerates it with Lines.

The arithmetic snapshot on every line

Every suggested line records its inputs, not just its answer. All engines store Suggested Quantity, Quantity (what you may edit) and Pending Quantity (what a purchase order would take), and — when the header's open-order calculation is on — the Open Order Quantity already pending on purchase orders for the same partner, branch, item and SKU. Forecasting lines freeze the full pipeline snapshot:

FieldWhat it held at suggestion time
Projected QuantityThe netted stock position the rule fired on.
Quantity AvailableOn-hand stock.
Pending Shipment / Pending Purchase Order QuantityInbound supply that was counted.
Pending Requisition / Pending Sale Order QuantityCommitted demand that was netted off.
Minimum / Maximum / Reorder QuantityThe planning parameters used (averaged when several rows matched).
Lead Time, Average ConsumptionThe reorder-point inputs, rounded to whole numbers.

Pricing happens after generation: Unit Cost comes from the price-list rules of the order's price list (a default purchase price list is assigned when the order is created), Amount is unit cost × quantity, and the header's Total Amount and Total Pending Quantity are rolled up from the lines.

The purchase-order quantity nudge in Sense AI uses the same pipeline query service and planning inputs, but it runs at a different time and applies its own divergence threshold, so a nudge and an earlier auto-order snapshot can differ when stock, demand, supply or planning rows changed in between.

Prerequisites

  • Inventory planning attributes on the items you want suggested — an engine only considers items it has parameters for, and the Minimum Stock Level engine only reads rows scoped to a branch.
  • Create permission on auto orders and, for the last step, on purchase orders.
  • A purchase price list with rules for the items, or every line prices at zero.
  • For scheduled runs: administrator access to job schedules.

Procedure

All Auto Purchase Orders list showing document number, partner account, branch, supplier, auto order type, total amount and status
The Auto Orders list is where you pick the worksheet to review: type and scope identify the engine and the stock it evaluated, while the Order Generated counter, not the Status column, tells you whether a purchase order already exists.UI captured
  1. 1

    Open the worksheet by its document number to reach the Auto Order Setting and Lines tabs.

  2. 2

    Partner Account, Branch and Supplier Account are the scope every engine evaluates and the header the generated purchase order inherits.

  3. 3

    Auto Order Type selects the engine; only Minimum Stock Level, Replenish, Forecasting and Template are implemented.

  4. 4

    Order Generated counts rows whose Is Order Generated flag is set - the reliable generation state.

  5. 5

    Status is never written by the engines or actions, so do not read it as workflow state.

  6. 6

    New opens the create form for a fresh worksheet or template.

Start from the All Auto Purchase Orders list. Identify the worksheet by partner account, branch, supplier and Auto Order Type before opening it. The Order Generated counter and the Is Order Generated flag are the reliable generation state: the Status picklist is seeded with Draft and Order Generated but no engine or action writes it, so rows can show any value their creator set.

New Auto Order form with Auto Order Type, AI Recommendation and System Details holding Partner Account, Branch and Supplier Account
The create form fixes the engine and the scope; the include, exclude and budget options appear on the saved record's Auto Order Setting tab.UI captured
  1. 1

    Auto Order Type picks the engine: Minimum Stock Level, Replenish or Forecasting for a worksheet you generate yourself, Template for the scheduler to spawn from.

  2. 2

    AI Recommendation is stored with the record but no generation or ordering service reads it.

  3. 3

    Partner Account and Branch scope the stock, planning rows and pipeline the engine evaluates; they are validated to belong together.

  4. 4

    Supplier Account is copied to the purchase order generated from this worksheet.

  5. 5

    Save creates the header with today's document date and a default purchase price list; generate lines from the saved record.

Step 1 — Create the auto order

Choose New. The create form asks for Auto Order Type and AI Recommendation, then Partner Account, Branch and Supplier Account under System Details. Document Date is stamped automatically, and partner and branch are validated to belong together. Pick Minimum Stock Level, Replenish or Forecasting for a worksheet you will generate yourself, or Template for a configuration the scheduler should spawn from. AI Recommendation is stored but no generation or ordering service reads it; the engines stay deterministic whatever you select.

Saved Auto Order on the Auto Order Setting tab with Inventory Projections switches, two Apply AI Recommendation selectors, FSN and ABC exclusions and a Fit to Budget amount
Auto Order Setting holds every run option the engine reads - and two it does not. Verify these before running Lines, because a re-run replaces the worksheet with the current settings.UI captured
  1. 1

    Auto Order Setting is the run configuration of the saved worksheet; Lines holds the generated suggestions.

  2. 2

    Inventory Projections: in-transit shipments, pending purchase orders, open sale orders and purchase requisitions are netted into the Forecasting projection when ticked.

  3. 3

    Consider High probability quote is stored but never read - the quote quantity in the projection is always zero.

  4. 4

    Neither Apply AI Recommendation selector is consulted by the engines; matching planning rows are always averaged.

  5. 5

    Exclude FSN Items and Exclude ABC Items drop planning rows of the ticked categories on every engine.

  6. 6

    Fit to Budget scales every priced line down proportionally when the priced total exceeds this amount; zero means no cap.

Step 2 — Set the run options

On the saved record open Auto Order Setting. Tick the Inventory Projections sources a Forecasting run should net, choose the Exclude FSN Items and Exclude ABC Items categories to skip, and enter a Fit to Budget amount if the worksheet must stay within a spend limit. The two Apply AI Recommendation selectors (the stored AI Recommendation and the Apply Inventory Attribute Settings preference) are not consulted by the engines — matching planning rows are always averaged. Save the tab.

Step 3 — Generate the lines

Run the Lines action (Generate Auto Order Lines). It runs the engine for the order's type against the current stock and pipeline data, prices the lines and applies the budget cap. It deletes any existing lines first, so re-running after changing an option always reflects the change. It is refused on Template and Back Order types and once a purchase order has been generated from the auto order.

For a Template, run Order from Template instead: it creates a new Forecasting order named after the template and today's date, linked back to the template, generates and prices its lines, and leaves the template itself unchanged.

Generated Auto Order on the Lines tab listing eight Auto Purchase Order Lines with minimum, maximum, available, suggested and ordered quantities, unit cost and amount
Lines is the review worklist: each row carries the planning inputs and stock position that produced its suggestion next to the quantity you may edit and the price the order will carry.UI captured
  1. 1

    The header badge and Is Order Generated show this worksheet has already produced a purchase order, so Lines can no longer be regenerated.

  2. 2

    Minimum and Maximum Quantity are the planning parameters the engine used, averaged when several rows matched.

  3. 3

    Quantity Available is the on-hand stock at suggestion time; Forecasting lines also store the pending supply and demand that were netted.

  4. 4

    Suggested Quantity is the engine's answer and stays fixed; Quantity is what you edit before generating the order.

  5. 5

    Unit Cost comes from the order's price-list rules and Amount is cost times quantity; Fit to Budget trims these lines when the total exceeds the budget.

  6. 6

    Quick Add inserts a manual line with no snapshot; prefer regenerating with Lines so every row is explainable.

Step 4 — Read the arithmetic and adjust

Open Lines and read each snapshot: minimum and maximum quantity, quantity available, suggested quantity, the editable Quantity, unit cost and amount. Agree? Leave the line. Disagree? Edit Quantity — the suggested quantity stays as the record of what the rule computed. A line's pending quantity is what will actually be ordered; a line whose suggestion netted to zero is skipped at generation.

Step 5 — Generate the purchase order

Run Purchase Order (Perform Order Generation) to turn every line with pending quantity into one purchase order for the order's branch and supplier, or Selective Order to take chosen lines with a requested quantity per line — each request is validated against that line's pending quantity and capped at its derived quantity. The purchase order links back to the auto order (Purchase Auto Order on the order header) and each of its lines to the suggestion line it came from. The auto order is then marked Is Order Generated and its lines can no longer be regenerated.

Step 6 — Schedule recurring suggestion runs (admin)

The job Generate forecast auto-order lines keeps Forecasting suggestions coming without anyone clicking. On every run it fills Forecasting auto orders that have no lines yet and no generated purchase order, and spawns one dated Forecasting order per day from each Template. An administrator creates a job schedule with a cron cadence to turn it on; Run now triggers a run manually. Runs are idempotent — already-filled orders and templates that already spawned today are skipped — and only one run executes at a time per organization. Minimum Stock Level and Replenish orders are generated on demand with Lines, never by the schedule.

Expected result

Each generated suggestion line shows its calculated quantity, its price and the snapshot of stock, demand, supply and planning parameters that produced it; the header totals agree with the lines. Reviewed pending quantities release once into a linked purchase order, after which the auto order is read-only for regeneration. Scheduled templates produce at most one dated Forecasting order per day. If the outcome is surprising, compare the stored snapshot with current planning attributes before editing a quantity or creating another order.

Common problems

  • Lines produced nothing. No planning rows match the order's branch and partner (Minimum Stock Level needs branch-scoped rows), every projected position is above its reorder point, the ABC/FSN exclusions removed everything, or — for Replenish — nothing was allocated since the branch's last Replenish order.
  • "Generate Lines is only available for Minimum Stock Level, Replenish, or Forecasting auto orders." The order is a Template (use Order from Template) or a Back Order, which no engine implements.
  • "Purchase Order is already generated for this Auto Order." A generated auto order is closed — create a new one to run the engine again.
  • "No Auto Purchase Order Lines with pending quantity to create Purchase Order." Every line's quantity has been zeroed or already ordered.
  • Quantities are smaller than the snapshot suggests. Check Fit to Budget: a budget below the priced total scales every priced line down proportionally.
  • Every Unit Cost is zero. The order's price list has no rule for the items; fix the price list and re-run Lines.
  • A suggested quantity looks wrong. Read the line's snapshot before assuming a defect — see troubleshooting.

Common questions

Is this AI demand forecasting?

No. All three engines are fixed, explainable rules over your own stock and document data — there is no machine-learning model and no prediction. The "Forecasting" engine's name refers to projecting the pipeline forward with the arithmetic shown above, and every input it used is stored on the line it produced. The AI Recommendation fields on the form are stored values only.

Why do open sales orders only matter to the Forecasting engine?

Because only Forecasting projects a stock position. Minimum Stock Level compares today's stock to a threshold, and Replenish buys back what was already consumed — neither needs the demand/supply pipeline. Both can still record the quantity already pending on purchase orders when the header's open-order calculation is on.

Can a suggestion turn into a purchase without review?

No. The scheduled job only generates suggestion lines; a purchase order exists only when someone runs Purchase Order or Selective Order on the reviewed worksheet.

What does the Status column mean?

Little. No engine or action assigns it, so it holds whatever was typed or seeded. Use Is Order Generated (the Order Generated list counter) and whether the Lines tab has rows to judge where a worksheet stands.