[Payables Agent] Enable historical line matching experiment#5395
Merged
ventselartur merged 20 commits intomainfrom Nov 10, 2025
Merged
Conversation
…and remove setup table usage - Replace usage of the "EDoc Historical Matching Setup" table with experiment/config-based control: - Add ConfigurationManagement usage and read HistoricalMatchingConfig in the historical-matching codeunit. - Pass HistoricalMatchingConfig through prepare/load/create-user-message flows and use it to decide vendor scope and matching behavior. - Adjust telemetry and JSON payload to reflect experiment-based settings. - Mark "EDoc Historical Matching Setup" table obsolete and add pragma restore. - Remove IsEDocHistoricalMatchingWithLLMActive and related setup checks from E-Documents setup and subscribers. - Remove EDoc Historical Matching Setup from permission sets and data-classification handling. - Simplify CopilotLineMatching: stop passing VendorNo and always invoke the "E-Doc. Historical Matching" codeunit for non-empty lines. Refactor and cleanup to move from setup-table-driven behavior to experiment/config-driven historical matching.
…ching Setup table
- Grant table access ("EDoc Historical Matching Setup" = X) in "E-Doc. Core - Objects"
- Grant read access (tabledata = R) in "E-Doc. Core - Read"
- Grant IMD access (tabledata = IMD) in "E-Doc. Core - User"
… historical matching setup Set ObsoleteTag to '28.0' for vendor/line matching enums and update table handling. Wrap files with CLEANSCHEMA28 conditional and introduce CLEAN28 branch for the table to mark it as Removed with ObsoleteTag '33.0' when appropriate. Remove AL0432 pragma disable/restore lines.
…9-update-historical-matching-to-be-experiment-2
… config, and telemetry - Guard references to "EDoc Historical Matching Setup" with #if not CLEAN28 and surround them with #pragma warning disable/restore AL0432 in permission sets, subscribers and table usages to avoid AL0432 when the table is removed. - Add/restore #pragma warning disable/restore AS0105 around enum field declarations and internal procedure in EDocHistoricalMatchingSetup table to satisfy analyzer. - Add using Microsoft.eServices.EDocument.Processing.AI in E-Document Subscribers and conditionally call DataClassificationEvalData.SetTableFieldsToNormal for the historical matching setup. - Update E-Doc. Historical Matching codeunit: - Clarify error label to reference "e-document line" instead of "e-document". - Use FeatureConfiguration.GetConfiguration instead of ConfigurationManagement.GetConfiguration. - Rename telemetry dimension 'Duration (ms)' to 'Duration'.
…dayland/604259-update-historical-matching-to-be-experiment-2
…9-update-historical-matching-to-be-experiment-2
…rical matching Change #if not CLEANSCHEMA31 to #if not CLEANSCHEMA30 and normalize ObsoleteTag values (set to '27.0' and '30.0') in EDocHistoricalMatchingSetup, EDocLineMatchingScope and EDocVendorMatchingScope.
…9-update-historical-matching-to-be-experiment-2
…te/dayland/604259-update-historical-matching-to-be-experiment-2
Jose-agg
previously approved these changes
Nov 7, 2025
mynjj
previously approved these changes
Nov 7, 2025
src/Apps/W1/EDocument/App/src/Processing/Import/EDocHistoricalMatchingSetup.Table.al
Show resolved
Hide resolved
src/Apps/W1/EDocument/App/src/Processing/Import/EDocHistoricalMatchingSetup.Table.al
Show resolved
Hide resolved
src/Apps/W1/EDocument/App/src/Processing/Import/EDocHistoricalMatchingSetup.Table.al
Show resolved
Hide resolved
src/Apps/W1/EDocument/App/src/Processing/Import/EDocLineMatchingScope.Enum.al
Show resolved
Hide resolved
src/Apps/W1/EDocument/App/src/Processing/Import/EDocVendorMatchingScope.Enum.al
Show resolved
Hide resolved
stkillen
previously approved these changes
Nov 10, 2025
ventselartur
requested changes
Nov 10, 2025
Contributor
ventselartur
left a comment
There was a problem hiding this comment.
Need resolve comments
f4bb5c2
ventselartur
previously approved these changes
Nov 10, 2025
This reverts commit f4bb5c2.
Groenbech96
approved these changes
Nov 10, 2025
src/Apps/W1/EDocument/App/src/Processing/Import/EDocLineMatchingScope.Enum.al
Show resolved
Hide resolved
src/Apps/W1/EDocument/App/src/Processing/EDocumentSubscribers.Codeunit.al
Show resolved
Hide resolved
stkillen
approved these changes
Nov 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors the E-Doc Historical Matching feature to use experiment-based configuration instead of relying on the obsolete
EDoc Historical Matching Setuptable and related enums. It updates permissions, telemetry, and matching logic to support the new approach, and marks legacy configuration objects as obsolete. Conditional compilation is used to maintain compatibility with older schema versions.Transition to experiment-based configuration:
EDoc Historical Matching Setuptable and related enums in the historical matching logic with an experiment configuration string retrieved from the newFeature Configurationcodeunit. Matching behavior (vendor scope, line scope) is now determined by experiment config values instead of table fields. [1] [2] [3] [4] [5] [6] [7] [8]Obsolete legacy configuration objects:
EDoc Historical Matching Setuptable and theEDoc Line Matching ScopeandEDoc Vendor Matching Scopeenums as obsolete, with conditional compilation to control their presence based on schema version. [1] [2] [3] [4] [5] [6] [7] [8] [9]Permissions and data classification updates:
Telemetry improvements:
Minor fixes and cleanup:
using System.Config;directive. [1] [2]Fixes AB#604259