# How to prepare a supplier's order only when enough lines are ready

Use a starter rule to prepare a supplier's draft order on its order day only when enough lines are ready, then check its examples and release it.

Source: https://help.smartfact.ai/manuals/purchasing/how-to-prepare-a-suppliers-order-only-when-enough-lines-are-ready

Review edition: 13 November 2026

Roles: author

An order of one line is sometimes not worth placing. The starter rule **Prepare a supplier's order only when enough lines are ready** adds one rule that prepares a supplier's draft order on its order day only when at least the number of lines you set are ready.

## Use the starter rule

You need the Author role and a draft release. The rule is added to the draft: orders keep following the live release until a Reviewer makes a new one live.

1. Open **Releases** and open your draft. If you have none, open the live release and choose **Copy to a new draft**.
2. Choose **Edit rules and examples**. On a draft the page opens on **Starter rules**.
3. Find **Prepare a supplier's order only when enough lines are ready**. Choose **All** or **Order days** to see it; you can also type a word from its title in **Search starter rules and Help**.
4. Fill in the blanks in the card's sentence, "Prepare an order for … every … at …, but only when at least … lines are ready.":
   - **Supplier**: one of this draft's suppliers that is not retired, shown by name with its code. The rule tests the supplier's code, so renaming the supplier later does not break it.
   - **Order day**: the day of the week.
   - **Time**: the time of day, on the hour or the half hour, in this site's own timezone. For another time, edit the rule afterwards.
   - **Ready lines**: a whole number from 2 to 100: the fewest ready lines for which a draft is prepared.
5. Choose **Use this rule**. The button waits until every blank has a value.

Purchasing adds one rule and its examples to the draft and says so above the cards. The page moves to the rule's family, where the rule now reads **Began from the starter rule** with the starter rule's name and version. No AI is asked, and nothing is frozen, approved, sent or made live.

## What the rule does

The rule belongs to the decision **when draft orders are prepared**. For the supplier you chose, requests wait in the queue. At the chosen time on the order day Purchasing counts the lines that are ready. With at least your number, it prepares one draft holding them all. With fewer, the order day is skipped and recorded as skipped, and the requests wait for the next one.

The draft is only prepared. Someone still submits it and a supervisor still approves it.

The rule is placed after the conditional rules the family already has and before its default. The first rule that applies to an order wins, so a rule you already have still wins where both apply. Change the **Precedence** of either rule by hand if you want the other order.

## Check the examples

The starter rule saves 3 examples with the rule, written for the values you chose. Find them under **Saved examples**, in the rule's family:

- With exactly the number of lines ready, the order day prepares one draft.
- With one line ready the rule still applies, and it skips the order day because too few lines are ready.
- Another supplier's ready lines keep the drafting your release already gives them.

An example the rule does not apply to expects whatever your draft already decided for that case, so it names one of your own rules or the default. Read each example and edit any whose facts do not suit your site. A request that cannot wait a week can still be drafted by hand from the queue.

Each example names your draft's own suppliers and items, as the card's blanks do. Where the draft lacks one an example needs, such as a second supplier, the card says so in its description and that example is not saved.

## Release it

Return to the release with **Catalogue release** and choose **Run examples and freeze**. Every saved example of the release is run, the starter rule's among them. A failure names what disagreed: decide whether the rule or the example is wrong before changing either. Then hand the frozen release to a Reviewer. [Rules and releases](/manuals/purchasing/rules-and-releases) describes the review; a rule from a starter rule is reviewed like any other, and its author cannot make the release live unless the Owner has allowed self-review.

## If the card is refused

- **This starter rule has changed since the page was opened.** Purchasing has a newer version of the starter rule. Reload the page and fill the card in again.
- **This release changed while you were working.** Someone saved the draft after you opened the page. Reload it.
- If no answer comes back, choose **Check original action** before using the card again. See [unconfirmed actions](/manuals/purchasing/uncertain-results).

To remove the rule later, remove its examples under **Saved examples** first, then choose **Remove rule**. Nothing about a starter rule makes its rule permanent.
