---
sourceDocument: Australia Finance and Supply Chain
sourceDocumentLink: https://www.servicenow.com/docs/r/australia/source-to-pay-operations

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Finance and Supply Chain

ft:clusterId :

    - stpop

bundleId :

    - stpop

workflow :

    - Employee


---

# Automatically assign categories

# Automatically assign categories during SR and PR creation {#ariaid-title1}

Release version: Australia  
Updated July 28, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 4 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Automatically assign categories during SR and PR creation

The AI-driven Spend categorization agent in ServiceNow Australia release automatically assigns product and spend categories at the line level when sourcing requests (SRs), purchase requisitions (PRs), purchase orders (POs), or invoices are created or updated.
This automation ensures consistent classification, accurate reporting, and efficient procurement processes while reducing manual effort.
Show full answer Show less  

## Key Features

* **AI-driven Category Assignment:** Predicts and updates Product category and Spend category fields only if they are empty, maintaining data consistency.
* **Three-Tier Prediction Logic:** Utilizes ML classification and similarity solutions first; if no results, applies retrieval-augmented generation (RAG) semantic search; finally, invokes large language model (LLM)-based predictor skills as a fallback.
* **Classification and Similarity Solutions:** Separate solutions predict product category and spend category by analyzing line item details and previous categorized data.
* **Confidence Threshold and Fallback Control:** Configurable confidence score threshold (default 80) determines when predictions update fields; LLM fallback can be enabled or disabled by procurement administrators.
* **Visual Indicators and Audit Trail:** AI-updated fields are visually marked and logged with activity stream comments for transparency.
* **Manual Override and Learning:** Users can manually select categories, with overrides captured to improve future model accuracy.
* **Integration and Automation:** Supports scheduled scripts to categorize imported purchase requisition and purchase order lines, and maintains spend category consistency during invoice matching with POs.

## How It Works for ServiceNow Customers

When customers create SRs or PRs using standard record producers, the Spend categorization agent triggers automatically to suggest and fill in product and spend categories on purchase request lines. The system applies AI predictions only if the confidence meets the threshold and updates fields accordingly. If users select different categories, these overrides are recorded to refine AI models.

The agent also analyzes attached document data such as product names and descriptions for more accurate predictions. An automated audit feature flags inconsistencies between existing and newly predicted categories without overwriting fields, supporting governance.

For imported requisition or order lines via integrations, scheduled scripts ensure consistent category assignment. When invoices are matched to purchase orders, spend categories from PO lines propagate to invoice lines to maintain alignment.

## Configuration and Access

Customers with appropriate roles (categorymanageradmin, nowassistadmin, or procurementadministrator) can access and update classification and similarity solution definitions, retrain models, and configure system properties controlling prediction behavior. These settings allow tailoring AI predictions to specific business needs and maintaining up-to-date, relevant classification models.

## Benefits for ServiceNow Customers

* Improved accuracy and consistency in product and spend category classification across procurement records.
* Reduced manual categorization effort, accelerating sourcing and purchasing workflows.
* Enhanced reporting and automation downstream due to standardized category data.
* Transparency and control through visual indicators, audit logs, and manual override capabilities.
* Seamless integration with existing procurement and invoice processes, ensuring category alignment.  
AI-driven category prediction automatically assigns product and spend categories when sourcing requests, purchase requisitions, or purchase orders are created or updated, ensuring consistent classification at the line level.

## Key benefits

When working with sourcing requests (SRs), purchase requisitions (PRs), purchase orders (POs), or invoices, you must classify line-level items into product and spend categories. The Spend categorization agent enables this process by
generating and validating AI-driven predictions for line-level items. The Product category and Spend category fields are updated only when they are empty. This process ensures accurate
reporting, consistent procurement processes, and efficient downstream automation while reducing manual effort.

View the Spend categorization agent by navigating to AllAI Agent StudioCreate and manageSpend categorization agent.

