Checkout Validation
Checkout validation lets you enforce business rules at checkout. When conditions are met, a custom error message is shown and the order can be blocked. This is essential for enforcing minimum order values, product limits, customer eligibility, and geographic restrictions.
How Checkout Validation Works
Section titled “How Checkout Validation Works”PowerX evaluates your validation rules when a customer attempts to complete checkout. If any rule’s conditions are met, the configured error message is displayed. With blockOnFailure enabled, the customer cannot place the order until the issue is resolved.
Rule Type: Conditional Rules (CR)
Section titled “Rule Type: Conditional Rules (CR)”Validation uses Conditional Rules — define conditions and an error message that appears when those conditions are true.
Settings
Section titled “Settings”| Setting | Description |
|---|---|
blockOnFailure | When enabled, prevents the customer from placing the order |
| Error message | Custom text shown to the customer explaining why checkout is blocked |
Setting Up Checkout Validation
Section titled “Setting Up Checkout Validation”Step 1: Create a New Campaign
Section titled “Step 1: Create a New Campaign”- Open PowerX from your Shopify admin.
- Click Create Campaign.
- Select Checkout Validation as the function type.
- Name your campaign (e.g., “Minimum Order $25”).
Step 2: Define Validation Conditions
Section titled “Step 2: Define Validation Conditions”Add conditions that should trigger the validation error. You can use:
- Cart qualifiers — subtotal, quantity, weight, has/doesn’t have items
- Customer qualifiers — tags, email, order count, login status
- Item selectors — target specific products or collections
Set the logic between conditions:
- Meets all conditions (AND) — every condition must be true to trigger the error.
- Meets any conditions (OR) — at least one condition triggers the error.
Step 3: Write the Error Message
Section titled “Step 3: Write the Error Message”Enter a clear, actionable error message. The customer will see this at checkout. Be specific about what they need to do to resolve the issue.
Good examples:
- “Minimum order value is $25. Please add more items to your cart.”
- “You can only purchase up to 5 units per product.”
- “Please log in to purchase members-only products.”
Step 4: Enable Block on Failure
Section titled “Step 4: Enable Block on Failure”Toggle blockOnFailure to Yes to prevent the order from being placed. If set to No, the error message is shown as a warning but the order can still proceed.
Step 5: Activate
Section titled “Step 5: Activate”Review and toggle to Active.
Common Use Cases
Section titled “Common Use Cases”Minimum Order Value
Section titled “Minimum Order Value”Block checkout if the cart is under a minimum amount.
- Condition: Cart subtotal < $25
- Error: “Minimum order value is $25. Please add more items.”
- Block: Yes
Maximum Quantity Per Product
Section titled “Maximum Quantity Per Product”Limit customers to a specific number of units per product.
- Condition: Line item quantity > 5
- Error: “You can only purchase up to 5 units per product.”
- Block: Yes
Members-Only Products
Section titled “Members-Only Products”Require login for certain product collections.
- Condition: Cart has items in collection “Members Only” AND Customer is not logged in
- Error: “Please log in to purchase members-only products.”
- Block: Yes
Geographic Restrictions
Section titled “Geographic Restrictions”Block orders to specific regions for restricted products.
- Condition: Cart has items with tag “restricted” AND Market is one of “International”
- Error: “Some items in your cart cannot be shipped internationally.”
- Block: Yes
Maximum Order Value (Fraud Prevention)
Section titled “Maximum Order Value (Fraud Prevention)”Block unusually large orders.
- Condition: Cart subtotal > $5,000
- Error: “For orders over $5,000, please contact our sales team.”
- Block: Yes
Troubleshooting
Section titled “Troubleshooting”Validation not triggering?
- Verify the campaign is Active.
- Check that the conditions accurately describe the scenario you want to block.
- Remember: conditions trigger the error when they are true.
Error message not showing?
- Ensure
blockOnFailureis enabled. - Check that all conditions in an AND group are being met simultaneously.