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.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow triggers on every new submission to a Microsoft Forms support intake form, runs the ticket description through an AI Builder text-classification model to predict the ticket's category, picks the matching Teams channel via a 5-way Switch (Software / Hardware / Network / Access Request / Other), creates a Dataverse row in the flowlibs_supportticket table, and posts a triaged ticket card into the routed support Teams channel.
Use Case
Help desks burn time triaging incoming tickets — reading the description, deciding the queue, manually pinging the right team. Misroutes are common and slow down resolution. This flow uses an AI Builder text-classification model trained on the org's historical tickets to predict the category and route the new ticket to the matching Teams channel automatically, persisting an audit trail in Dataverse.
The flow is ideal for teams that:
- AI Builder text classification keeps tickets out of the wrong queue.
- Forms-driven intake means submitters use a familiar UX (no portal).
- Dataverse persistence enables Power BI dashboards on volume + accuracy.
- One env var per category-channel mapping — re-route a queue without flow edits.
- Switch with a Default case guarantees nothing is lost when the model can't classify confidently.
Flow Architecture
When a new support ticket is submitted
Microsoft Forms OnNewResponseFires on every new response to the configured intake form.
Get Ticket Response Details
Microsoft Forms GetResponseDetailsPulls the full answer set including description text and submitter email.
Init varTicketDescription / varSubmitterEmail
InitializeVariableHolds the description text and submitter email for downstream actions.
Classify Ticket Text with AI Builder
AI Builder PredictTextRuns varTicketDescription through the model identified by flowlibs_AIBuilderTextClassificationModelId.
Init varPredictedCategory / varPredictionConfidence / varRoutingChannelId
InitializeVariableCaptures the top-1 label, its confidence, and a placeholder for the routed channel.
Route To Support Team Channel
Switch (4 cases + Default)Cases on varPredictedCategory: Software / Hardware / Network / Access Request — set varRoutingChannelId to the matching env var. Default → flowlibs_SupportOtherChannelId.
- Software → flowlibs_SupportSoftwareChannelId — Sets the routing target to the software channel.
- Hardware → flowlibs_SupportHardwareChannelId — Sets the routing target to the hardware channel.
- Network → flowlibs_SupportNetworkChannelId — Sets the routing target to the network channel.
- Access Request → flowlibs_SupportAccessChannelId — Sets the routing target to the access-request channel.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_SupportTicketFormId | String | — | Microsoft Forms form ID watched by the trigger. |
| flowlibs_SupportTicketQuestionId | String | — | Question ID inside the Forms response that holds the ticket description text. |
| flowlibs_SupportTicketTableName | String | flowlibs_supportticket | Logical name/entity-set of the Dataverse table. |
| flowlibs_AIBuilderTextClassificationModelId | String | — | GUID of the published AI Builder text-classification model. |
| flowlibs_TeamsGroupId | String | — | GUID of the Microsoft 365 Group containing all support channels. |
| flowlibs_SupportSoftwareChannelId | String | — | Channel ID for software-classified tickets. |
| flowlibs_SupportHardwareChannelId | String | — | Channel ID for hardware-classified tickets. |
| flowlibs_SupportNetworkChannelId | String | — | Channel ID for network-classified tickets. |
| flowlibs_SupportAccessChannelId | String | — | Channel ID for access-request-classified tickets. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Forms | shared_microsoftforms | OnNewResponse (trigger) GetResponseDetails |
| Dataverse | shared_commondataserviceforapps | AddRecord (persists the ticket) |
| Teams | shared_teams | PostMessageToChannel (posts the routed ticket card) |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Add a low-confidence escalation
- Insert an If after the prediction that checks varPredictionConfidence < 0.7 and routes to a human-review channel before the main Switch.
- Notify the submitter
- Add an Outlook Send Email (V2) after the Teams post acknowledging receipt and including the routed channel name.
- Add SLA fields
- In Create Support Ticket Row, set due_date based on addDays(utcNow(), n) driven by category — Network 1 day, Software 3, etc.
- Categorize via AOAI instead
- Swap the AI Builder action for an Azure OpenAI HTTP call when there isn't enough labeled data for AI Builder.
- Add an attachments path
- Use Forms's Get attachment content to pull file uploads, then store them on the row's Notes annotation table.
- Round-robin within a queue
- After the Switch, query Dataverse for the queue's on-call user and @-mention them in the Teams post.
- Escalate VIP submitters
- Look up varSubmitterEmail in an Office 365 Users action and bypass the Switch for users in a specific group.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Read description answer from Forms response
Indexes the answers map by the configured question ID.
EXPR.02Submitter email from Forms
Standard Forms response field.
EXPR.03Top label from prediction
First element of the predictionOutput.result array.
EXPR.04Top-label confidence
Used by the low-confidence customization.
EXPR.05Switch operand
Drives the routing Switch.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.