Authorization Rule
Authorization Rules allow you to enforce custom approval requirements for specific documents based on predefined conditions. They help ensure that transactions exceeding defined limits can only be approved by authorized users.
1. Overview
An Authorization Rule restricts users from submitting documents when certain conditions are met, even if they have Submit permission. Approval must then be provided by a designated role or user.
For example, if a Sales Order exceeds a specified Grand Total, only a Sales Manager can submit or approve it.
2. Example Scenario
Suppose Sales Users are allowed to submit Sales Orders only when the Grand Total is less than 10,000.
If the order value exceeds this amount, the Sales User cannot submit it. Instead, approval from a Sales Manager is required.
3. How to Create an Authorization Rule
- Go to the Authorization Rule list and click New.
- Select the document type on which the rule will apply.
- Select the field in Based On.
- Enter the authorized value or threshold.
- Select the Applicable Role.
- Optionally select a specific user in Applicable To User.
- Select the Approving Role.
- Optionally select a specific approving user.
- Save the rule.
4. Rule Behavior
When a document satisfies the configured condition, users belonging to the applicable role cannot submit it unless they also belong to the approving role.
If an unauthorized user attempts to submit the document, ERPNext displays a validation message preventing submission.
5. Supported Documents
Authorization Rules can be applied to the following documents:
- Sales Order
- Purchase Order
- Quotation
- Delivery Note
- Sales Invoice
- Purchase Invoice
- Purchase Receipt
- Appraisal
6. Supported Authorization Fields
The approval condition can be based on:
- Grand Total
- Average Discount
- Customer-wise Discount
- Item-wise Discount
7. Note
If you want to completely prevent a role from submitting documents, remove its Submit permission using the Role Permission Manager instead of creating an Authorization Rule.