For more information about enabling and configuring this agent, see [Activate the Spend categorization agent](https://www.servicenow.com/docs/vH2mbeAMIAMPwbtv7uuz7A "The Spend categorization agent predicts product and spend categories on purchase requisition lines. Complete the configuration tasks that activate the agent and its supporting prediction services in ServiceNow Otto for SPO.").

## Classification solutions used for predictions

For predicting product category on PRs and SRs, the following classification solutions have been added:

* Product Category Classification For PRL
* Product Category Classification For POL

Classification solutions identify the most appropriate Product Category using product related information.

You can access the classification definitions by navigating to AllPredictive IntelligenceClassificationSolution Definitions.

## Similarity solutions used for predictions

For predicting spend category on PRs and SRs, the following similarity solutions have been added:

* Spend Category by PRL
* Spend Category by POL

Similarity solutions compare line item details with previously categorized data to suggest the best Spend Category.

You can access the similarity definitions by navigating to AllPredictive IntelligenceSimilaritySolution Definitions.  
To use the solution definitions for both PRL and POL in your instance, open each definition and select Update and Retrain. This action ensures that the solution definitions are trained to meet your specific requirements. Any PR or SR with empty Product category and Spend category fields is updated using the latest model outputs.  
Note:  
Users with the category_manager_admin and now_assist_admin roles can update the solution definitions.

Both solution types retrain automatically based on configured training frequency. By default, the solution definitions run automatically once every seven days.

## Semantic search used for predictions

When ML classification or similarity solutions return no results, the Spend categorization agent uses retrieval-augmented generation (RAG) semantic search as a second-tier mechanism to predict product and spend categories. RAG semantic search matches line item details against the following indexes:

* purchaseLineForProductClassification
* supplierProducts
* purchaseLineForSpendClassification
* purchaseOrderLineForProductClassification
* purchaseOrderLineForSpendClassification

## LLM predictor skills used for predictions

When both ML classification or similarity solutions and RAG semantic search return no results, the Spend categorization agent invokes LLM-based predictor skills as the third and final tier. These skills use large language model reasoning to suggest categories for a fulfiller (`sn_shop.procurement_specialist`).

* Product category predictor: Suggests the most likely product category when both ML classification and RAG semantic search return no results.
* Spend category predictor: Suggests the appropriate spend category when both ML similarity and RAG semantic search return no results.

These skills predict and update the Product category and Spend category fields on the PRLs for an SR or PR.

View these skills by navigating to AllAI Admin HubFinance \& Supply ChainSourcing and Procurement Operations.

## How to configure

The following system properties control category prediction behavior:
{#automatically-assign-categories__entry__3}

| Property | Description | Default value |
|-|-|-|
| `sn_spend_gen_ai.spend_category_confidence_score_threshold` | Defines the confidence score threshold for predicting the Product category and Spend category fields. Set a value between 0 and 100. | 80 |
| `sn_spend_gen_ai.enable_category_fallback_logic` | Enables LLM-based fallback (Product category predictor and Spend category predictor skills) for product and spend category prediction when both ML and RAG semantic search return no results. Configurable by users with the `sn_shop.procurement_administrator` role. | true |
[ ]

## Product and spend category prediction logic {#automatically-assign-categories__section_p1n_f35_g3c}

The Spend categorization agent uses a three-tier fallback chain to predict product and spend categories for SR and PR records.
{#automatically-assign-categories__section_p1n_f35_g3c__entry__3}

| Tier | Mechanism | Condition to advance to next tier |
|-|-|-|
| 1 | ML Classification and Similarity | Returns no result |
| 2 | RAG Semantic Search | Returns no result and `sn_spend_gen_ai.enable_category_fallback_logic` is set to `true` |
| 3 | Product category predictor and Spend category predictor skills | None |
[ ]

Note:  
When a product category is already populated on a purchase request line (PRL), spend category candidates are filtered based on the spend-category-to-product-category mappings in the Spend Categories table. For more information, see [Map spend categories to product categories manually](https://www.servicenow.com/docs/e_tYTxHQLPk7z9kUjedYWA "You can manually map spend categories to product categories to better organize and manage your organization’s expenses by grouping similar goods or services into logical categories.").

If one spend category is mapped, it is auto-selected without further ML or RAG input. If multiple spend categories are mapped, ML and RAG results are filtered to that mapped set only. If no
mapping exists, the full result set is used.

## How it works

When a new sourcing request (SR) or purchase request (PR) is created using the I need a product, I need a service, or I need to submit a quote record producers, the
Spend categorization agent is automatically triggered. The Spend categorization agent predicts and updates the product category and spend category on the purchase request lines (PRLs).

If the AI-predicted category differs from the category selected by the requester, the Product category and Spend category fields are updated only when the prediction confidence score
exceeds the confidence score threshold (default 80).

Visual indicators appear next to the Product category and Spend category fields in the Playbook view and the Purchase Line related lists, indicating that the fields were updated using AI
predictions. In such cases, a corresponding comment is added to the activity stream, for example, "AI-suggested Spend category updated from X to Y."

You can manually select different values for either category field from the Product category and Spend category drop-down lists on the Purchase Line form.

Any user-selected overrides are captured and used to improve future model accuracy. When a different value is selected, a banner appears at the top of the form that informs you that an AI-predicted value was applied.

The prediction model also analyzes information in documents attached to the SR or PR, such as the product name and product description, to predict the product and spend categories.
* **[Audit purchase lines automatically when predictive fields change](https://www.servicenow.com/docs/UB3PSMSZsjuU1_sGy5FaTQ)**   
  Automated audit compares existing categories with the latest AI prediction when key predictive fields are updated in a sourcing request or purchase requisition, flagging inconsistencies without automatically updating category fields.
* **[Predict categories for PRLs and POLs imported through integrations](https://www.servicenow.com/docs/obDHN_NTLMh7wXc522qphw)**   
  Automatically predict and assign product and spend categories for imported purchase requisition lines and purchase order lines using scheduled on-demand scripts.
* **[Ensure consistent invoice spend categories during PO matching](https://www.servicenow.com/docs/7gKwcjEFBXfay3UQQJS3sQ)**   
  Maintain aligned spend categories when matching invoice lines with purchase order lines by applying the spend category from the PO line to the corresponding invoice line.

**Related concepts**   

* [Supporting information for ServiceNow Otto for Sourcing and Procurement Operations (SPO)](https://www.servicenow.com/docs/ZfzIDp8t3JgQEdRbDrOp4g "Get a quick overview of the important information that is related to the ServiceNow Otto for Sourcing and Procurement Operations (SPO) application.")

*[\>]: and then


