{"title":"Codeunit 6163 E-Doc. PO Copilot Matching","url":"https://jonas-paprotka.de/ref/codeunit/6163-e-doc-po-copilot-matching/","author":"JOP-AL","license":"Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-05","changedSince":"2026-09-22","source":{"feed":"https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json","package":"Microsoft.E-DocumentCore.symbols.e1d97edc-c239-46b4-8d84-6368bdf67c8b","build":"29.0.54011.55644","builds":{"24":"24.5.23489.36097","25":"25.5.30849.36072","26":"26.5.38752.40541","27":"27.5.46862.47359","28":"28.5.54151.54365","29":"29.0.54011.55644"},"code":{"28":{"url":"https://jonas-paprotka.de/ref/codeunit/6163-e-doc-po-copilot-matching/source/?v=28","repo":"https://github.com/microsoft/BCApps","branch":"releases/28.x","commit":"408a4cc8d3a4c54b60464cc14c964479facb9ba0","path":"src/Apps/W1/EDocument/App/src/Processing/OrderMatching/Copilot/EDocPOCopilotMatching.Codeunit.al","license":"MIT"},"29":{"url":"https://jonas-paprotka.de/ref/codeunit/6163-e-doc-po-copilot-matching/source/","repo":"https://github.com/microsoft/BCApps","branch":"releases/29.x","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","path":"src/Apps/W1/EDocument/App/src/Processing/OrderMatching/Copilot/EDocPOCopilotMatching.Codeunit.al","license":"MIT"}},"note":"Presence per major, highest build of each; 17 is the oldest major on the feed. Local procedures are not listed."},"object":{"type":"codeunit","id":6163,"name":"E-Doc. PO Copilot Matching","app":"E-Document Core","appByVersion":[{"app":"E-Document Core","from":24}],"nameByVersion":[{"name":"E-Doc. PO Copilot Matching","from":24}],"namespace":"Microsoft.eServices.EDocument.OrderMatch.Copilot","versions":"24-29","majors":[24,25,26,27,28,29],"countries":["W1","DE","US"],"minors":{"W1":"24.0-29.0","DE":"24.0-29.0","US":"24.0-29.0"},"minorsUrl":"https://jonas-paprotka.de/ref/codeunit/6163-e-doc-po-copilot-matching/editions.json","extends":null,"extendsUrl":null,"sourceTable":null,"properties":{"access":"Internal"},"extendedBy":[],"implementedBy":[],"sourceFile":"src/Processing/OrderMatching/Copilot/EDocPOCopilotMatching.Codeunit.al","obsolete":{"state":"Pending","tag":"29.0","reason":"The E-Document Purchase Order Matching Copilot has been deprecated. AI-assisted line matching is now handled at import time in the E-Document Purchase Draft experience by codeunit \"E-Doc. AI Tool Processor\"."},"obsoleteSeenFrom":29,"byVersion":{"24":{"app":"E-Document Core","name":"E-Doc. PO Copilot Matching","ns":"Microsoft.eServices.EDocument.OrderMatch.Copilot","obsolete":null,"target":"","sourceTable":"","props":{"access":"Internal"},"counts":{"fields":0,"keys":0,"methods":9,"values":0},"stub":false},"25":{"app":"E-Document Core","name":"E-Doc. PO Copilot Matching","ns":"Microsoft.eServices.EDocument.OrderMatch.Copilot","obsolete":null,"target":"","sourceTable":"","props":{"access":"Internal"},"counts":{"fields":0,"keys":0,"methods":10,"values":0},"stub":false},"26":{"app":"E-Document Core","name":"E-Doc. PO Copilot Matching","ns":"Microsoft.eServices.EDocument.OrderMatch.Copilot","obsolete":null,"target":"","sourceTable":"","props":{"access":"Internal"},"counts":{"fields":0,"keys":0,"methods":9,"values":0},"stub":false},"27":{"app":"E-Document Core","name":"E-Doc. PO Copilot Matching","ns":"Microsoft.eServices.EDocument.OrderMatch.Copilot","obsolete":null,"target":"","sourceTable":"","props":{"access":"Internal"},"counts":{"fields":0,"keys":0,"methods":9,"values":0},"stub":false},"28":{"app":"E-Document Core","name":"E-Doc. PO Copilot Matching","ns":"Microsoft.eServices.EDocument.OrderMatch.Copilot","obsolete":null,"target":"","sourceTable":"","props":{"access":"Internal"},"counts":{"fields":0,"keys":0,"methods":9,"values":0},"stub":false},"29":{"app":"E-Document Core","name":"E-Doc. PO Copilot Matching","ns":"Microsoft.eServices.EDocument.OrderMatch.Copilot","obsolete":{"state":"Pending","tag":"29.0","reason":"The E-Document Purchase Order Matching Copilot has been deprecated. AI-assisted line matching is now handled at import time in the E-Document Purchase Draft experience by codeunit \"E-Doc. AI Tool Processor\"."},"target":"","sourceTable":"","props":{"access":"Internal"},"counts":{"fields":0,"keys":0,"methods":9,"values":0},"stub":false}},"fields":[],"keys":[],"procedures":[{"name":"MatchWithCopilot","sig":"(var Record E-Doc. Imported Line, var Record Purchase Line, var Record E-Doc. PO Match Prop. Buffer)","named":"(var TempEDocumentImportedLine: Record \"E-Doc. Imported Line\" temporary; var TempPurchaseLine: Record \"Purchase Line\" temporary; var TempAIProposalBuffer: Record \"E-Doc. PO Match Prop. Buffer\" temporary)","returns":"Boolean","kind":"procedure","access":"public","obsolete":null,"range":"24-29","first":24,"last":29,"obsoleteSince":null,"spans":[{"from":24,"to":29,"named":"(var TempEDocumentImportedLine: Record \"E-Doc. Imported Line\" temporary; var TempPurchaseLine: Record \"Purchase Line\" temporary; var TempAIProposalBuffer: Record \"E-Doc. PO Match Prop. Buffer\" temporary)","returns":"Boolean","kind":"procedure","access":"public","obsolete":null}]},{"name":"CostDifference","sig":"(Decimal, Decimal, Decimal, Decimal)","named":"(POCost: Decimal; PODiscount: Decimal; EdocCost: Decimal; EDocDiscount: Decimal)","returns":"Decimal","kind":"procedure","access":"public","obsolete":null,"range":"24-29","first":24,"last":29,"obsoleteSince":null,"spans":[{"from":24,"to":29,"named":"(POCost: Decimal; PODiscount: Decimal; EdocCost: Decimal; EDocDiscount: Decimal)","returns":"Decimal","kind":"procedure","access":"public","obsolete":null}]},{"name":"Match","sig":"(var Record E-Doc. PO Match Prop. Buffer, var Record E-Doc. Imported Line, var Record Purchase Line, SecretText, Text)","named":"(var TempAIProposalBuffer: Record \"E-Doc. PO Match Prop. Buffer\" temporary; var TempEDocumentImportedLine: Record \"E-Doc. Imported Line\" temporary; var TempPurchaseLine: Record \"Purchase Line\" temporary; CompletionPromptTxt: SecretText; UserInputTxt: Text)","returns":"Boolean","kind":"procedure","access":"public","obsolete":null,"range":"24-29","first":24,"last":29,"obsoleteSince":null,"spans":[{"from":24,"to":29,"named":"(var TempAIProposalBuffer: Record \"E-Doc. PO Match Prop. Buffer\" temporary; var TempEDocumentImportedLine: Record \"E-Doc. Imported Line\" temporary; var TempPurchaseLine: Record \"Purchase Line\" temporary; CompletionPromptTxt: SecretText; UserInputTxt: Text)","returns":"Boolean","kind":"procedure","access":"public","obsolete":null}]},{"name":"Match","sig":"(SecretText, Text, var Record E-Doc. PO Match Prop. Buffer, var Record E-Doc. Imported Line, var Record Purchase Line)","named":"(CompletionPromptTxt: SecretText; UserInputTxt: Text; var TempAIProposalBuffer: Record \"E-Doc. PO Match Prop. Buffer\" temporary; var TempEDocumentImportedLine: Record \"E-Doc. Imported Line\" temporary; var TempPurchaseLine: Record \"Purchase Line\" temporary)","returns":"Integer","kind":"procedure","access":"public","obsolete":null,"range":"24-29","first":24,"last":29,"obsoleteSince":null,"spans":[{"from":24,"to":29,"named":"(CompletionPromptTxt: SecretText; UserInputTxt: Text; var TempAIProposalBuffer: Record \"E-Doc. PO Match Prop. Buffer\" temporary; var TempEDocumentImportedLine: Record \"E-Doc. Imported Line\" temporary; var TempPurchaseLine: Record \"Purchase Line\" temporary)","returns":"Integer","kind":"procedure","access":"public","obsolete":null}]},{"name":"IsCopilotEnabled","sig":"()","named":"()","returns":"Boolean","kind":"procedure","access":"public","obsolete":null,"range":"24","first":24,"last":24,"obsoleteSince":null,"spans":[{"from":24,"to":24,"named":"()","returns":"Boolean","kind":"procedure","access":"public","obsolete":null}]},{"name":"IsCopilotVisible","sig":"()","named":"()","returns":"Boolean","kind":"procedure","access":"public","obsolete":null,"range":"24-25","first":24,"last":25,"obsoleteSince":null,"spans":[{"from":24,"to":25,"named":"()","returns":"Boolean","kind":"procedure","access":"public","obsolete":null}]},{"name":"SumUnitCostForAIMatches","sig":"(var Record E-Doc. PO Match Prop. Buffer)","named":"(var TempAIProposalBuffer: Record \"E-Doc. PO Match Prop. Buffer\" temporary)","returns":"Decimal","kind":"procedure","access":"public","obsolete":null,"range":"24-29","first":24,"last":29,"obsoleteSince":null,"spans":[{"from":24,"to":29,"named":"(var TempAIProposalBuffer: Record \"E-Doc. PO Match Prop. Buffer\" temporary)","returns":"Decimal","kind":"procedure","access":"public","obsolete":null}]},{"name":"RegisterAICapability","sig":"()","named":"()","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"24-29","first":24,"last":29,"obsoleteSince":null,"spans":[{"from":24,"to":29,"named":"()","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"FeatureName","sig":"()","named":"()","returns":"Text","kind":"procedure","access":"public","obsolete":null,"range":"24-29","first":24,"last":29,"obsoleteSince":null,"spans":[{"from":24,"to":29,"named":"()","returns":"Text","kind":"procedure","access":"public","obsolete":null}]},{"name":"GetFunction","sig":"(var Codeunit E-Doc. PO AOAI Function)","named":"(var Response: Codeunit \"E-Doc. PO AOAI Function\")","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"25-29","first":25,"last":29,"obsoleteSince":null,"spans":[{"from":25,"to":29,"named":"(var Response: Codeunit \"E-Doc. PO AOAI Function\")","returns":"","kind":"procedure","access":"public","obsolete":null}]},{"name":"SetGrounding","sig":"(Boolean)","named":"(Ground: Boolean)","returns":"","kind":"procedure","access":"public","obsolete":null,"range":"25-29","first":25,"last":29,"obsoleteSince":null,"spans":[{"from":25,"to":29,"named":"(Ground: Boolean)","returns":"","kind":"procedure","access":"public","obsolete":null}]}],"events":[],"values":[],"controls":[],"actions":[]}}