Business Rules
Business rules ensure that documents meet specific requirements before they are allowed to continue in workflow. In many cases, business rules are used to make sure that a document does not need any corrections or updates. They can also add extra validation around potential concern points, such as low order margin.
Examples of commonly used business rules include:
-
Protecting against low margins on sales orders.
-
Checking for excessive discounts on line items.
-
Checking for any backordered items.
-
Checking that all line items have been fulfilled before shipping.
-
Checking for any line item inconsistencies that could cause problems later in the process, such as during warehouse fulfillment or invoicing.
For general information on how to set up workflow, refer to this documentation.
Setting Up Business Rules
To view, edit, and create business rules, click the Business Rules tab on the right side of the Workflows screen. The Business Rules popup shows all existing business rules with quick details and enabled states available at a glance.
To create a new business rule, click the “+” button at the top right of the popup.
Business rules validate based on set conditions, which are set up the same way as conditions for workflow queue pathing.
The evaluation policy determines whether documents will be stopped again if they have already been previously approved for this rule: "Once" allows the document to continue if it breaks the rule in the future, while "Always" will re-capture the document each time it breaks the rule.
Applicable queues can be selected from a dropdown list, so rules can only affect documents in particular workflow steps.
At least one approver must be selected from a list of available Mission Control users, which determines who can review and approve documents that have broken this business rule. Emails can be automatically sent to the reviewers when documents break this business rule so they can take action quickly and keep documents moving.
Emails can also be automatically sent to the original user who submitted the document once it has been reviewed by one of these approvers, so they can make any necessary updates without delay.
After making all the necessary changes, click the "Save" or "Update" button at the lower right, and then close the popup and click the “Publish Changes” button once ready to update Mission Control workflow in Business Central. Like changes to workflow, this immediately changes workflow behavior without users needing to refresh or log out and back in. Any documents that are submitted to workflow after the changes are published will be checked against the latest version of each business rule.
Note: There are no additional validation steps to publish a new/updated business rule. Only grant workflow update access to trusted members of the organization.
Approving and Rejecting Business Rules
Once business rules have been published, order entry users in Business Central can submit a document for approval after they have completed data entry. To do so, simply click the “Submit to” button at the top right of the document entry screen. This submits the document through its normal workflow.
After clicking the “Submit to” button, a Business Rules popup will appear if any rules have been broken. The user can provide an explanation to the approver for why this document should move forward and click "Submit for Approval", or they can cancel and make further changes to the document.
Clicking “Submit for Approval” will move this document out of the normal workflow and into a broken business rule queue. This queue can be seen at the top of the Mission Control dashboard.
The document can be approved or rejected in one of two locations:
-
On the Mission Control Dashboard
-
On the Document Edit screen
When approving a document on the dashboard, simply click the checkbox for the given document and then click the “Approve / Reject” button.
Alternatively, the approver can launch the document's entry screen and then click the “Approve / Reject” button.
Either way, the approver is shown the Approval Process popup where they can choose to approve or reject any or all of the broken business rules. The comments submitted by the submitter appear on this screen for additional rationale for why the document should be approved.
In the current state shown above, all of the business rules will either be approved or rejected. If the approver wants to approve one of the business rules and not the other, they can simply uncheck any rule that they do not want to approve and click the “Approve” button. The same logic applies for rejecting one or more of the broken business rules.
When a broken business rule is approved, an activity log of the approval is created for the document, and it is then moved to the next configured queue. If a broken business rule is rejected, it is sent back to its originating queue for the submitter to update. In each of these cases, any notes added by the approver are added to the document’s activity log.
Documents with Multiple Broken Rules
In the above example, the document broke multiple business rules but only appeared in one of the approval queues: this is the expected behavior. A document will reside in the highest-ranked broken business rule queue that has not yet been approved.
This ranking order can be set on the Business Rules popup in the Workflows screen.