> ## Documentation Index
> Fetch the complete documentation index at: https://docs.callkaro.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Chat Routing

> Every setting in the panel, in the order you meet it

Seven settings decide what happens around your flow — when you are open, who a
handoff reaches, what a visitor is told when nobody does, and what closes a
conversation.

They are set **once for the whole account**, not per agent and not per widget.
Changing any of them takes effect immediately; nothing needs republishing.

<Card title="Open Chat routing" icon="sliders" href="https://callkaro.ai/dashboard/settings">
  Settings → Chat routing. The same panel is on the
  [Widgets](https://callkaro.ai/dashboard/widgets) page.
</Card>

***

## 1. Business Hours

When your team answers.

|                               |                                                               |
| ----------------------------- | ------------------------------------------------------------- |
| **On / off**                  | Off means handoffs are accepted at any hour                   |
| **Timezone**                  | An IANA zone, e.g. `Asia/Kolkata`                             |
| **Each weekday**              | One window, in 15-minute steps. A day switched off is closed. |
| **Said while you are closed** | What a visitor asking for a person is told                    |

<Warning>
  **Only handoffs are gated.** The flow itself replies at all hours, and a chat
  already with a person is never cut off at closing time. Business hours are not
  an "our bot is asleep" switch.
</Warning>

Switching this on with no days set would mean closed all week and every handoff
refused — a setting that looks enabled and behaves like a blocked queue — so
Monday to Friday, 09:00–18:00 is seeded for you.

<Note>
  **Holidays** are honoured by the runtime, overriding that weekday's hours, but
  there is no control for them in the dashboard yet.
</Note>

***

## 2. When Nobody Is Available

A visitor asks for a person and nobody is marked as taking chats. Rather than
leave them in a queue no one is reading, your ticket code runs, they are told,
and the conversation closes.

|                              |                                                                               |
| ---------------------------- | ----------------------------------------------------------------------------- |
| **What the visitor is told** | The away message. Can quote anything your code returns, e.g. `{{ticket_id}}`. |

***

## 3. If Nobody Replies

A chat **was** picked up and then nothing happened.

|                              |                                 |
| ---------------------------- | ------------------------------- |
| **Minutes**                  | 0–1440. **0 switches it off.**  |
| **What the visitor is told** | Shown only when the timer is on |

Counted from the **visitor's last unanswered message**, so a chat being answered
normally never trips it. When it fires: a ticket is raised, the visitor is told,
and the chat closes.

<Note>
  With this off, an assigned conversation stays open until somebody ends it. There
  is no other timer — see
  [Human handoff](/widget/chat/human-handoff#ending-it).
</Note>

***

## 4. When A Chat Ends

Sent when a teammate ends the chat.

<Warning>
  If the flow's **Handoff to a person** card has its exit wired, **that card runs
  instead** and this message is not used. The flow author has already said what
  happens next, and two closing messages is one too many.
</Warning>

So this is the wording for handoffs that hand back to nothing — which is the
common case.

***

## 5. Show Your Hours In The Widget

A line at the top of the chat. You choose **when it appears**; the times come
from section 1.

| Mode                         | Behaviour                                      |
| ---------------------------- | ---------------------------------------------- |
| **Only when you are closed** | The default                                    |
| **Always**                   | Shown whether you are open or not              |
| **Never**                    | Nothing is ever shown, even while you are shut |

Leave the text empty for the widget's own wording, which already reads correctly
either way. Write your own and `{{hours}}` becomes *10:00 AM - 7:00 PM* and
`{{day}}` becomes *today*, *tomorrow* or a weekday name.

Full detail, including why the day label exists, in
[Appearance and hours](/widget/chat/appearance#telling-the-visitor).

<Note>
  With business hours switched off nothing is shown, whatever the mode — there are
  no hours to state.
</Note>

***

## 6. Note Above "Start A New Conversation"

One optional line on the home screen. Empty by default, and empty renders
nothing.

Deliberately separate from the hours notice: an account with no business hours
may still want to say something there, and an account showing its hours may not.

***

## 7. Raise A Ticket

The Python that creates the ticket, run in all three cases above. It gets a
`reason` of `away`, `closed` or `unanswered`, so one function can write a
sensible ticket for each.

Contract, worked examples, and what happens when it fails:
[Raise a ticket](/widget/chat/ticket-fallback).

***

## Which Message Is Used

The three ticket messages map to the three reasons. Any one left empty falls
back to the away message.

| Situation                       | `reason`     | Message                                                       |
| ------------------------------- | ------------ | ------------------------------------------------------------- |
| Nobody marked as taking chats   | `away`       | When nobody is available                                      |
| Asked for a person while closed | `closed`     | Said while you are closed                                     |
| Assigned, then no reply in time | `unanswered` | If nobody replies                                             |
| A teammate ended the chat       | —            | When a chat ends, **unless** the handoff card's exit is wired |

<Warning>
  If your ticket code fails, a message that **quotes a ticket placeholder** is
  replaced with a generic sentence — promising a reference that does not exist
  reads as *"ticket  is open"*. A message that does not quote one is used as you
  wrote it. Either way a **ticket failed** event appears on the timeline in
  Contacts.
</Warning>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Raise a ticket" icon="ticket" href="/widget/chat/ticket-fallback">
    The code, and what it receives
  </Card>

  <Card title="Human handoff" icon="user-headset" href="/widget/chat/human-handoff">
    Availability, assignment, ending
  </Card>
</CardGroup>
