---
title: "Codeunit 6163 E-Doc. PO Copilot Matching"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/6163-e-doc-po-copilot-matching/
type: codeunit
id: 6163
name: "E-Doc. PO Copilot Matching"
app: "E-Document Core"
namespace: Microsoft.eServices.EDocument.OrderMatch.Copilot
versions: "24-29"
build: 29.0.54011.55644
countries: "W1, DE, US"
obsolete: "Pending 29.0"
source: "https://jonas-paprotka.de/ref/codeunit/6163-e-doc-po-copilot-matching/source/?v=28 https://jonas-paprotka.de/ref/codeunit/6163-e-doc-po-copilot-matching/source/"
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
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/"
---

# Codeunit 6163 E-Doc. PO Copilot Matching

JOP-AL, https://jonas-paprotka.de/ref/codeunit/6163-e-doc-po-copilot-matching/

| | |
| --- | --- |
| App | E-Document Core |
| Namespace | Microsoft.eServices.EDocument.OrderMatch.Copilot |
| Versions | 24-29 |
| Minors | W1 24.0-29.0; DE 24.0-29.0; US 24.0-29.0, [every minor](https://jonas-paprotka.de/ref/codeunit/6163-e-doc-po-copilot-matching/editions.json) |
| Access | Internal |
| Obsolete | Pending, tag 29.0, obsolete since 29: 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". |
| Source file | src/Processing/OrderMatching/Copilot/EDocPOCopilotMatching.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| MatchWithCopilot | (var TempEDocumentImportedLine: Record "E-Doc. Imported Line" temporary; var TempPurchaseLine: Record "Purchase Line" temporary; var TempAIProposalBuffer: Record "E-Doc. PO Match Prop. Buffer" temporary) | Boolean | public | 24-29 | - | - |
| CostDifference | (POCost: Decimal; PODiscount: Decimal; EdocCost: Decimal; EDocDiscount: Decimal) | Decimal | public | 24-29 | - | - |
| Match | (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) | Boolean | public | 24-29 | - | - |
| Match | (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) | Integer | public | 24-29 | - | - |
| IsCopilotEnabled | () | Boolean | public | 24 | - | - |
| IsCopilotVisible | () | Boolean | public | 24-25 | - | - |
| SumUnitCostForAIMatches | (var TempAIProposalBuffer: Record "E-Doc. PO Match Prop. Buffer" temporary) | Decimal | public | 24-29 | - | - |
| RegisterAICapability | () | - | public | 24-29 | - | - |
| FeatureName | () | Text | public | 24-29 | - | - |
| GetFunction | (var Response: Codeunit "E-Doc. PO AOAI Function") | - | public | 25-29 | - | - |
| SetGrounding | (Ground: Boolean) | - | public | 25-29 | - | - |

## Source

Symbols: Microsoft.E-DocumentCore.symbols.e1d97edc-c239-46b4-8d84-6368bdf67c8b, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-11-20.
AL source 28: https://github.com/microsoft/BCApps, MIT, releases/28.x at 408a4cc8d3a4c54b60464cc14c964479facb9ba0.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
