- Configuration
Approval rules
OrderCloud's approval rules system uses a rules engine to enable flexible, condition-based workflows. This system provides:
- Order and return integrity validation
- Manual approval checkpoints
- Policy enforcement capabilities
- Custom business rule implementation
Rule structure
Both buyer and seller approval rules contain:
-
RuleExpression:
- Defines approval conditions
- Uses domain-specific language
- Powered by rules engine
- Evaluates order and return data
- Enables workflow references
-
Approving group:
- Designates review responsibility
- Specifies approval authority
For detailed engine information, see rules engine documentation.
Rule types
Buyer approval rules
Purpose: Pre-submission order validation
Features:
- Buyer user group routing
- Spending limit enforcement
- Department oversight
- Policy compliance verification
Example implementation:
- Manager approval for orders over $1,000
- Department review for specific products
- Budget validation checks
Seller approval rules
Purpose: Return process validation
Features:
- Seller user group routing
- Return value verification
- Condition assessment
- Policy enforcement
Example implementations:
- Warehouse manager approval for high-value returns
- Inspection requirements for damaged items
- Restocking fee policy enforcement
Note: Currently limited to return processes, with potential order support in future updates.
Expression implementation
RuleExpression configuration:
- Determines approval requirements
- Uses rules engine syntax
- 400 character limit
- Supports complex logic:
- Chained conditions
- Comparison operations
- Conditional operators
Multi-step workflow configuration
Complex approval processes can implement multiple steps:
-
Sequential approvals:
- Chain rules together
- Use order.approved() method
- Create dependency hierarchies
-
Example workflow:
ManagerApproval rule:
FinanceApproval rule:
Workflow execution:
- Orders over $1,000 require manager approval
- Orders over $5,000 require:
- Initial manager approval
- Subsequent finance approval
This structure enables:
- Organizational hierarchy reflection
- Policy-based routing
- Sequential approval processes
- Complex workflow automation
Implementation benefits
The approval rules system provides:
-
Process control:
- Automated validation
- Policy enforcement
- Workflow management
-
Business logic integration:
- Custom rule creation
- Policy implementation
- Process automation
-
Workflow flexibility:
- Multi-step processes
- Conditional routing
- Policy-based decisions