Purchase limit rules feature to set maximum purchase limits on B2B accounts. Limits can be made based on specific products, product types, static categories, or attributes in addition to a specific B2B account or customer segment.
B2B orders will be held in a Pending Shipment state for a period of time before being "released" for fulfillment. Orders are validated against your configured purchase limits at the time of release. If an order is placed that surpasses the allowed limit, then the excess item quantity will be cancelled when orders are released for fulfillment. An Item Cancelled notification will be sent to the customer if enabled in your order email settings.
Purchase Limit Rule Criteria
Purchase limit rules are based on expressions called product and customer rules, at least one of which is required to create a rule. These are made up of a set of conditions that can be used with logical operators like OR or AND, such as in a product rule of "Color = Blue AND Brand = Adidas" that would restrict the purchase limit rule to products that fit those conditions.
Product rules can be based on product type, code, variant, static category, attribute, and some other first class fields. Customer rules can be based on either a customer account or customer segment. If neither is provided, the rule will apply to all customers and customer segments.
Examples:
- If B2B Account = Walmart and Product = Shirt, then there is a maximum quantity of 150 per order.
- If B2B Segment = VIP and Product Category = Apparel, then there is a maximum quantity of 250 per order.
OMS-Only implementations require a catalog in order to use purchase limit rules.
Enable Purchase Limit Rules
Contact Kibo Support to enable this feature.
The following behaviors allow users to view and update purchase limit rules. The Admin and SuperAdmin roles have these behaviors by default.
- Product Rule
- Product Rule Read, Product Rule Create, Product Rule Update, Product Rule Delete
- Customer Rule
- Customer Rule Read, Customer Rule Create, Customer Rule Update, Customer Rule Delete
- Purchase Limit Rule
- Purchase Limit Rule Read, Purchase Limit Rule Create, Purchase Limit Rule Update, Purchase Limit Rule Delete
Internal-Only Note
The following tenant attributes are used to enable purchase limit rules. Additionally, a user with jumpbox access or Engineering super credentials must trigger a re-index as part of enablement.
catalog-admin-ProductRulesEnabled
(This is required to create product rules and configure any other type of rule that utilizes product rules. If a client only wants to use B2B Order Release based on account priority without any configuring any rules, this attribute must still be enabled.)catalog-admin-PurchaseLimitRulesEnabled
Configure Order Rules
To toggle on and configure B2B order release based on your rules:
- Go to System > Settings > General > Site.
- Scroll down to Fulfillment Settings and toggle on Enable configurable shipment release. This is what allows orders to be held in the Pending Shipment state before being released for fulfillment.
- Enter an integer between 1-7200 in Release orders _ mins after order submit. This is required whenever configurable shipment release is enabled.
- Ensure that Reserve inventory when order status is PendingShipment is disabled, otherwise B2B order rules will not be available.
- Enable B2B Order Rules.
- Select whether you want to Manually release orders (the default behavior that requires Admin users to initiate release of orders for fulfillment) or Automatically release orders every _ mins and enter a value (in which orders will be released for fulfillment at the configured interval). This will be the method in which orders are released based on rules. Any orders that are not released as part of B2B Order Rules will be released according to the Release orders _ mins after order submit setting instead.
- Click Save.
Enabling B2B Order Rules also allows you to determine the order in which B2B orders are released based on account priority. This is not required, but may be configured if you want to further fine-tune your B2B fulfillment process.
Configure Purchase Limit Rules
To configure a purchase limit rule:
- Go to Main > Orders > Purchase Limit Rules.
- Select a Site to view its existing rules.
- If you choose to create a new rule, clicking the button directly will create a rule for the current site. Expand the drop-down menu on the Create button to select a different site instead.
- When creating rules via this UI, a rule can only be applied to one site. If you want to assign a rule to multiple sites, create or update it via the Rule APIs instead. The API documentation will be updated with these endpoints soon.
- Click Create Purchase Limit Rule or click an existing rule in the table.
- If you choose to create a new rule, clicking the button directly will create a rule for the current site. Expand the drop-down menu on the Create button to select a different site instead.
- Enter a Code. If not provided, the system will generate one automatically.
- Enter a Name.
- Enter an optional Description.
- Select or create at least one product rule or customer rule.
- Creating or editing a rule will open an expression editor that you can view in Query, JSON, or Text format. Here you can define one or more conditions by entering a product property, logical operator, and value to compare the property against and grouping them as needed. Click Preview to view a list of records that would be impacted by the expression.
- Product and customer rules cannot be shared across any other rule features, such as return rules. This means that only those that were created as part of purchase limit rules will be available here.
- Creating or editing a rule will open an expression editor that you can view in Query, JSON, or Text format. Here you can define one or more conditions by entering a product property, logical operator, and value to compare the property against and grouping them as needed. Click Preview to view a list of records that would be impacted by the expression.
- Enter the Max Quantity that can be purchased.
- Click Save.
- Once a purchase limit rule is created, it is assigned the lowest rank. You can change this on the dashboard shown below.
Manage Purchase Limit Rules
The dashboard at Main > Orders > Purchase Limit Rules displays all existing rules and allows you to manage them with the below actions:
- Toggle the Status icon on a specific rule to activate or deactivate it.
- Expand the actions menu on a specific rule to Edit or Delete it.
- Check multiple rules and then use the Actions menu in the top right to delete, enable, or disable them.
- Edit the Rank of a rule or click and drag it to reorder them. When the rules are run, they will always be applied in order of the highest to lowest rank (with 1 being the highest rank).
- Ranks are unique per rule across all sites in the master catalog. This means that if a rule is ranked #1 and only assigned to one site, then all other sites will not display a rule in the #1 rank position. If that rule is assigned to multiple sites, it will be ranked #1 on each assigned site and the sites it is not assigned to will not display a rule in the #1 position. If a rule needs to have a different rank on two different sites, then it should be created twice and a different unique rank should be assigned to each.
- Click Test Rule to open a sidebar and enter a product with a customer or customer segment. The system will evaluate which rule affects that case and display it with its rank and maximum quantity, as well as a link to view or update the rule configurations.
Internal-Only Note: Ranking Example
As rule ranking may be confusing in how it works across sites, here is a more detailed example. Recall that rules can only be assigned to multiple sites if they are created or updated via the API (instead of the UI, which is limited to assigning one site to a rule).
- Rule One is assigned to Rank #1 and Sites A and B
- Rule Two is assigned to Rank #2 and Site A
- Rule Three is assigned to Rank #3 and Sites B and C
- Rule Four is assigned to Rank #4 and Sites A and B
- Rule Five is assigned to Rank #5 on Site C
The rules will then be displayed on each site as follows.
- Site A:
- Rank #1: Rule One
- Rank #2: Rule Two
- Rank #4: Rule Four
- This site will not have any rule in Rank #3 or #5 position.
- Site B:
- Rank #1: Rule One.
- Rank #3: Rule Three.
- Rank #4: Rule Four.
- This site will not have any rule in Rank #2 or #5 position.
- Site C:
- Rank #3: Rule Three
- Rank #5: Rule Five
- This site will not have any rule in Rank #1, #2, or #4 position.
If a rule is moved to a higher rank (such as if Rule Four was moved to Rank #1 on Site A ) or a new rule is added for a rank, then existing rules across all sites will be resequenced. This means that affected rules will be moved down a rank to make room. For instance, the results of the given move would be:
- Site A:
- Rank #1: Rule Four
- Rank #2: Rule One
- Rank #3: Rule Two
- This site will not have any rule in Rank #4 or #5 position.
- Site B:
- Rank #1: Rule Four
- Rank #2: Rule One
- Rank #4: Rule Three
- This site will not have any rule in Rank #3 or #5 position.
- Site C:
- Rank #4: Rule Three
- Rank #5: Rule Five
- This site will not have any rule in #1, #2, or #3 position. Rule Five did not have to be change position because only the rules between the new rank and the old rank are affected by a move.