Closed
feat: AI Case Pattern Recognition & Copilot Chat for PrintVis#10
Conversation
Copilot created this pull request from a session on behalf of
DDalhoff
June 23, 2026 12:54
View session
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.
Adds an AI-powered workflow that ingests historical PrintVis cases, derives job patterns, and surfaces a Copilot chat dialog on the Case Card to draft new cases from natural language descriptions.
Data layer
Tab50100PVS Case History — flattened case snapshot (job type, customer, material, qty, amount, turnaround days, Copilot audit flag)Tab50101PVS Case Pattern — grouped patterns keyed on job type + material + customer segment; stores avg/min/max amounts, avg turnaround, case count, confidence score (0–100)Tab50102PVS AI Case Setup — singleton config: Azure OpenAI endpoint/deployment, history window (months), job queue categoryTabExt50100— addsCopilot Assisted+Copilot Assisted Ataudit fields toPVS Case HeaderBusiness logic
Cod50100PVS Case History Mgmt — pullsPVS Case Headerrecords within the configured window, upserts history, triggers pattern analysis; exposesOnRunfor Job Queue (nightly 02:00 by default)Cod50101PVS Pattern Analysis — sorts history by(Job Type, Material, Segment), accumulates stats, writes pattern records; confidence =min(100, √n × 20)Cod50102PVS Copilot Case Gen — builds a system prompt injecting the top-5 patterns by confidence, callsAzure OpenAI/AOAI Chat Messages, parses JSON response, and creates + opens the newPVS Case HeaderCopilot registration & install
EnumExt50100— extends"Copilot Capability"with"PVS Case Assistant"Cod50103PVS AI Case Install — registers the capability on install; seeds the default setup recordUI
Pag50100PVS AI Case Setup — admin card; API key written exclusively toIsolatedStorage(masked field, never persisted in table data)Pag50101PVS Case Patterns — list with confidence score styled Favorable / Ambiguous / Unfavorable; fact-box shows matching historyPag50102PVS Copilot Case Dialog —PromptDialogpage with Generate / Regenerate / Create Case / Discard system actions; switches toContentmode after first generationPagExt50100— adds New Case with Copilot (Sparkle) action toPVS Case CardPermissions
PermSet50100PVS AI Case User — RIMD on all three data tables + Execute on all codeunits and pagesThe following
PVS Case Headerfield names are assumed and may need adjustment once symbols are available:"Sell-to Customer No.""Customer No.""Job Type""Job Type Code""Requested Delivery Date""Due Date""Total Price""Total Sales Price""Quantity""Quantity 1"Also verify the page name used in
extends "PVS Case Card"andPage::"PVS Case Card".