Skip to content

feat: AI Case Pattern Recognition & Copilot Chat for PrintVis#10

Closed
DDalhoff with Copilot wants to merge 3 commits into
mainfrom
copilot/upload-cases-to-database
Closed

feat: AI Case Pattern Recognition & Copilot Chat for PrintVis#10
DDalhoff with Copilot wants to merge 3 commits into
mainfrom
copilot/upload-cases-to-database

Conversation

Copilot AI commented Jun 23, 2026

Copy link
Copy Markdown

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

  • Tab50100 PVS Case History — flattened case snapshot (job type, customer, material, qty, amount, turnaround days, Copilot audit flag)
  • Tab50101 PVS Case Pattern — grouped patterns keyed on job type + material + customer segment; stores avg/min/max amounts, avg turnaround, case count, confidence score (0–100)
  • Tab50102 PVS AI Case Setup — singleton config: Azure OpenAI endpoint/deployment, history window (months), job queue category
  • TabExt50100 — adds Copilot Assisted + Copilot Assisted At audit fields to PVS Case Header

Business logic

  • Cod50100 PVS Case History Mgmt — pulls PVS Case Header records within the configured window, upserts history, triggers pattern analysis; exposes OnRun for Job Queue (nightly 02:00 by default)
  • Cod50101 PVS Pattern Analysis — sorts history by (Job Type, Material, Segment), accumulates stats, writes pattern records; confidence = min(100, √n × 20)
  • Cod50102 PVS Copilot Case Gen — builds a system prompt injecting the top-5 patterns by confidence, calls Azure OpenAI / AOAI Chat Messages, parses JSON response, and creates + opens the new PVS Case Header

Copilot registration & install

  • EnumExt50100 — extends "Copilot Capability" with "PVS Case Assistant"
  • Cod50103 PVS AI Case Install — registers the capability on install; seeds the default setup record

UI

  • Pag50100 PVS AI Case Setup — admin card; API key written exclusively to IsolatedStorage (masked field, never persisted in table data)
  • Pag50101 PVS Case Patterns — list with confidence score styled Favorable / Ambiguous / Unfavorable; fact-box shows matching history
  • Pag50102 PVS Copilot Case DialogPromptDialog page with Generate / Regenerate / Create Case / Discard system actions; switches to Content mode after first generation
  • PagExt50100 — adds New Case with Copilot (Sparkle) action to PVS Case Card

Permissions

  • PermSet50100 PVS AI Case User — RIMD on all three data tables + Execute on all codeunits and pages

⚠️ Integration — verify before compile

The following PVS Case Header field names are assumed and may need adjustment once symbols are available:

Assumed Likely alternative
"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" and Page::"PVS Case Card".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants