The Rules Engine lets you control how your wholesale store behaves for different customers. You can set custom pricing, quantity limits, shipping terms, payment options, credit terms, and more — all based on who the customer is and what group they belong to.
Rules are the backbone of your B2B pricing and access control. Every time a retailer views your catalog, adds items to their cart, or checks out, the rules engine evaluates which rules apply to them and adjusts the experience accordingly.
Where to Find It
Go to your Admin Dashboard and click "Rules" in the sidebar navigation. This opens the Rules management page where you can see all your existing rules, create new ones, test them, and reorder their priority.
How Rules Work
Every rule has three core parts:
Who it applies to (the scope and targeting)
What it does (the actions — pricing changes, quantity limits, visibility controls, etc.)
How important it is (the priority — higher priority rules override lower ones)
When a retailer visits your store, the system checks all active rules, finds which ones apply to that specific customer, and merges the results. If two rules conflict, the higher priority rule wins.
Rule Scopes
Every rule has a scope that determines how broadly it applies.
Global
Applies to every customer in your store unless they are explicitly excluded. Use this for store-wide policies like minimum order quantities or default shipping terms.
Customer Group
Applies only to customers in specific groups. Use this for tiered pricing (e.g., Gold tier gets 15% off, Silver tier gets 10% off) or group-specific payment terms.
Customer
Applies to individual customers by name. Use this for negotiated pricing, special credit limits, or VIP terms. Customer-level rules always take priority over group-level rules.
Targeting — Who Gets the Rule
Beyond the basic scope, you can fine-tune exactly who a rule applies to using include and exclude targets.
Include Targets
Pick specific customer groups or individual customers that should receive this rule. If you set a rule to Customer Group scope and include "Gold Tier" and "Platinum Tier," only customers in those groups see the rule's effects.
Exclude Targets
Pick specific customer groups or individual customers that should NOT receive this rule, even if they would otherwise qualify. Exclusions always win — if a customer is both included and excluded, the exclusion takes priority.
How the system decides (in order of priority)
If the customer is explicitly excluded by ID — rule does NOT apply
If the customer is explicitly included by ID — rule applies
If the customer's group is excluded — rule does NOT apply
If the customer's group is included — rule applies
If the rule is global scope — rule applies to everyone not excluded
Rule Actions — What the Rule Does
Each rule can contain one or more actions. You can combine multiple action types in a single rule — for example, one rule that gives 10% off pricing AND sets a minimum order quantity AND grants net-30 credit terms.
Here are all the action types available:
Pricing
Controls the price retailers see for your products.
Modification Types
Percentage — Apply a percentage discount or markup to the base price. Enter a number like 10 for 10% off or -5 for a 5% markup
Fixed — Set a specific dollar amount as the price, replacing the base price entirely
Tiered — Set different prices based on the quantity ordered. You define tiers with a minimum quantity, maximum quantity, and the price for that tier. For example: 1-10 units at $5.00 each, 11-50 units at $4.50 each, 51+ units at $4.00 each
Display Mode
Sale Price — Shows the discount amount to the retailer (they see the original price crossed out with the new price next to it)
Replace Price — Shows only the new price with no indication that a discount was applied
Packaging Scope
You can set different pricing for different packaging levels within the same rule. For example, 20% off individual units but 30% off full cases and 40% off master cartons. Each packaging level gets its own pricing configuration. See the Packaging Scope section below for details.
Quantity
Controls how many items a retailer can order.
Minimum — The smallest quantity a retailer can add to cart. If they try to order less, the system blocks it
Maximum — The largest quantity a retailer can order at once. If they try to order more, the system blocks it
Increment (Step Size) — Forces quantities to be multiples of this number. Setting increment to 6 means the retailer can order 6, 12, 18, 24, etc. but not 7 or 13
Like pricing, quantity rules support per-packaging-level configuration. You can require a minimum of 1 for individual units but a minimum of 5 for cases.
Visibility
Controls which products a retailer can see in the catalog.
Show Only (Whitelist)
Only the products and categories you list here will be visible. Everything else is hidden. This is the most restrictive option — use it when a customer should only see their approved product list.
Hide (Blacklist)
The products and categories you list here will be hidden. Everything else remains visible. Use this when you want to block specific items (discontinued products, region-restricted items, etc.)
If multiple visibility rules apply to the same customer, hide rules stack together (anything hidden by any rule stays hidden) and show-only rules intersect (products must appear in ALL show-only rules to be visible).
Shipping
Controls shipping costs and free shipping thresholds.
Free Shipping
Waive shipping fees entirely. You can optionally set a threshold — free shipping only applies when the order total exceeds the threshold amount.
Flat Rate
Charge a fixed shipping amount per order, regardless of order size or weight.
Threshold-Based (Tiered Shipping)
Set different shipping rates based on order total. You define tiers in ascending order. For example:
Orders $0–$99: $12.99 shipping
Orders $100–$499: $7.99 shipping
Orders $500+: Free shipping
Tiers must be entered in ascending order by their minimum threshold.
Payment Gateway Control
Controls which payment methods are available to the customer.
Available Payment Methods
Credit Card
ACH / Bank Debit
On Account (invoiced, pay later)
Modes
Whitelist — Only the selected payment methods are available. If multiple whitelist rules apply, the customer can only use methods that appear in ALL of them (intersection)
Blacklist — The selected payment methods are disabled. If multiple blacklist rules apply, any method blocked by ANY rule is unavailable (union)
Order Type Scope
You can limit payment controls to specific order types:
All Orders — Applies to every order
Pre-Orders Only — Only affects pre-order transactions
Regular Orders Only — Only affects standard orders
As a safety measure, if all payment methods end up filtered out (no valid option left), the system falls back to allowing all methods rather than blocking checkout entirely.
Payment Processing Fee (Surcharge)
Adds a percentage-based processing fee to orders. This is commonly used to pass credit card processing costs to the buyer.
Settings
Fee Percentage — Enter a value between 0.01% and 2.9%. The 2.9% maximum is the federal cap set by card network rules (Visa/Mastercard)
Display Label — Custom text shown to the retailer at checkout (e.g., "Credit Card Processing Fee"). If left blank, it defaults to "Payment Processing Fee"
Apply to Methods — Choose which payment methods incur the fee: Credit Card, ACH Debit, or On Account
Compliance Rules (Automatically Enforced)
The system automatically enforces surcharge laws. You do not need to configure these — they are applied automatically based on your business state and the customer's card type.
Prohibited states where surcharges are illegal: Connecticut, Massachusetts, Maine, Puerto Rico, California. If your business is in one of these states, the fee is automatically set to 0%
Capped states with lower maximums: Colorado and Oklahoma cap surcharges at 2.0%
Debit cards are always exempt from surcharges under the federal Durbin Amendment. The system checks the card type using BIN lookup and blocks surcharges on debit cards
If the card type cannot be determined (unknown BIN), the surcharge is blocked for compliance safety
When you create or edit a processing fee rule, a legal disclosure notice appears with state-specific compliance text. This is for your reference to ensure you understand the regulations.
If multiple processing fee rules apply to the same customer, the highest fee wins — then the compliance cap is applied on top.
Order Approval
Requires orders to be manually approved before they are processed.
Requires Approval — When enabled, orders from matching customers go into a pending approval queue instead of being processed immediately
Auto-Approve Threshold — Orders below this dollar amount are automatically approved without manual review. Set to $0 to require approval on all orders
Approval Reason — Text displayed to your admin team explaining why approval is required (e.g., "New customer — verify credit before shipping")
Notify Admins — Email addresses that receive a notification when an order needs approval
Escalation Time — Number of minutes to wait before auto-approving an unreviewed order. This prevents orders from getting stuck if no one reviews them
If multiple approval rules apply, the most specific scope wins: a customer-level rule overrides a group-level rule, which overrides a global rule.
Credit Terms
Sets credit limits and payment terms for invoiced (on-account) orders.
Credit Limit — Maximum outstanding balance allowed in dollars. Once a customer's unpaid invoices reach this amount, they cannot place new on-account orders until they pay down the balance
Payment Terms — Number of days the customer has to pay their invoice (between 1 and 365). Common values are 15, 30, 60, or 90 days
Description — Optional text shown to admins (e.g., "Standard Net-30 terms for Gold tier")
Credit rules follow first-match-wins logic with scope priority: a customer-specific rule is used before a group rule, which is used before a global rule.
If a customer has a manually set credit override (set directly on their account), the rules engine skips that customer entirely and uses their manual override instead.
Pre-Order Control
Overrides product-level pre-order settings for specific customers or groups.
Allow Pre-Order — Override whether the customer can place pre-orders, regardless of the product-level setting
Pre-Order Limit Override — Maximum quantity a customer can pre-order per order
Auto-Approve Pre-Orders — Skip the approval workflow for pre-orders from this customer
Priority Fulfillment — Ship this customer's pre-orders before standard pre-orders when stock arrives
Credit Terms Start From — Choose when the credit payment clock starts: from the order date or from the ship date
Like order approval, the most specific scope wins for pre-order rules.
Packaging Scope — Per-Level Configuration
If your products are sold in multiple packaging levels (individual units, cases, and master cartons), you can configure pricing and quantity rules differently for each level within the same rule.
When creating or editing a pricing or quantity action, you will see checkboxes for:
Apply to Units (individual items)
Apply to Cases (inner cases)
Apply to Master Cartons (outer cases / pallets)
Check one or more levels, and then configure the values for each checked level separately. For example:
Units: 15% discount, minimum 12, increment of 1
Cases: 25% discount, minimum 2, increment of 1
Master Cartons: 35% discount, minimum 1, increment of 1
This means one rule handles all your packaging-level pricing instead of needing three separate rules.
If you leave packaging scope unchecked (or do not configure it), the rule applies to all packaging levels equally.
Priority and Ordering
Every rule has a priority number. Higher numbers mean higher priority — they are applied first and win over lower-priority rules when there is a conflict.
How to Reorder
On the Rules page, drag and drop rules in the table to change their order. The system automatically saves the new priority values when you release the row.
How Conflicts Are Resolved by Action Type
Pricing: Highest priority rule wins, per packaging level
Quantity: Highest priority rule wins, per packaging level
Visibility: Hide rules stack together (union of all hidden items). Show-only rules intersect (product must be in all show-only lists)
Payment Gateway: Whitelists intersect, blacklists stack
Processing Fee: Highest fee wins, then compliance cap applied
Order Approval: Most specific scope wins
Credit Terms: First matching rule wins (by priority, then scope specificity)
Pre-Order Control: Most specific scope wins
Shipping: Highest priority rule wins
Conflict Detection
The system automatically scans for rules that might conflict with each other. When conflicts are detected, the affected rules are highlighted with an amber background in the rules table.
Conflict Severity Levels
High — Two rules have the exact same scope and target with the same action type. One will always be overridden
Medium — A global rule and a scoped rule overlap. The scoped rule will override the global one for matching customers
Low — Rules with different scopes that could theoretically apply to the same customer through group membership
Conflict detection is informational — it warns you but does not prevent you from saving the rules. You decide whether the overlap is intentional.
Creating a Rule
On the Rules page, click the "Add Rule" button (or navigate to the page with ?create=true in the URL)
The Rule Wizard opens as a panel from the right side of the screen
Step 1 — General Settings
Enter a rule name (required) — make it descriptive so you can identify it in the list
Enter an optional description
Choose the scope: Global, Customer Group, or Customer
Set include and exclude targets based on your scope
The rule defaults to Active. Uncheck to save it as inactive (it will not apply until you activate it)
Step 2 — Conditions
This step allows you to define when the rule should apply based on conditions like order total or day of week
Note: Conditions are saved for future use but the engine does not currently evaluate them. Rules apply based on scope and targeting only
Step 3 — Actions
Click "Add Action" and choose the action type
Configure the action settings (pricing, quantity, visibility, etc.)
For pricing and quantity actions, configure packaging scope if needed
You can add multiple actions to the same rule — click "Add Action" again for each additional action type
Step 4 — Review
Review all your settings in a summary view
Click "Save Rule" to create it
The rule takes effect immediately if set to Active (cache refreshes within 1 minute)
Editing a Rule
Click the edit button (pencil icon) on any rule in the table. The Rule Wizard opens pre-populated with the existing rule's settings. Make your changes and save. The updated rule takes effect within 1 minute.
Duplicating a Rule
Click the three-dot menu on any rule and select "Duplicate." This creates a copy of the rule with a new name and lets you modify it before saving. Useful when you need similar rules for different customer groups.
Deleting a Rule
Click the three-dot menu on any rule and select "Delete." You will be asked to confirm. Deleted rules are permanently removed and cannot be recovered.
Toggling a Rule On or Off
Each rule in the table has an active/inactive toggle. Click it to enable or disable the rule without deleting it. This is useful for seasonal rules or temporary promotions — turn them off when they are not needed and back on when they are.
Testing Rules with the Simulator
Before activating a new rule, you can test its effects without impacting real customers.
Click the test button (beaker icon) on any rule in the table, or click "Test Rules" at the top of the page
The Rule Test Simulator opens as a panel
Setting Up a Test Scenario
Add test products by selecting from your catalog
Set quantities and prices for each product
Choose a customer or customer group to simulate
Viewing Results
The simulator shows a before-and-after comparison:
Original prices vs. adjusted prices for each product
Which products would be hidden by visibility rules
Quantity constraints that would be enforced
A summary of all effects that were applied
This lets you verify your rules do what you expect before turning them on.
Rule Status Indicators
In the rules table, each rule shows:
Active (green) — Rule is live and being applied to matching customers
Inactive (gray) — Rule is saved but not being applied
Conflict indicator (amber highlight) — Rule has a potential conflict with another rule. Hover for details about which rule it conflicts with and why