Sitecore OrderCloud Documentation

docs

Portal login

Approval Rules

Published by DJ Steinmetz on June 10, 2025

OrderCloud’s approval rules system leverages its powerful rules engine to enable flexible, condition-based workflows.
These rules serve several key purposes:

  • Ensure order and return integrity 

  • Introduce manual checkpoints for approvals before continuing a process 

  • Allow enforcement of internal policies or approval requirements based on custom business conditions 

Anatomy of an approval rule

Both buyer and seller approval rules share a common structure, consisting of: 

  • RuleExpression – Defines the condition under which approval is required. This is the core logic, written in a domain-specific expression language powered by OrderCloud’s rules engine. Rule expressions can evaluate order data, return data, and even reference the outcome of other rules, making multi-step workflows possible. 

  • Approving group – Specifies the user group responsible for reviewing and approving the order or return. 

FURTHER READING

The Rules Engine

Two types of approval rules

Buyer approval rules

Purpose: Validate order details before submission
Routing: Sent to buyer users in a designated user group
Common use cases: Enforcing spending limits, department-level oversight, policy compliance
Example: Require manager approval for orders over $1,000

Seller approval rules

Purpose: Validate order returns before processing
Routing: Sent to seller users in a designated user group
Common use cases:

  • Ensure high-value returns are reviewed before refunding

  • Require inspection approval for damaged items

  • Enforce restocking fee policies for certain products

Example: Require warehouse manager approval for returns over $500
Limitation: Currently limited to the returns process (not orders)

Writing rule expressions

The RuleExpression field determines whether an approval is required. These expressions are written using OrderCloud’s rules engine syntax and are limited to 400 characters. Despite this constraint, expressions can be highly expressive and support chaining logic, comparisons, and conditional operators.

Creating multi-step approval workflows

In more complex scenarios, you may want to implement multi-step approval workflows, where one approval must be completed before another is triggered. This is possible by chaining rules together using the order.approved() method in your RuleExpression.

Example

Suppose you have two rules:

ManagerApproval – Triggers approval for orders over $1,000
FinanceApproval – Should only trigger after ManagerApproval has been approved

You can structure FinanceApproval like this:

1order.total > 5000 && order.approved("ManagerApproval")

This ensures that Finance approval is only required if: The order total exceeds $5,000 and the order has already been approved by the ManagerApproval rule. This chaining technique allows you to build sophisticated, layered workflows that reflect real-world organizational hierarchies and approval processes.

Approval rules in OrderCloud make it easy to add control, accountability, and business logic to your order and return workflows. With the flexibility of the rules engine, you can build multi-step approval processes that match real-world policies—like spend thresholds, department-based approvals, or high-value return checks. And since rules can be chained together, you get powerful, layered workflows without writing any custom code.


Still have questions?
Ask in our Community Channel

Content Powered By
Sitecore Logo

© Copyright 2025, Sitecore OrderCloud®. All rights reserved.

Contact Us
Privacy Policy
Sitecore