How to add a business rule for expenses?
A business rule is a rule that allows you to perform certain actions automatically under certain conditions, such as changing the status of an expense, sending notifications and starting an authorization flow.
In this article, we'll cover a business rule that triggers an authorization flow.
- Make sure you are logged into the Klippa Web App as a user with "admin" rights.
- In the left menu, navigate to Settings and then Company. You are now in the company account settings.
- Then click on Company Settings / Business Rules and on the green button Add at the top right.
As an example, we have already added a number of business rules in our overview (see above). Hereby a brief explanation of how our business rules are implemented. The rule with the lowest order (1) is executed first. Below you can see what each business rule does in order.
1) Check whether mandatory fields are completed, otherwise status is incomplete.
2) Lunch costs under 5 euros are automatically approved.
3) For expenses from one of the team leaders, our financial director approves.
4) For all other expenses, trigger an authorization flow based on the chosen cost center.
- The most common business rules for invoices are the following:
- Trigger authorization flow based on cost center chosen by a user (example in this article).
- Trigger authorization flow based on a user's group.
Below is an example of a business rule that determines which authorization flow is triggered when the cost center "Operations" is chosen by an expense submitter.
In the following steps we will show you successively how to set the 5. general information at the top, the 6. conditions and associated parameters and 7. the action and the target of the business rule.
- Enter the general information at the top of the business line:
- Description: clearly indicate the purpose of the business rule. In our example the approval of the cost center operations, so we choose "Approval Operations" as the description. If you use both the expense and invoice module at Klippa, we recommend that you also describe the document type, then it becomes "Expenses: Approval Operations".
- Active: Choose active if you want the business rule to be applied to invoices that are submitted.
- Order: This determines the order in which the business rules are executed. The lower the number, the earlier the rule is executed. In our example we choose "4" because we want the business rules with order 1,2,3 to be executed before this business rule is executed.
- Document Type: Determine to which document type the business rule applies. In our case expenses.
- Fill in the conditions and parameters:
With a condition you determine how the rule is applied, for example by comparing a certain value. With parameters we determine when the business rule is applied, in other words: under what conditions do we apply the rule? It is also possible not to specify any conditions. Then the rule applies to all expenses. However, at the target (see tip at the bottom of this article) you can still determine on which (groups of) users the rule is executed.
- Enter the Action and the Aim:
The action determines what happens to an expense if the condition(s) are met. The target concerns who the rule applies to, in other words: to which user (group) the business rule is applied.
- Action: in our example we choose "Set up authorization flow", because we want the authorization flow "Approval Tessa Rover" to be triggered for the expenses where the user has chosen the cost center "operations".
- Target: In our example we chose "All users and groups" because we want this rule to be applied regardless of who is submitting the expense.
- Finally, click on Create to add the business rule.
Updated on: 16/04/2024
Thank you!