Skip to content
flowon.com

Case management · Part 2 of 7

Validate and calculate

Check new cases with a validation set and calculate each case's response due date in working days with a formula.

In this part you build the two rules the rest of the solution depends on. The New case checks validation set stops an agent from saving a case without a title, without a case type, or with a description too short to act on, and it reports every problem at once. The Case response due date formula works out when the first response to a case is due: the case’s creation date plus a number of working days that depends on the priority, read from the configuration values you created in part 1. Weekends and the organization’s business closures are skipped. You test both blocks in the Run dialog before anything uses them.

Complete Part 1: Set up the project. You need the Case Management project and the configuration values SlaResponseDaysHigh and SlaResponseDaysStandard.

In a recipe, the names of the rules that fail are the message the user sees, one per line. Write each rule name as the sentence you want agents to read.

  1. Go to Logic FabricLogicLogic Blocks and select New.

  2. Enter New case checks as the Name and choose the Case Management Project.

  3. Under What should this block work out?, choose Validation set.

  4. On the Input tab, add three inputs. Leave Must have a value off for all of them: checking for missing values is the job of the rules.

    Name Type
    Title Text
    CaseType Choice, with Is Local on, Entity Case and Option Set Case Type
    Description Text
  5. Open the Validation Set tab and select Add rule for each rule:

    Name Condition
    A case title is required Not Null Or Empty String: Title
    Choose a case type Not Null: CaseType
    Describe the problem in at least 20 characters And: Not Null Or Empty String Description, and Is Greater Than Or Equal To with Length Description and the constant 20

    You build each condition in the expression editor by picking functions and filling their slots.

  6. Leave Return First Validation Error off, so every failing rule is reported.

  7. On the Docs tab, add the Description Checks that a new case has the information the service desk needs. and save the block.

  1. Select Run on the block.

  2. Leave Title and CaseType empty and enter Broken as Description. Select Run, or press Ctrl+Enter.

  3. isValid is false, and failedValidations lists all three rule names.

  4. Enter Router drops connection as Title, choose Problem as CaseType and enter The router restarts every evening at 19:00. as Description. Run it again: isValid is true and failedValidations is empty.

  1. Create another logic block named Case response due date in the Case Management project and choose Formula.

  2. On the Input tab, add two inputs:

    Name Type Must have a value
    CreatedOn Date and Time, DateTime Behavior User Local On
    Priority Choice, with Is Local on, Entity Case and Option Set Priority Off
  3. On the Formula tab, set the result Type to Date and Time with DateTime Behavior User Local.

  4. Select Write formula and build this expression:

    AddBusinessDays(CreatedOn, Switch(Priority; High => SlaResponseDaysHigh; else SlaResponseDaysStandard))

    • Pick Add Business Days and put CreatedOn in its Date slot.
    • In Number of working days, pick Switch. Set its Value to Priority, add one case whose When is the Priority choice High and whose Then is the Configuration Value SlaResponseDaysHigh, and set Otherwise to the Configuration Value SlaResponseDaysStandard.
    • Leave Work week empty, so the working week is Monday to Friday. A desk that works Sunday to Thursday would enter SU-TH.
  5. On the Docs tab, add the Description Returns when the first response to a case is due, in working days from its creation. and save.

Because Priority is optional, a case without a priority falls through to Otherwise and gets the standard SLA. See Date and time functions for how working days are counted.

Run the block with these inputs. The expected results assume a Monday-to-Friday week with no business closures in the second half of October.

CreatedOn Priority Expected result
Monday, October 19, 2026, 09:00 Normal Thursday, October 22, 09:00 (3 working days)
Monday, October 19, 2026, 09:00 High Tuesday, October 20, 09:00 (1 working day)
Friday, October 23, 2026, 10:00 Low Wednesday, October 28, 10:00 (the weekend is skipped)
Friday, October 23, 2026, 10:00 (empty) Wednesday, October 28, 10:00 (standard SLA)

Then change SlaResponseDaysStandard to 2, run the first row again and check that the result moves to Wednesday, October 21. Set the value back to 3 afterwards. Because the value is not cached, the change applies on the next run.

  • New case checks reports all three rule names for an empty case and none for a complete one.
  • Case response due date returns a date that skips weekends, and the number of days follows the configuration values without editing the formula.
  • Both blocks show Case Management as their project.

The formula is the single definition of the response SLA in this series. The flow in part 3, the business process in part 5 and the AI tool in part 6 all call it, so a change to the rule is made here once.

Continue with Part 3: Automate with a logic flow, where a flow assigns each new case to the triage team and emails them with its due date.