Calculate Business Hours
🧾 Definition
The "Calculate Business Hours" action is designed to compute the exact number of business days, hours, and minutes between two specified dates and times. This action takes into account your defined business hours, weekends, and holidays, making it especially useful for scenarios where you need to measure time spent on tasks or SLA compliance based on working schedules rather than calendar time.
Key capabilities include:
- Supporting custom time zones for global business operations.
- Allowing flexible definitions of business start/end times.
- Excluding weekends and public holidays from the calculation.
- Returning detailed outputs: total business days, hours, and minutes.
Use this action to track performance, measure processing delays, or calculate time intervals for internal reporting—accurately and in context with your organization's actual working calendar.
📘 Example Use Cases
1. SLA Deadline TrackingCalculate the exact business time elapsed between ticket creation and resolution to ensure service level agreements (SLAs) are met.
2. Invoice Processing TimeMeasure how long it takes (in working hours) to process invoices between submission and approval dates.
3. Task Duration AnalysisAnalyze how much real business time a task or process consumes, excluding weekends and holidays.
4. Project Turnaround ReportingGenerate reports showing accurate business durations between project phases for better timeline forecasting.
5. Compliance AuditingCalculate the exact working minutes taken to respond to regulatory or customer requests for audit purposes.
6. Workflow Timeout TriggersUse the result to branch or trigger escalations when a task exceeds expected working time thresholds.
🧩 Inputs
1. Time ZoneDefines the regional time context for the calculation. Select the time zone in which business hours will be evaluated. This ensures that all input dates and business hour settings are correctly aligned to the local business schedule.
2. Start DateThe beginning of the time period to analyze.
Enter the start date and time for the business hours calculation. This marks the starting point of the time interval and must be in a standard date-time format (e.g., 2025-07-01T09:00
).
3. End DateThe end of the time period to analyze.
Enter the end date and time for the business hours calculation. This defines the end of the time range to measure. It must also follow a standard date-time format (e.g., 2025-07-05T17:00
).
4. Start Hour of Business DayIndicates when a business day begins.
Specify the daily business start time, such as 09:00
or 08:30
. This time is used to determine the start of each working day for business hour calculations.
5. End Hour of Business DayIndicates when a business day ends.
Specify the daily business closing time, like 17:00
or 18:00
. This marks the latest time each day that contributes to the business hour total.
6. WeekendsDefines which days are considered non-working days. Choose the days of the week that should be excluded from business hour calculations (e.g., Saturday, Sunday). These are treated as non-working days.
7. HolidaysOptional list of non-working dates.
Provide a list of public holidays or special non-working days in ISO format (YYYY-MM-DD
), separated by commas. For example: 2025-01-01, 2025-12-25
. These dates will be excluded from business hours just like weekends.
📤 Outputs
1. Total Business DaysThe total number of valid working days within the specified date range. This field returns how many full or partial business days exist between the start and end dates, based on your defined business hours, weekends, and holidays. Each business day is counted once, even if it only partially overlaps the specified time range.
2. Total HoursThe cumulative business time in hours. Displays the total number of business hours between the two dates. It only includes hours that fall within the defined daily start and end times, excluding weekends and holidays.
3. Total MinutesThe cumulative business time in minutes. Provides the same value as "Total Hours" but in minutes instead. Useful if you require finer time measurements for tasks like SLA tracking or time-based billing.
4. Start DateThe original start date used in the calculation. This is the date and time you provided as the beginning of the range. It’s included again in the output for reference or further logic chaining in your flow.
5. End DateThe original end date used in the calculation. This is the date and time you provided as the end of the range. Like the Start Date, it’s repeated here so it can be used later in your automation without re-entering.
📘 Example Scenario: Calculate Response SLA Time Excluding Weekends & Holidays
**Use Case:**Imagine you're managing a customer support workflow where each incoming ticket must be responded to within 16 business hours. You want to automatically calculate the time elapsed (in business hours and minutes) from when a ticket is received to when an agent responds, while excluding weekends, holidays, and non-working hours.
How It Works in the Flow:
-
A ticket is submitted through a form or email.
-
The start date is set to the ticket submission timestamp.
-
The end date is set to the agent's response timestamp.
-
You configure:
- Business hours: 09:00–17:00
- Weekends: Saturday, Sunday
- Holidays: Public holidays in ISO format (e.g.,
2024-12-25
)
-
The Calculate Business Hours action runs and outputs:
- Total business hours and minutes between submission and response
-
You use this output to:
- Flag tickets that exceeded the 16-hour SLA
- Send alerts or update internal records
**Result:**You now have an accurate way to measure SLA compliance based on business hours — not just raw timestamps — making your reporting fair and actionable.
Updated about 18 hours ago