Matching rules

Determine which algorithm will run on which order with sequential rules; try with an order, compare city delivery rules on sample orders, and publish them.

Matching rules (OMS › Packing locations › Matching rules) determine which algorithm will run on which order. Rules are tested from top to bottom; the first matching rule is applied. If no rule matches, the All other orders row at the bottom of the list applies: the default algorithm's own formula runs. This row is not a rule and cannot be removed.

The How does it work? button in the blue info bar summarizes which types of rules are active today and their limitations.

Rule list

Each row is a rule: "If Ship city is Istanbul, Kocaeli → algorithm." The type of rule and, if any, the date range are shown on the row. Rules not yet active have a Soon badge; hovering over it shows the reason.

Notes appear below the row if needed, for example:

  • If all cities in the rule are covered by higher rules: this rule applies to no orders.
  • If some cities are covered by a higher rule: the rule applies only to the remaining cities.
  • If the selected algorithm's formula is the same as the default: results do not change for these cities.
  • If the algorithm is not found or the formula is incorrect: the rule is marked with a red note and publishing is blocked while this rule exists.

Adding and editing rules

  1. Click Add rule; the New rule form opens at the bottom of the list. To edit an existing rule, click Edit on its row.
  2. Select the condition: Ship city, Sales channel, or Customer segment (coming soon). Use Add AND condition to add up to 3 conditions; each field can be used once per rule. The rule triggers only if all conditions match.
  3. Select at least one value per condition (up to 100). You can find cities using Search city.
  4. Select the Algorithm to run. If there is no city-specific algorithm, use the Create a city-specific algorithm in the setup wizard link.
  5. Set Validity: Always or Date range.
  6. Click Save rule.

Saving the rule does not activate it on orders; city rules must be published separately (see below).

  • Order: The first matching rule wins. Change the order using the up/down arrows on the row, then click Save order on the bar that appears (Cancel reverts). Unsaved order applies only on this screen and blocks publishing ("Save rule order first.").
  • Delete: Open the rule with Edit, click Delete rule, and confirm. Deleted rules do not automatically remove from the published formula; OMS continues to run them until city rules are republished.
  • There is no active/inactive toggle for rules; to stop a rule, delete it and republish city rules.
  • When the list reaches 50 rules, Add rule disappears; delete a rule first to add a new one.

Which rules run today?

  • Active: rules with a single Ship city condition and Always validity.
  • Soon: rules with sales channel or customer segment conditions (including all multi-condition rules) and date range (campaign) rules. These are saved but not yet active; they are not written into the formula.

Try with an order

In the right panel, select Ship city, Sales channel, and Order date; the matching rule appears instantly under Result. Below, the status of each rule is listed (e.g., Matched, Not matched, Soon, skipped). Customer segment cannot be selected ("Soon · segment info required on order"). Rules marked "Soon" are skipped even if matching, with the reason shown. The panel also indicates if there is a city condition for that city in the published formula. If you changed the order but did not save it, results are calculated based on the unsaved order and this is indicated.

Publishing

If the rule list differs from the published formula, a bar appears at the top: "Rule list differs from published formula." The Prepare to publish button on the bar opens the Publish city rules panel.

  1. The panel shows changes and formula lengths. Rules are written into the default algorithm's row and package formulas; the order formula does not change.
  2. In the Results on sample orders section, open orders going to cities in the rules are listed; click Compare. If none of the compared orders go to cities with changed rules, a warning appears but publishing is not blocked.
  3. Click Publish. The Publish the city rules? window lists changes, sample order summary, and activation time. If Version note is left empty, "Matching rules: N city rules" is written.
  4. After publishing, a "City rules are published" notification appears. Publishing activates on every server within 60 minutes at latest.

If Publish is disabled, the Before publishing box in the panel explains why: rule list unreadable, default algorithm unavailable, order not saved, rules do not fit formula, comparison not done, or outdated.

If rules are published, the City rules are published badge and "Last default algorithm publish: v… · … · …" line appear at the top of the list.

Uncertain publish result

If OMS does not respond in time to publishing, a bar appears: "Publish result uncertain; refresh page and check, do not republish." Click Refresh on the bar. If publishing completed, the last publish line appears with your name; do not republish. Republishing does not rewrite values a second time. If rules or default algorithm changed meanwhile, you will be asked to re-compare with current values.

If OMS returns a warning after publishing (e.g., cache notification failed), an additional alert is shown alongside the publish notification.

Who can do what?

  • Anyone who can see the screen can use the rule list, How does it work? info, and Try with an order panel.
  • Adding, editing, ordering, deleting, and publishing rules require location write permission and OwnerAdmin or TenantAdmin role. Without this, Add rule, Edit, order arrows, and Prepare to publish are hidden.
  • Users with location write permission but without these roles see "OwnerAdmin or TenantAdmin role required for this operation." Users without location write permission see "You are in view mode" warning.
  • If the rule list is unreadable or corrupted, the screen is read-only.

Things to know

  • City rules are not sent to OMS as a separate setting; they are published by writing into the default algorithm's formula.
  • A new comparison is done before each publish; comparison is valid for 30 minutes and only for the user who performed it. If the rule list or default algorithm changes meanwhile, re-comparison is required.
  • Comparison may be partial: orders that time out are counted, and publish approval is based only on comparable orders.
  • City-specific algorithms are not created as separate sets in OMS; they run only within the default formula via a city rule. Since delivery city is not available at order level, that algorithm's order formula is not used; the screen notes this.
  • Each city rule extends the formula. Publishing is blocked if the formula exceeds 4000 characters (8000 after values are inserted); reduce rules or cities, combine cities into one rule. Maximum 50 rules, 3 conditions per rule, 100 values per condition.
  • If the default algorithm is missing, unreadable, or fails OMS validation, city rules cannot be published; fix it first via Go to algorithms link in the top warning.
  • If algorithm history is unreadable, rules depending on city-specific algorithms cannot be published; the screen warns.
  • If sales channel list cannot be loaded, channel cannot be selected ("Sales channels could not be loaded"); city conditions are unaffected.
  • There is no "default rule" matching every order in the matching service (CFS). The rule selecting the default algorithm is not changed here; if deleted or unmatched, order planning stops with "No matching rule found" error.
  • Date range (campaign) is not yet used by OMS; dates remain only in Console.
  • Published settings activate on every server within 60 minutes; some orders may be matched with old rules during this time.
  • Every record on this screen is backed up on the Commercelab side.

Video tutorials

  • Determining which algorithm applies to an order: Connect orders to algorithms by delivery city with matching rules, understand rule order and default algorithm, try with an order, and publish the draft; step-by-step explanation and video.