# How to hold a label when the customer's product code is missing

Use a starter rule to hold one customer's labels when the customer's product code is missing, then check and release it.

Source: https://help.smartfact.ai/manuals/labels/how-to-hold-a-label-when-the-customers-product-code-is-missing

Review edition: 13 November 2026

Roles: author

A label that prints without the customer's product code can be worse than no label. The starter rule **Hold a label when the customer's product code is missing** adds one rule that holds a customer's line at the station, with the reason shown, when the job data has no product code for that customer for it. The job's other lines print as normal.

## Use the starter rule

You need the Author role. The rule is added to a draft: production keeps using its active release until a Reviewer publishes a new one.

1. Open **Rules**. The page opens on **Starter rules**.
2. Find **Hold a label when the customer's product code is missing**. It is in **Recommended** and in **Holds**; you can also type a word such as "missing" in **Search starter rules and Help**.
3. Fill in the blanks in the card's sentence, "Hold labels for customer … when their product code is missing.":
   - **Customer code**: the customer's code exactly as it arrives in your job data, for example ELLAND. It is matched exactly as typed, including capitals, so a code with a space before or after it is refused.
4. Choose **Use this rule**. The button waits until every blank has a value, and a value the card cannot accept is refused on the card with what the blank accepts.

LabelRules opens an ordinary rule draft, named with the sentence you completed. Its page says **Began from a starter rule**, names the rule that was added (for example `require-product-code-elland`) and names the rule of yours the draft is anchored on, which is unchanged. No model is asked and nothing is approved.

## What the rule does

The rule belongs to the decision **whether the label may print**. It matches when the job's customer code equals the code you entered, and it requires the customer's product code on the line. A line that has it prints as before. A line without it is held: nothing prints for that line, and the operator sees the message "Customer ELLAND needs its own product code on every label."

Every hold that matches applies, so the rule is added beside your existing holds and removes none of them. A value that is present but wrong is not caught by this rule: it checks only that the customer's product code is there.

A hold is a safeguard. Once the release that contains it is published, the rule pages do not remove or loosen it, and the complete ruleset of a later draft lists it as Protected. To withdraw it, roll back to the release before it: [Review and activate a rollback](/manuals/labels/rollback) describes that review. Be sure of the customer code and of the requirement before the release is frozen.

## Check the examples

Open **Review the examples for this rule**. The starter rule prepares five examples for the values you chose, one in each category, and the page says so under **Examples prepared by the starter rule**. They are not saved until you save them.

- **Positive**: a line for your customer with the customer's product code missing is held, with the reason shown.
- **No match / default**: another customer's complete line prints as before.
- **Missing data**: a line for your customer with more than one value missing is still held.
- **Boundary**: a line for your customer that has the customer's product code prints. The rule matches and finds nothing missing, so this example expects a match and a printed label.
- **Unrelated**: an export line for another customer is unchanged.

Check each example before you save it:

- **Example input** holds the values the example runs with. Change any that do not suit your data.
- **Independently expected result** is what you expect to happen. The starter rule fills in the part its own rule decides. The rest is LabelRules' ordinary synthetic example, so correct anything your own rules decide differently.
- **Expected matched rule identities, in execution order** lists every rule you expect to match. The starter rule states only its own rule. Add the others from the list of available rules, in order.

Tick the review box, write a note saying where the expected results come from and choose **Save reviewed examples**. Then choose **Verify saved examples** and inspect the proofs and refusals. A failed check tells you which expectation and which result disagree: decide which of the two is wrong before changing either.

## Release it

When the saved examples pass, freeze the draft with **Freeze rule candidate** and hand the candidate to a Reviewer. [Examples and releases](/manuals/labels/examples-and-releases) describes the review and publication. Where the site requires a second approver, a rule from a starter rule needs one like any other.

## If the card is refused

- **This starter rule changed.** LabelRules has a newer version of the starter rule than the page you have open. Reload the page and fill the card in again.
- **The active release changed.** A release was published while the page was open. Reload the page: the cards are built for the release in use.
- **Remove the spaces around the customer code.** The code is matched exactly as typed.
- A site holds up to 100 rule drafts and a ruleset up to 50 rules. At either limit, finish or publish existing work first.
