Case management · Part 3 of 7
Automate with a logic flow
Build a logic flow that assigns a new case to the triage team, emails the team in their language, and records whether the email went out.
What you’ll build
Section titled “What you’ll build”In this part you build Route new case, the logic flow that runs for every new case. It reads the case, calculates its response due date with the formula from part 2, assigns the case to the Service Triage team and emails every team member, with the escalation mailbox in copy. The email is the part of the flow that depends on something outside your data, so you wrap it in Try / Catch: if the email cannot be created or sent, the case is still assigned, and a note on the case says what happened either way. You test the flow on a real case with the Run dialog.
flowchart TD A[GetCase] --> B[SlaDue: run formula] B --> C[Assign to Service Triage] C --> D[Resolve team members] D --> E[Try: create and send email] E -. fails .-> F[Catch: keep the error] E --> G[Finally: add note] F --> G G --> H[Set Output]
Before you begin
Section titled “Before you begin”Complete Part 2: Validate and calculate. You need the Case response due date formula, and from part 1 the EscalationTeamEmail configuration value and the Case_NewCaseSubject and Case_NewCaseBody localized resources. The Service Triage team must have members with email addresses.
Create the flow
Section titled “Create the flow”-
Go to Logic FabricLogicLogic Flows and select New.
-
Enter
Route new caseas the Name and choose theCase ManagementProject. Leave Expose as Dataverse Action and Expose as MCP Tool off. -
On the Docs tab, add the Description
Assigns a new case to the triage team and notifies them with the response due date. -
On the Input tab, add
Case, type Lookup to Case, with Must have a value on. -
On the Output tab, add
ResponseDue, type Date and Time with DateTime Behavior User Local.
Read the case and work out the due date
Section titled “Read the case and work out the due date”Open the Flow tab and select Add step. For each step, search for the step type, rename the step and fill in its settings.
| # | Step type | Step name | Settings |
|---|---|---|---|
| 1 | Get Entity By Id | GetCase |
Entity Type: Case. Entity Id: Case. Columns: Case Title, Case Number, Priority, Created On. |
| 2 | Run Logic Block | SlaDue |
Logic Block Type: Case response due date. On the Inputs tab: CreatedOn = GetCase.createdon, Priority = GetCase.prioritycode. |
The step name becomes the variable name, so later steps read the due date as SlaDue.Output.result.
Assign the case
Section titled “Assign the case”| # | Step type | Step name | Settings |
|---|---|---|---|
| 3 | Assign Record | AssignToTriage |
Table Case, record Case. New Owner: a Team constant, picked with Look for Team: Service Triage. |
| 4 | Resolve Recipients | TriageMembers |
Users From: Team. Team: Service Triage. |
| 5 | New Variable | NotifyResult |
Type: Text, one value. |
Resolve Recipients returns the enabled members of the team, each once, as a list in TriageMembers.Output.users. NotifyResult starts empty and will hold the outcome of the email.
Send the notification safely
Section titled “Send the notification safely”-
Add a Try / Catch step named
Notify. It has no settings, only the Try, Catch and Finally branches. -
In Try, add a Create Email step named
NewCaseEmail:Setting Value To Add Recipient > TriageMembers.Output.usersCC Add Recipient > the Configuration Value EscalationTeamEmailRegarding CaseSubject Format with the Localized Resource Case_NewCaseSubjectand the valuesOptionLabel(GetCase.prioritycode),GetCase.ticketnumberandGetCase.titleBody Format with the Localized Resource Case_NewCaseBodyand the valuestoString(SlaDue.Output.result, "MMM dd, yyyy")andRecordUrl(Case)Send the email now Selected Option Label turns the priority into its display label, To Text with the Long Format Date format turns the due date into text such as
Oct 22, 2026, and Record Link builds a link that opens the case. -
Still in Try, below the email, add an Update Variable step named
MarkSent: VariableNotifyResult, Set"Triage team notified." -
In Catch, add an Update Variable step named
MarkFailed: VariableNotifyResult, SetConcatenate("Notification failed: ", Notify.Error). The Error variable exists only inside Catch, so you copy it intoNotifyResultto use it later. -
In Finally, add an Add Entity Annotation step named
LogNotification: Entity Type Case, Entity IdCase, TitleTriage notification, DescriptionNotifyResult. -
After the Try / Catch, at the end of the flow, add a Set Output step named
Donethat setsResponseDue=SlaDue.Output.result. -
Save the flow. If the save is refused with “Logic Flow: Resolve all validation errors.”, fix the steps that show Needs setup.
Finally runs whatever the outcome, so every new case gets a note that says whether the team was told. Because Catch handles the error, the flow continues to Done and the case stays assigned even when the email fails.
Test the flow
Section titled “Test the flow”Running a flow from the Run dialog makes real changes: this test reassigns a case and sends real email.
-
Create a test case in your service app with Case Title
Test - router drops connection, any Customer and Priority High. -
Back in the flow, select Run. Pick the test case for Case and select Run.
-
The result shows Succeeded and ResponseDue one working day after the case’s Created On.
-
Open the case. Its Owner is
Service Triage, the timeline shows the sent email and a note titled Triage notification with the textTriage team notified.
To see the Catch branch work, ask an administrator to make the email fail in a development environment, for example by temporarily removing your permission to send email, and run the flow again. The case is still assigned, and the note starts with Notification failed: followed by the reason.
Check your work
Section titled “Check your work”- The flow saves without Needs setup badges and runs with Succeeded.
- The test case is owned by
Service Triage, and the team members and the escalation mailbox received the email. - The email subject reads like
New High priority case CAS-01001-A1B2C3: Test - router drops connection, in the language of the user the flow ran for. - The case has a Triage notification note.
For a larger flow that uses the same patterns, see Example: escalate a case.
Continue with Part 4: Wire it with a recipe, where a recipe runs the validation set and this flow automatically whenever a case is created.