> ## Documentation Index
> Fetch the complete documentation index at: https://docs.duvo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Auto-ordering

> Convert demand forecasts into validated purchase orders using a 7-gate quality pipeline for retail replenishment.

## What It Is

The Auto-ordering skill gives your agents a structured methodology for converting demand forecasts into purchase orders in retail environments. It guides the agent through a 7-gate validation pipeline — checking forecast quality, inventory position, supplier capacity, financial headroom, logistics feasibility, business policy compliance, and external market signals — before producing a final order decision for each SKU.

<Check>
  This is a default skill — ready to use immediately without any setup.
</Check>

***

## What It Can Do

### 7-Gate Validation Pipeline

The skill evaluates each order line against up to seven quality gates before approving or flagging it:

* **Gate 1 — Forecast Validation**: Checks whether the demand signal is trustworthy before any quantities are committed
* **Gate 2 — Inventory Position**: Verifies that stock levels, open purchase orders, and reorder points actually justify placing a new order
* **Gate 3 — Supplier Validation**: Confirms the supplier can fill the order within required lead times and at the right minimum order quantities
* **Gate 4 — Financial Approval**: Checks budget availability, pricing accuracy, and total order cost against financial limits
* **Gate 5 — Logistics Feasibility**: Validates that warehouse capacity, delivery schedules, and inbound slots can accommodate the order
* **Gate 6 — Business Rules**: Applies assortment policies, promotional calendars, and approval thresholds defined by your team
* **Gate 7 — External Signals**: Adjusts for weather, market conditions, or competitor activity that may warrant overriding the standard calculation

### Graceful Degradation

Every gate is optional. When a data source (supplier master data, warehouse capacity, budget files) is unavailable, the skill logs why that gate was skipped and continues to the next. An order validated through all available gates still has value — the output clearly shows which gates ran and which were skipped, so you understand the confidence level of each result.

### Order Quantity Calculation

The skill includes a standard Order-Up-To Level model to calculate order quantities from forecasts, incorporating average daily demand, review period, lead time, and safety stock (configurable by service level target: 90%, 95%, or 99%).

### Structured Output per SKU

For each order line, the skill produces a clear decision:

* **Auto-approve** — all available gates passed within tolerances
* **Adjust and approve** — one or more gates required a change (e.g., rounding to MOQ), applied automatically
* **Hold for review** — a flag exceeds auto-approval thresholds; queued for human review with full context attached

***

## When to Use It

Use the Auto-ordering skill when your agent needs to:

* **Process replenishment forecasts**: Convert a periodic demand forecast file into a validated purchase order batch
* **Automate routine reorders**: Let the agent handle straightforward reorder decisions while escalating exceptions to buyers
* **Apply multiple validation checks in sequence**: Avoid single-gate failures that miss downstream issues (e.g., approving an order that passes financial checks but would overflow warehouse capacity)
* **Audit order decisions**: Produce a transparent record of which gates applied and why each order was approved, adjusted, or held

***

## Example Tasks

<AccordionGroup>
  <Accordion title="Convert a forecast, skipping suppliers without master data">
    "Convert this week's demand forecast into purchase orders, skipping any suppliers we don't have master data for"
  </Accordion>

  <Accordion title="Process a replenishment file with a review threshold">
    "Process the attached replenishment file and hold anything over €50,000 for buyer review"
  </Accordion>

  <Accordion title="Run the weekly routine and summarize held orders">
    "Run the weekly auto-ordering routine and post a summary of held orders to Slack"
  </Accordion>

  <Accordion title="Validate order lines against budget and logistics">
    "Validate these 200 order lines against our budget and logistics capacity before sending to suppliers"
  </Accordion>
</AccordionGroup>

***

## How to Use

<Steps>
  <Step title="Open your agent">
    Open the agent you want to configure.
  </Step>

  <Step title="Find the Skills section">
    In the agent settings, find the Skills section.
  </Step>

  <Step title="Select the skill">
    Select the Auto-ordering skill.
  </Step>

  <Step title="Describe data sources and thresholds">
    In your agent's AOP, describe what data sources are available (forecast file, inventory system, supplier master data) and what thresholds trigger human review.
  </Step>

  <Step title="Optionally connect spreadsheets">
    Optionally connect Google Sheets or Excel for the forecast input file and output order table.
  </Step>
</Steps>

The skill's validation methodology and order quantity formulas are applied automatically when the agent runs.

***

## Works Well With

<CardGroup cols={3}>
  <Card title="Google Sheets" icon="https://mintcdn.com/duvo-d8027998/O3tlM6eCuFk2uJpN/images/connections/google-sheets.svg?fit=max&auto=format&n=O3tlM6eCuFk2uJpN&q=85&s=0ef8d55e05c34e7a4a618933bdf0ceb3" href="/user-guide/connections/available-connections/google-sheets" width="24" height="24" data-path="images/connections/google-sheets.svg">
    Read the forecast input file and write the output order table.
  </Card>

  <Card title="Microsoft Excel" icon="https://mintcdn.com/duvo-d8027998/O3tlM6eCuFk2uJpN/images/connections/excel.svg?fit=max&auto=format&n=O3tlM6eCuFk2uJpN&q=85&s=986599d60d09acee47293fda2b62df99" href="/user-guide/connections/available-connections/microsoft-excel" width="2290" height="2130" data-path="images/connections/excel.svg">
    Read the forecast input file and write the output order table.
  </Card>

  <Card title="Shopify" icon="https://mintcdn.com/duvo-d8027998/O3tlM6eCuFk2uJpN/images/connections/shopify.svg?fit=max&auto=format&n=O3tlM6eCuFk2uJpN&q=85&s=f3627a73e84a6fbeb6cefa2711f5621e" href="/user-guide/connections/available-connections/shopify" width="24" height="24" data-path="images/connections/shopify.svg">
    Fetch live inventory and submit approved orders.
  </Card>

  <Card title="SAP S/4HANA" icon="https://mintcdn.com/duvo-d8027998/O3tlM6eCuFk2uJpN/images/connections/saps4hana.svg?fit=max&auto=format&n=O3tlM6eCuFk2uJpN&q=85&s=264f675ddd1dc96ae542e5795cf8ace6" href="/user-guide/connections/available-connections/sap-s4hana" width="455" height="225" data-path="images/connections/saps4hana.svg">
    Read live inventory and master data to validate orders before submission.
  </Card>
</CardGroup>

***

## Things to Know

* This is a default skill available to all teams
* Gates are optional — the skill adapts to whatever data is available and reports what was skipped
* Orders flagged for review include all gate results and context so buyers can make informed decisions quickly
* Pairs with the Input Cost Monitor skill for checking commodity price movements before approving orders, with the Shopify connection for fetching live inventory and submitting approved orders, and with SAP S/4HANA for reading live inventory and master data
