---
id: change/bcapps/9989
type: change
title: "#9989 [SOA] Skip Item Selector for exact items without variants"
summary: The Sales Order Agent no longer calls the Item Selector when an exact item search returns exactly one item and that item has no variants. This cuts latency and token use. Items with variants and standard or broader searches still go through the Item Selector.
tier: official
language: en
tags:
  - performance
  - main
  - bc30
  - codeunit soa item search
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:10:10.533Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: df241a754a7f472e18e815d43d7bf4b2538d158c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9989
    title: "microsoft/BCApps#9989: [SOA] Skip Item Selector for exact items without variants"
    date: "2026-08-06"
    commit: df241a754a7f472e18e815d43d7bf4b2538d158c
    t: null
    quote: This PR avoids calling Item Selector when item search returns a single deterministic exact match and that item has no variants.
links:
  learn: []
  objects:
    - object/codeunit/4591
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9989
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9989
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-06T09:39:12Z"
author: tomasevicst
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: SCM"
change_class: code
change_kind: performance
behavior_change: true
breaking: false
files:
  count: 1
  additions: 40
  deletions: 13
  al: 1
apps:
  - SalesOrderAgent
objects_touched:
  - key: codeunit/4591
    page: codeunit/4591
    type: codeunit
    id: 4591
    name: SOA Item Search
    app: SalesOrderAgent
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 622414
systems:
  - development
quote: This PR avoids calling Item Selector when item search returns a single deterministic exact match and that item has no variants.
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9989 [SOA] Skip Item Selector for exact items without variants

> The Sales Order Agent no longer calls the Item Selector when an exact item search returns exactly one item and that item has no variants. This cuts latency and token use. Items with variants and standard or broader searches still go through the Item Selector.

[Pull request](https://github.com/microsoft/BCApps/pull/9989) · merged into `main` (BC30) on 2026-08-06 by tomasevicst · 1 file (+40 -13), 1 AL · performance · tier official · reviewed (checked by Opus)

## What changed

- Item Selector is bypassed only for exact single matches without variants
- Items with variants continue using Item Selector as before
- Standard and broader search results keep existing behavior
- Reduces AOAI calls and token consumption for simple item selection
- Includes fallback to Item Selector if exact item resolution fails
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 4591 "SOA Item Search"](../../objects/codeunit/4591.md), SalesOrderAgent: modified

## Context

- Work items: AB#622414
- Labels: AL: Apps (W1), Team: SCM
- Systems: development
- From the description: "This PR avoids calling Item Selector when item search returns a single deterministic exact match and that item has no variants."

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
