#9910 [SOA] Move attachment processing to direct model reading
Sales Order Agent now processes PDF and image attachments directly with GPT-4.1 mini to extract structured JSON containing customer references, item details, quantities, and dates, replacing platform-generated attachment text before relevance validation.
- 20files
- 8AL files
- 8objects
Pull request · merged into main (BC30) on 2026-08-15 by qasimikram · 20 files (+719 -57), 8 AL · feature · tier official · reviewed (checked by Opus)
What changed
- Attachments are sent directly to a multimodal model to extract SOA-focused JSON with item descriptions, identifiers, quantities, and dates
- Failed extractions are marked with ExtractionFailed status rather than causing message failure, allowing processing to continue
- Extracted JSON is cached on the attachment using the attachment’s SystemId to prevent recomputation on subsequent processing
- Schema marker in content guards against reprocessing previously extracted attachments
- Extraction contract is intentionally open to accommodate varying document structures and item attributes
- Behaviour changes for users or extensions.
AL objects touched
- Codeunit 4399 “SOA Annotation”, SalesOrderAgent: modified
- Codeunit 4421 “SOA Attachment MLLM”, SalesOrderAgent: added
- Enum 4594 “SOA Email Attachment Status”, SalesOrderAgent: modified
- Codeunit 4598 “SOA Instructions”, SalesOrderAgent: modified
- Codeunit 4302 “SOA Validation Function”, SalesOrderAgent: modified
- Codeunit 7768 “AOAI Deployments”, System Application: modified
- Codeunit 7769 “AOAI Deployments Impl”, System Application: modified
- Codeunit 7764 “AOAI Chat Messages Impl”, System Application: modified
Context
- Work items: AB#641231
- Labels: AL: Apps (W1), AL: System Application, AL: Tools, Team: SCM
- Systems: development, copilot
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).