Build Assignment Rules

Who this is for. SuperAdmins. Access. Requires the TEAM_MANAGEMENT permission and the feature enabled for the tenant. See the Roles and Access Reference. Applies to. Both products. Document rules route AP Invoices documents and task rules route AP Helpdesk tasks, and the two live in one policy.

Rules are where a policy does its work. Each one pairs a condition with an action.

Open the assignment rules

  1. On the policy list, select the Edit Policy pencil at the right of the row.
  2. The policy opens at Distribution Policies > policy ID. Distribution Policy is the page heading, not a tab; an Audit Log link at the top right leaves the form for the separate Policies > Audit Logs page, pre-filtered to this policy. The link appears only when editing an existing policy.
  3. The Assignment Rules table lists the rules, with Add Rule above it.

Where the agent runs AP Helpdesk and AP Invoices together, the table splits into two tabs, Document Rules and Task Rules, each carrying a count. Everywhere else there is a single Assignment Rules table and no tabs.

A policy showing the Document Rules and Task Rules tabs above the ordered list of rules

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].

Document rules and task rules

A policy holds two kinds of rule. Task rules assign AP Helpdesk tasks. Document rules assign AP Invoices documents. They sit in one policy and are kept apart in every way that matters.

Table 2. How the two kinds differ

Aspect

Document rules (AP Invoices)

Task rules (AP Helpdesk)

What they assign

AP Invoices documents.

AP Helpdesk tasks.

Condition attributes

Nine, listed in Table 3.

Eighteen, listed in Table 4.

Actions

Assign only.

Assign and Set.

Order

Its own. The first matching document rule wins for a document.

Its own. The first matching task rule wins for a task.

Rule IDs

Its own sequence.

Its own sequence.

Because each tab numbers its rules from its own sequence, and both use the DR- prefix, the same Rule ID appears on both tabs. A policy can hold a document rule DR-2 and a task rule DR-2 at the same time, so quote the tab as well as the ID when you refer to a rule.

The two kinds never compete. When a document is created only document rules are considered, and when a task is created only task rules are. One email that raises both produces two assignments, decided separately, so a document and a task from the same email can end up with different owners.

Condition attributes

The attribute list is not fixed. It is fetched for your tenant, your connected source and the function the policy is bound to, so two policies on the same tenant can offer different attributes. The set below is what an AP policy on a SmartVendor flow offers.

The attribute list changes with the kind of rule you are building. Set the kind first, then write the conditions. A condition written under the wrong kind is scoped to the wrong work and will not route what you expect.

Table 3. Condition attributes on a document rule

Attribute

What it reads

Email From

The address that delivered the invoice into the mailbox, not the vendor address printed on the invoice.

Email From Domain

Everything after the @ of that sending address.

Vendor

Vendors picked from your synced vendor records.

Vendor Name

The vendor name, by text match or by alphabetical range.

Supplier Group

The supplier group on the matched vendor record. Workday sources only.

Supplier Default Payment Method

The vendor default payment type. Workday sources only.

Supplier Category

The vendor category on the matched vendor record.

Entity

The legal entity on the invoice. Only the invoice entity is considered, never an entity linked to the vendor.

Address

The address on the invoice.

Vendor Status is not offered on a document rule. Vendor matching does not run for inactive vendors, so the condition could never match. It stays available on task rules.

The three supplier attributes read the matched vendor record, so they match only once the vendor has been identified.

Table 4. Condition attributes on a task rule

Group

Attributes

Value

The email

Email To, Email From, Email From Domain, Email Subject, Email Body

Free text you type.

What the agent detected

Sender Type, Detected Intent, CA Intents

Chosen from a list the product supplies.

The vendor

Vendor, Vendor Name, Supplier Group, Supplier Default Payment Method, Supplier Category, Vendor Status, Entity, Tax Identification Number, Tax Id Type, Address

Vendor Name, Tax Identification Number and Address are free text. The rest are chosen from a list.

Supplier Group and Supplier Default Payment Method are intended for Workday sources. Vendor Status is deliberately absent from AP Invoices policies, because vendor matching does not run for inactive vendors.

