Who this is for. SuperAdmins. Access. Requires the
TEAM_MANAGEMENTpermission and the feature enabled for the tenant. See the Roles and Access Reference. Applies to. AP Invoices. Document rules only. For task rules, see Build Assignment Rules (AP Helpdesk).
Rules are where a policy does its work. Each one pairs a condition with an action.
Open the assignment rules
- On the policy list, select the Edit Policy pencil at the right of the row.
- The policy opens at Distribution Policies > policy ID. Distribution Policy is the page heading, not a tab. An Audit Log link sits at the top right. It leaves the form and opens Policies > Audit Logs, filtered to this policy. The link appears only when editing an existing policy.
- The Assignment Rules table lists the rules, with Add Rule above it.
Where the agent runs both products, the table splits into two tabs: Document Rules and Task Rules. Each tab carries a count. Everywhere else there is a single Assignment Rules table and no tabs.
Figure 1. A policy with its rules, split into Document Rules and Task Rules.
Assignment rules table
Rules are evaluated in the order they are listed.
Table 1. Columns in the assignment rules table
| Column | What it holds |
|---|---|
| Order | The position the rule is evaluated in. |
| Rule ID | The reference, for example DR-12. |
| Rule Description | What the rule is for, in your own words. |
| Conditions | What must be true, written as [field] [operator] [value]. |
| Actions | What happens, written as [action] [target] [value]. |
Where document rules sit
A policy holds two kinds of rule. Document rules assign AP Invoices documents and are the subject of this article. Task rules assign AP Helpdesk tasks and are covered in Build Assignment Rules (AP Helpdesk).
Where the agent runs both products, the rules table splits into Document Rules and Task Rules tabs. Each tab keeps its own order, its own rule numbering and its own default assignee. Where the agent runs AP Invoices alone there is a single table and no tabs. The two kinds never compete: when a document is created only document rules are considered.
Condition attributes
The attribute list is fetched for your tenant, your connected source and the function the policy is bound to. Two policies on the same tenant can therefore offer different attributes. A document rule offers nine. They are listed in Document Rules for AP Invoices.
Operators
Which operators appear depends on the attribute you picked. There are four.
Table 2. Operators, value formats and examples
Operator |
Offered on |
What the value box accepts |
Example |
|---|---|---|---|
contains |
Free-text attributes only. |
One string, typed. There is no length limit and no list handling; a comma is treated as a character in the string. |
|
in |
List attributes, and the three address attributes Email To, Email From and Email From Domain. |
On a list attribute, a tick-box picker. Select as many as you need. On the three address attributes, you type the values yourself and separate them with commas. |
|
range starts with |
Vendor Name only. |
One character. The box will not accept a second. |
|
range ends with |
Vendor Name only. |
One character. |
|
The range operators come in pairs. Choosing one adds the other to the rule for you, on the same attribute. A rule covering vendors A to G is therefore two conditions, not one, and both boxes take a single letter.
Conditions in a rule are combined with AND. Every one must be true before the actions run. Several values inside one condition combine with OR, so a single condition listing three vendors matches an invoice for any one of them.
Rule actions
A rule can do exactly three things: assign to a Team, assign to a User, or set Priority.
Table 3. Actions
Action |
Target |
Value |
|---|---|---|
Assign |
Team |
One team. |
Assign |
User |
One user. |
Set |
Priority |
High, Medium or Low. Priority is the only thing Set can change. |
A rule carries at most two actions, so the practical combination is one assignment plus one priority. Add Action disappears once the rule holds two.
On a SmartVendor app with AP invoice auto-assignment turned on, Set is not offered. The rule carries a single Assign action and no Add Action button. Set returns for Task rules when both AP Helpdesk and AP Invoices are active.
Rule order and the default assignee
Rules run from the top of the tab down. The first rule where every condition matches wins. No rule below it runs for that item.
Put specific rules first and broad rules last. A rule for one entity will never win if it sits below a rule for a whole supplier category. The broader rule matches first.
A rule with no conditions matches every item. Use one to set a default assignee for work that no other rule matched. Put it last. Any rule below it never runs.
Table 4. What a default assignee rule takes, by rule kind
Rule kind |
Product |
What a no-condition rule at the end of the tab catches |
|---|---|---|
Document rule |
AP Invoices |
Every invoice that matched no document rule above it. |
Task rule |
AP Helpdesk |
Every task that matched no task rule above it. |
A default assignee covers its own kind only. A no-condition rule on the document tab does nothing for tasks. Where the agent runs both products, you need two of them. Put one at the end of Document Rules and one at the end of Task Rules.
Where no rule matches and there is no default assignee at the end, the document or task is created without an assignee. There is no automatic fallback team.
Rule examples
Common rule shapes.
Table 5. Rules that work
Intent |
Conditions |
Actions |
|---|---|---|
Escalate anything mentioning a credit hold |
|
|
Raise the priority of one intent |
|
|
Split the vendor book alphabetically across the team |
|
|
Catch urgent payment chasers |
|
|
The alphabetical split uses four rules of two conditions each: A–G, H–N, O–T and U–Z. That divides the vendor book between four people with no gaps and no overlap. It is the most common use of the range operators.
Add an assignment rule
There is one Add Rule button, shared by both tabs. It creates a rule for the tab you are on, so you cannot add the wrong kind by accident.
Where the policy has two tabs, the dialog opens with Add a rule for set to the tab you are on. You can change it to Document or Task before you start. Changing it changes the attributes the condition rows offer. One rule is of one kind, so save it and start another if you need both. The saved rule is filed under its own tab.
Add Rule opens a dialog laid out as the rule reads: a description, a When half and a Then half.
Enter a Rule Description. It is required, and the rules table shows it. Write what the rule is for, not what it matches. Use Credit Hold Escalation, not subject contains CREDIT HOLD.
Under When, select Add Condition. The dialog opens with No condition, and a rule with none matches everything.
Under Then, set the action. One row is there already, defaulted to Assign / Team with an empty value.
Select Add Action for a second action, or the trash icon beside a row to remove one.
Select Save, or Cancel to discard the rule.
Saving the rule is not saving the policy. Save in the Add Rule dialog adds the rule to the Assignment Rules list on screen. The policy itself is not stored until you select Save on the policy page, so leaving before that loses the rule.
Figure 2. The Add Rule dialog, with one condition row added.
Table 6. The Then row
Column |
Holds |
|---|---|
Action |
Assign or Set. |
Target |
Team or User for Assign; Priority for Set. |
Value |
The team, the user, or High / Medium / Low. |
The default row is Assign to a Team. If you meant to set a priority, change Action first. The Target list changes with it, and Priority is not offered under Assign.
Reorder, edit, and delete rules
Every row has its own controls. Use the up and down arrows in the Order column to move a rule. Use the pencil to edit it and the trash icon to delete it.
Rules are evaluated in the order shown, so moving a broad rule above a narrow one changes which one wins.
Policy audit log
Audit Log at the top right of the policy opens the audit trail filtered to this policy. It records who changed the policy and its rules, and when.
The link appears only when you are editing an existing policy; a policy being created has no history yet. It leaves the policy form, so save your changes before following it.
Related information
For the AP Helpdesk side, see Automatic Task Distribution Overview.
For the AP Invoices side, see Automatic Document Distribution Overview.
When a rule does not assign, see Troubleshoot Document Distribution.
- Create a Distribution Policy (AP Invoices)
- Distribution Policy List (AP Invoices)
- Create a Team
- Navigate to Audit Logs