# Route by business hours with a Time Rule

> Add a Time Rule step to a workflow. It splits calls and messages into Open hours and Outside hours, using an hours set from Settings > Hours.

Source: https://useline.io/help/workflows/time-rule  
Section: Workflows  
Last updated: 2026-11-06  
Roles: Owner, Admin

A **Time Rule** step sends a call or message down one of two branches: **Open hours** or **Outside hours**. Your business hours change what happens only through a Time Rule. No other setting routes by hours.

## Before you start

- You need the **Owner** or **Admin** role.
- Set your hours in **Settings** > **Hours**. Every workspace has a **Business Hours** set.

## Add a Time Rule

1. Open **Workflows**.
2. Open the workflow.
3. Select the **+** where the rule must go.
4. Under **Logic**, select **Time Rule**.
5. In **Hours set**, select a set, for example **Business Hours**.
6. Connect a step to the **Open hours** branch.
7. Connect a step to the **Outside hours** branch.
8. Select **Publish**.

You must connect a step to both branches. Line shows an issue until you do, and you cannot publish.

## Hours sets or custom hours

| Choice | How it works |
|--------|--------------|
| An hours set | The workflow reads the set each time it runs. When you change the set in **Settings** > **Hours**, the workflow uses the new hours at once. You do not need to publish again. |
| **Custom hours for this workflow** | You set days and times in the step. The hours apply only to this workflow. |

Use an hours set when more than one workflow uses the same hours.

## Create another hours set

1. Open **Settings** > **Hours**.
2. Select **New schedule**.
3. In **Name**, type a name, for example "Call receiving hours".
4. Select **Create hours set**.
5. Set the **Timezone** and the **Weekly hours**.
6. Select **Save changes**.

For each open day, you can select **24 hours**. **Open 24 hours, every day** sets all seven days.

You cannot delete the default **Business Hours** set. You cannot delete a set that a workflow uses.

## Example: your agent answers after hours

The **Agent for After-Hour Calls** template does this for you:

1. **Call received**
2. **Time Rule**
3. **Outside hours**: **Agent**
4. **Open hours**: **Ring Members/Groups**

## Test a Time Rule

1. In the workflow, select **Test**.
2. Turn **Outside business hours** on or off.
3. Read which branch the test run takes.

## Common problems

**Calls go the wrong way at the start or end of the day.** Check the **Timezone** of the hours set in **Settings** > **Hours**.

**I changed my hours, but the workflow did not change.** The step uses **Custom hours for this workflow**. Select an hours set in **Hours set** instead, then publish.

## Related articles

- [Handle calls outside business hours](https://useline.io/help/calls/business-hours.md): Set your hours in Settings › Hours. Hours change how calls are handled only through a Time Rule step in the call workflow of the number.
- [Set up what happens when someone calls](https://useline.io/help/workflows/call-workflows.md): A call workflow starts with Call received and lists your numbers. It rings your team, forwards the call, runs your agent or takes a voicemail.
- [Set up what happens when a message comes in](https://useline.io/help/workflows/message-workflows.md): A message workflow starts with Message received. Filter by channel, endpoint, keywords or contact, then add an Agent step, an email or a text.
- [Build and publish a workflow](https://useline.io/help/workflows/build-a-workflow.md): In Workflows, select New workflow, choose a template, set the trigger and steps, fix every issue, then select Publish.
