Skip to content
flowon.com

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.

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]

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.

  1. Go to Logic FabricLogicLogic Flows and select New.

  2. Enter Route new case as the Name and choose the Case Management Project. Leave Expose as Dataverse Action and Expose as MCP Tool off.

  3. On the Docs tab, add the Description Assigns a new case to the triage team and notifies them with the response due date.

  4. On the Input tab, add Case, type Lookup to Case, with Must have a value on.

  5. On the Output tab, add ResponseDue, type Date and Time with DateTime Behavior User Local.

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.

# 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.

  1. Add a Try / Catch step named Notify. It has no settings, only the Try, Catch and Finally branches.

  2. In Try, add a Create Email step named NewCaseEmail:

    Setting Value
    To Add Recipient > TriageMembers.Output.users
    CC Add Recipient > the Configuration Value EscalationTeamEmail
    Regarding Case
    Subject Format with the Localized Resource Case_NewCaseSubject and the values OptionLabel(GetCase.prioritycode), GetCase.ticketnumber and GetCase.title
    Body Format with the Localized Resource Case_NewCaseBody and the values toString(SlaDue.Output.result, "MMM dd, yyyy") and RecordUrl(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.

  3. Still in Try, below the email, add an Update Variable step named MarkSent: Variable NotifyResult, Set "Triage team notified."

  4. In Catch, add an Update Variable step named MarkFailed: Variable NotifyResult, Set Concatenate("Notification failed: ", Notify.Error). The Error variable exists only inside Catch, so you copy it into NotifyResult to use it later.

  5. In Finally, add an Add Entity Annotation step named LogNotification: Entity Type Case, Entity Id Case, Title Triage notification, Description NotifyResult.

  6. After the Try / Catch, at the end of the flow, add a Set Output step named Done that sets ResponseDue = SlaDue.Output.result.

  7. 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.

Running a flow from the Run dialog makes real changes: this test reassigns a case and sends real email.

  1. Create a test case in your service app with Case Title Test - router drops connection, any Customer and Priority High.

  2. Back in the flow, select Run. Pick the test case for Case and select Run.

  3. The result shows Succeeded and ResponseDue one working day after the case’s Created On.

  4. Open the case. Its Owner is Service Triage, the timeline shows the sent email and a note titled Triage notification with the text Triage 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.

  • 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.