From a policy
to a data check.

When a price list is rejected, the buyer needs to know which check failed and who approved the rule. RuleGenius is designed to keep both answers with the rule.

Example · Supplier price list

Can a supplier list a price of zero?

  1. Source

    Supplier policy

    “Every item offered for sale must have a unit price.”

    supplier-policy.pdf · §4.2

  2. Reviewed rule

    Unit price greater than zero

    Purchasing decides that a zero is a placeholder for an unconfirmed price.

  3. RuleScript check

    Check each price

    supplier-price.rules
    rule "Positive unit price":
      convert price to number
      check price is greater than 0
      message "Unit price must exceed zero"

    The CSV stores prices as text. Convert each price to a number before comparing it with zero.

What happens to each file?

Each file contains two rows. One failed row blocks the output for the whole batch.

Both prices are positive

Passed
Input CSV
Rowskuprice
1A-10025.00
2B-20012.50

Both rows go into the output.

One price is zero

Failed
Input CSV
Rowskuprice
1A-10025.00
2B-2000.00

The entire file is held back.

The report points to row 2 and the “Positive unit price” rule.

“Unit price must exceed zero”

What if the supplier starts sending free samples?

Purchasing would need to agree on an exception and record when it applies. Keeping that decision with the rule explains why an older file was rejected.

RuleScript is the open language for writing the check. If the file identifies which items are for sale, a when condition can apply the price check to just those rows.

Read the RuleScript reference