Common condition shapes include:

  • [Email From] [contains] […], [Email Subject] [contains] […], [Email Body] [contains] […]
  • [Detected Intent] [in] [Invoice Dispute, Payment Delayed, …]
  • [Supplier Category] [in] […], [Supplier Group] [in] […], [Tax Id Type] [in] […]
  • [Vendor Name] [range starts with] [a] paired with [Vendor Name] [range ends with] [b]. Vendor Name offers only range starts with, range ends with and contains. Choosing either range operator adds the other as a second condition row, and each takes a single letter.

Operators

Which operators appear depends on the attribute you picked. There are four.

Table 5. 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 just a character in the string.

Email Subject contains CREDIT HOLD

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.

Detected Intent in Short Pay Inquiry

range starts with

Vendor Name only.

One character. The box will not accept a second.

Vendor Name range starts with A

range ends with

Vendor Name only.

One character.

Vendor Name range ends with G

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 6. 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 at all: 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 catch-all

Rules are evaluated from the top of the tab downwards, and the first rule whose conditions all match wins. No rule below it runs for that item, so order is part of the design rather than a presentation choice.

Put the most specific rules first and the broadest last. A rule for one entity placed below a rule for a whole supplier category never wins, because the category rule catches the item first.

A rule with no conditions matches everything. This is the supported way to set a catch-all, so that nothing is left without an owner. Put it at the end of the tab, because anything below it is unreachable.

Table 7. What a catch-all does, 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 catch-all covers its own kind only. A no-condition document rule does nothing for tasks. Where the agent runs both products, leaving nothing unowned takes two catch-alls, one at the end of Document Rules and one at the end of Task Rules.

Without a catch-all, an item that matches no rule is created with no assignee. That is the designed behaviour, not a failure: there is no automatic fallback team.

Assignee Hold on AP Helpdesk threads

AP Helpdesk only. A second mechanism can decide who owns a task, and it is not part of the policy. On the AI Agent, under Define capabilities and Assignee Hold, the agent can route every later task on an email thread to whoever already owns a task on that thread.

Table 8. The two Assignee Hold choices

Choice

Who the later task goes to

Hold Assignee of Initial Task

Whoever was given the first task on the thread. Keeps one person on a conversation from the opening email to the end.

Hold Assignee of Oldest OPEN Task

Whoever holds the longest-outstanding open task on the thread. Keeps work moving on what is still unresolved.

This matters when you are reading your task rules and the owner is not who you expected. A reply on a thread that already carries a task can be held to the existing assignee rather than following the rule you wrote. Check the Assignee Hold setting on the agent before concluding that a task rule is wrong. There is no equivalent on the AP Invoices side, because documents are not threaded.

Rule examples

These are the shapes that occur most often in practice.

Table 9. Rules that work

Intent

Conditions

Actions

Escalate anything mentioning a credit hold

Email Subject contains CREDIT HOLD

Set Priority High and Assign User

Raise the priority of one intent

Detected Intent in Short Pay Inquiry

Set Priority High

Split the vendor book alphabetically across the team

Vendor Name range starts with A and Vendor Name range ends with G

Assign User

Catch urgent payment chasers

Detected Intent in Request for Payment Status, Email Subject contains Urgent, Email Body contains Urgent

Assign User and Set Priority

The alphabetical split is the pattern to copy. Four rules of two conditions each, A–G, H–N, O–T and U–Z, divide the whole 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

Where the policy has the two tabs, the dialog opens with Add a rule for set to the tab you are on, and 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.

  1. Enter a Rule Description. It is required, and it is what the rules table shows, so write what the rule is for rather than what it matches: Credit Hold Escalation rather than subject contains CREDIT HOLD.

  2. Under When, select Add Condition. The dialog opens with No condition, and a rule with none matches everything.

  3. Under Then, set the action. One row is there already, defaulted to Assign / Team with an empty value.

  4. Select Add Action for a second action, or the trash icon beside a row to remove one.

  5. Select Save, or Cancel to discard the rule.

The Add Rule dialog showing the Document and Task selector, the Rule Description box, a When condition row and a Then action row

Figure 2. The Add Rule dialog, with one condition row added.

Table 10. 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 in the rules table carries its own controls: up and down arrows on the left to change the order, and a pencil and a trash icon on the right to edit or delete the rule.

Order is not cosmetic. 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