Rules

Create rules using standard attributes and extended attributes to modify the classification behavior, improve classification results, and reduce the time spent in the classification process.

You can use these operators to create preprocessing and postprocessing rules. This topic also gives you some examples on how to use rules.

Option Value Description
Type Preprocessing Use preprocessing rules for refining or normalizing the data before classification.

When defining preprocessing rules, you can assign a specified value or another attribute value to an attribute. Or, you can assign null to clear out the value of the attribute. You can also choose to exclude transactions from analysis based on different conditions.

Postprocessing Create postprocessing rules to set a constant value to a category that will override its predicted value after classification.
Operator Is exactly Compare an attribute’s value to another value with case sensitivity.
Is Compare an attribute’s value to another value and ignore case sensitivity.
Is not

Match values that are not the same as the comparison value.

For example, a condition where the supplier’s name Is not Light will match transactions with any supplier name other than Light.

Starts with, Ends with

Match with values starting with the sub string mentioned in the value.

For example, a condition where the supplier’s name Starts with Corp will match all transactions with supplier names such as Corporation Tech, Corp Tronics, and so on.

Similarly, Ends with matches all values that end with the specified string.

Matches any, Matches none Compare multiple values with the exact values provided, suffix each value with a # sign.
Contains

Matches with a string that contains the comparison value anywhere in the attribute’s value. You can compare only one value with this operator in a condition.

For example, Contains Light when compared to the value Floodlight will be considered a match.

Does not contain

Matches the string that doesn’t contain the comparison value anywhere in the value of the attribute. You can compare only one value with this operator in a condition.

Check if the attribute has a value or if it is blank.

Is blank, Is not blank Check if the attribute has a value or if it is blank. Is not blank checks if the attribute has a value or is not null.
Action Assign

Use the assign action when you want to assign a certain value as per the condition you are setting.

  • Attribute value – Select an attribute whose value will be assigned.
  • Constant value – Enter a constant value that will be assigned.
  • Null – Assign a null, or make the attribute blank.
Exclude from Analysis Use when you want to exclude spend transactions from classification and from the batch. For example, use it when you want to exclude transactions from a specific supplier or item.

Normalizing Data Using Rules

In this example, we'll see how you can use rules to clean up or normalize data. Various departments exist within an organization and these departments create the name of a supplier, First Software, an IT goods seller under the category IT.SUPPLIES. The names used are First Software, 1st Software, First SW, and FSW. To get the right classification results, the classification engine must resolve that all these names are assigned the name of the same supplier, First Software. To achieve this, you can use a rule to clean up the transactions before classification and assign the name First Software to all of them.

To create the rule:

  1. On the Configuration page in the Rules tab, click Create Rule.
  2. Select the type as Preprocessing.
  3. Under Conditions, add a new condition. Select the attribute Supplier Name, assign the operator Equal to and enter the value 1st Software. Similarly create entries for First SW and FSW.
  4. Now you can standardize the supplier name. Under Action, select:

    • Attribute: Supplier Name
    • Assign: Constant value
    • Value: First Software
  5. Save the rule.

In the classification results, the different forms of the supplier name are normalized to the correct name, First Software.

Using Postprocessing Rules

Let’s look at an example for a postprocessing rule using additional attributes. In the Attributes tab under Configuration, you mapped Classification Attribute 1 to Manufacturer. You can set up rules that use manufacturer names to perform specific processing for subsets of the transactions in the data set.

  1. In the Rules page, select the rule type as Postprocessing.
  2. Create a new condition with these parameters:
    • Attribute: Classification Attribute 1
    • Operator: Like
    • Value: Vision Corporation
  3. Under Action, assign the value of Office.Furniture to the related taxonomy. This action assigns the Office.Furniture category to all the transactions that meet the condition where Classification Attribute 1 equals Vision Corporation.

Using the Operators In and Not In

In this example, we want to exclude certain transactions based on the values contained in the value of the supplier site.

  1. In the Rules page, create a new rule and select the rule type as Preprocessing.
  2. Create a new condition. Select:
    • Attribute: Supplier Site
    • Operator: In
    • Value: 7667#, 34421#, 12909#
  3. Under Action, select Exclude from Analysis and save the rule.

When you apply this rule all the transactions where the supplier site contains 7667 or 34421 or 12909 won't be considered for classification and won't be included in the resulting batch.