Support Ticket Auto-Categorizer
Triggers on a new support ticket from Microsoft Forms, classifies the request via AI Builder, persists to Dataverse, and routes to the correct Teams support channel by category. Reduces manual triage time.
Overview
Triggers on every new submission to a Microsoft Forms support intake form, runs the description through an AI Builder text-classification model, picks the matching Teams channel via a 5-way Switch (Software/Hardware/Network/Access Request/Other), creates a Dataverse row, and posts a triaged ticket card. Complete reference for Forms-in → AI categorize → Dataverse persist → Teams route.
**Flow ID:** 95597397-ae37-f111-88b3-6045bd0052fe • **State:** Off
Use Case
Help desks burn time triaging incoming tickets. AI Builder text classification trained on historical tickets predicts the category and routes to the matching Teams channel automatically, with a Dataverse audit trail.
**Key Benefits:** AI categorization keeps tickets out of wrong queues; Forms intake = familiar UX; Dataverse enables Power BI dashboards; one env var per category-channel mapping; Default case prevents lost tickets.
Flow Architecture
Trigger: **When a new support ticket is submitted** (Forms OnNewResponse). 1. Get Ticket Response Details (Forms) 2. Init varTicketDescription, varSubmitterEmail 3. **Classify Ticket Text with AI Builder** (PredictText) 4. Init varPredictedCategory + varPredictionConfidence 5. **Route To Support Team Channel** (Switch — Software/Hardware/Network/Access/Default) 6. **Create Support Ticket Row in Dataverse** (AddRecord) 7. **Post Ticket To Support Channel** (PostMessageToChannel)
Environment Variables
| Variable | Schema Name | Type | Default | Purpose |
|---|---|---|---|---|
| Support Ticket Form ID | flowlibs_SupportTicketFormId | String | (none) | Microsoft Forms form ID watched by the trigger |
| Support Ticket Description Question ID | flowlibs_SupportTicketQuestionId | String | (none) | Forms question ID for the ticket description |
| Support Ticket Dataverse Table Name | flowlibs_SupportTicketTableName | String | flowlibs_supportticket | Dataverse table to insert into |
| AI Builder Text Classification Model ID | flowlibs_AIBuilderTextClassificationModelId | String | (none) | GUID of the published AI Builder model |
| Teams Group ID | flowlibs_TeamsGroupId | String | (none) | GUID of the M365 Group containing all support channels |
| Support Software Channel ID | flowlibs_SupportSoftwareChannelId | String | (none) | Channel for software-classified tickets |
| Support Hardware Channel ID | flowlibs_SupportHardwareChannelId | String | (none) | Channel for hardware-classified tickets |
| Support Network Channel ID | flowlibs_SupportNetworkChannelId | String | (none) | Channel for network-classified tickets |
| Support Access Channel ID | flowlibs_SupportAccessChannelId | String | (none) | Channel for access-request-classified tickets |
| Support Other/Default Channel ID | flowlibs_SupportOtherChannelId | String | (none) | Fallback channel for unclassified tickets |
Connectors & Connections
| Connector | API Name | Connection Format | Usage |
|---|---|---|---|
| Microsoft Forms | shared_microsoftforms | flowlibs_sharedmicrosoftforms_42b8e | OnNewResponse trigger + GetResponseDetails |
| Microsoft Dataverse | shared_commondataserviceforapps | new_sharedcommondataserviceforapps_005e6 | AddRecord against flowlibs_supportticket |
| Microsoft Teams | shared_teams | flowlibs_sharedteams_8ba46 | PostMessageToChannel — routed ticket card |
Customization Guide
1. Import; train + publish AI Builder text-classification model; set model GUID env var; set Forms form/question + Dataverse table + Teams group + 5 channel env vars; update connection refs; turn on.
**Common Modifications:** low-confidence escalation if varPredictionConfidence < 0.7; notify submitter via Outlook; SLA fields per category; categorize via AOAI instead of AI Builder; attachments path via Forms Get attachment; round-robin via Dataverse on-call lookup; VIP escalation via Office 365 Users.
Key Expressions
- @outputs('Get_Ticket_Response_Details')?['body/' + parameters('flowlibs_SupportTicketQuestionId')] — description from Forms
- @first(body('Classify_Ticket_Text_with_AI_Builder')?['predictionOutput']?['result'])?['name'] — top label
- @first(body('Classify_Ticket_Text_with_AI_Builder')?['predictionOutput']?['result'])?['confidenceScore'] — confidence
- @variables('varPredictedCategory') — Switch operand