Automatically assign categories during SR and PR creation

  • Release version: Australia
  • Updated March 12, 2026
  • 4 minutes to read
  • Summarize
    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 automates the assignment of product and spend categories at the line level for sourcing requests (SRs), purchase requisitions (PRs), purchase orders (POs), and invoices. This automation ensures consistent classification, accurate reporting, and streamlined procurement processes while reducing manual effort.

    Show full answer Show less

    Key Features

    • AI-driven Predictions: Uses machine learning (ML) classification, similarity solutions, semantic search, and large language model (LLM) predictors in a three-tier fallback approach to assign categories when creating or updating SRs and PRs.
    • Category Updates: Product and spend categories are updated only if the fields are empty or when the AI prediction confidence score exceeds a defined threshold (default 80%).
    • Classification and Similarity Solutions: Specific solutions for product category (PRL, POL) and spend category (PRL, POL) help identify appropriate categories based on historical and product data.
    • Fallback Mechanisms: When ML and similarity solutions return no results, semantic search and LLM predictor skills provide additional category suggestions.
    • Configurable Properties: System properties allow customers to set confidence thresholds and enable or disable LLM fallback logic. Role-based controls manage solution retraining and configuration.
    • Visual Indicators and Audit Trail: AI-updated fields show visual indicators in the Playbook and related lists, with comments added to the activity stream for transparency.
    • Manual Overrides: Users can manually select different categories, with overrides captured to enhance future model accuracy.
    • Integration Support: Scheduled scripts automatically predict categories for PRLs and POLs imported via integrations.
    • Invoice Matching: Ensures spend category consistency by applying PO line spend categories to matching invoice lines during PO matching.

    How it Works

    When a sourcing request or purchase requisition is created via specific record producers, the Spend categorization agent automatically predicts product and spend categories for each purchase request line (PRL). It uses a tiered prediction model starting with ML classification and similarity, followed by semantic search, and finally LLM predictors if earlier methods yield no results. Categories are updated only if confidence thresholds are met. Visual cues in the UI and audit comments inform users of AI-driven updates. Manual selections override AI suggestions and contribute to ongoing model training.

    Practical Benefits for ServiceNow Customers

    • Improves data accuracy and consistency in procurement classifications across SRs, PRs, POs, and invoices.
    • Reduces manual categorization efforts, accelerating procurement workflows.
    • Supports compliance and reporting by ensuring spend and product categories are reliably assigned.
    • Enables administrators to tailor confidence settings and retrain models for better alignment with organizational needs.
    • Provides transparency and auditability of AI-driven category assignments with visual indicators and activity stream comments.
    • Maintains category alignment during invoice matching to prevent discrepancies and streamline financial reconciliation.

    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 All > AI Agent Studio > Create and manage > Spend categorization agent.

    For more information about enabling and configuring this agent, see Activate the Spend categorization agent.

    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 All > Predictive Intelligence > Classification > Solution 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 All > Predictive Intelligence > Similarity > Solution 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.

    Product Category Classification solution definition interface with Update & Retrain button highlighted.

    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 All > Now Assist Admin > Finance & Supply Chain > Sourcing and Procurement Operations.

    How to configure

    The following system properties control category prediction behavior:

    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

    The Spend categorization agent uses a three-tier fallback chain to predict product and spend categories for SR and PR records.

    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.

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

    PRL form showing AI-suggested updates to Product and Spend category fields.

    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.

    Purchase Line form showing Product category drop-down list with AI predictions highlighted.

    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.