# If operating hours

**If Operating Hours** checks whether the **current time** is included in a configured **operating hours** slot. It is useful whenever you want to connect a conversation to a live agent only when a team is actually open, so users do not wait for an agent that cannot reply.

<figure><img src="/files/G0gHmZ3lcfop8HtfzxFO" alt=""><figcaption></figcaption></figure>

You can create **different working hours** for different teams or departments (for example, Sales and Support), and this is also very useful for **international teams** working across time zones.

### Where to find the action

In **Tiledesk Design Studio**, you can find it here: Most used actions → If Operating Hours

### How to use it in your flow

Place **If Operating Hours** right before **Transfer to a Human**. Whenever the chat is supposed to be connected to a live agent, the system checks if it is currently inside the team’s operating hours.

Green endpoint

* If the current time is within operating hours, the green endpoint is triggered and the flow can continue to **Transfer to a Human**.

Red endpoint

* If the current time is outside operating hours, the red endpoint is triggered. You can route users to an offline path (collect email or phone number, or ask them to leave a message).

<figure><img src="/files/dA9ZIDAE7y0eoDB8rMZO" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Tip: This pattern keeps your experience clean. Live handoff happens only when the team is available and offline requests are collected in a structured way.
{% endhint %}

### How to configure the action

{% stepper %}
{% step %}

#### Add the action

Add the **If Operating Hours** action to your flow.
{% endstep %}

{% step %}

#### Open configuration

Click the action to open the configuration panel.
{% endstep %}

{% step %}

#### Choose which operating hours to check

Under **Check operating hours**, choose one of these options:

* Option A: **General** (project-wide)\
  Use this when the same opening hours apply to the whole project. The **General** operating hours refers to your whole project.

  Your customers cannot ask for an agent during **offline hours**, and their requests will be automatically put in the **Unassigned conversations** queue.
* Option B: **Selected time slot** (team-specific)\
  Use this when different teams need different schedules. For example, you can set a dedicated time slot for your **Sales** team, and another one for **Support**.
  {% endstep %}
  {% endstepper %}

<figure><img src="/files/zSpfU04HMS49Uionrn6L" alt=""><figcaption></figcaption></figure>

### How to create operating hours and time slots

To configure the general opening hours or create additional time slots, follow this guide: [Define the Operating Hours](/manage-your-workspace/define-the-operating-hours.md)

Once your operating hours and time slots are set, come back to Design Studio and select **General** or a **Selected time slot** in the action configuration.

### What to do on the red endpoint (offline)

When the **red endpoint** is triggered, it means the current time is **outside** the selected operating hours.

Common offline paths include:

* Ask for **email** and/or **phone number** so you can contact the user later
* Ask the user to **leave a message** describing the issue or request
* Provide an alternative self-service option (FAQ, knowledge base) and offer follow-up

In this tutorial example, we inform the user that the **Sales team** is currently outside operating hours, and we ask them to **leave a message**. The message can then be handled by the team when they are back online.

<figure><img src="/files/dA9ZIDAE7y0eoDB8rMZO" alt=""><figcaption></figcaption></figure>

Hope this helps.

If you need further assistance, do not hesitate to contact us at <support@tiledesk.com>. You can also visit our website for more AI Agent use cases: [www.tiledesk.com](https://www.tiledesk.com/).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guide.tiledesk.com/ai-chatbots-and-automation/actions-explained/if-operating-hours.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
