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

# After Hours Bot

> Learn how to create and publish a separate Voice AI agent for after hours calls

With the After Hours Bot feature, you can create a completely separate Voice AI agent to handle inbound calls outside of your business hours. This allows you to provide different experiences for callers depending on when they call.

### How It Works

You can publish up to two Voice AI agents per workspace:

* **Business Hours Bot**: Handles calls during your published workspace business hours
* **After Hours Bot**: Handles calls outside of your business hours

When a call comes in, Hatch automatically routes it to the appropriate bot based on the current time and your workspace's business hours settings.

### Setting Up an After Hours Bot

#### Step 1: Create a New Voice AI Agent

1. Navigate to the Hatch AI Agent playground
2. Create a new Voice AI agent (or duplicate an existing one)
3. Configure the agent with instructions appropriate for after-hours scenarios

#### Step 2: Enable After Hours Mode

1. In your bot's configuration, locate the **After Hours Agent** toggle in the Set Trigger panel
2. Enable the toggle to mark this agent as an after-hours bot
3. Click the settings gear icon to configure business hours

<Frame>
  <img src="https://mintcdn.com/usehatchapp/mTTE-g6K7Eg8nU5b/images/getting-started/hatch-assistant/voice-ai-after-hours-toggle.png?fit=max&auto=format&n=mTTE-g6K7Eg8nU5b&q=85&s=885250c2d6518d3dd12af820ee4b043d" alt="After Hours Agent toggle in the Set Trigger panel" width="1006" height="982" data-path="images/getting-started/hatch-assistant/voice-ai-after-hours-toggle.png" />
</Frame>

<Warning>
  You cannot change the after-hours setting on a published agent. If you need to change it, you must unpublish the agent first.
</Warning>

#### Step 3: Configure Business Hours

Your after-hours bot uses your workspace's business hours to determine when to activate. Click the settings gear icon next to the After Hours Agent toggle to open the business hours configuration:

<Frame>
  <img src="https://mintcdn.com/usehatchapp/mTTE-g6K7Eg8nU5b/images/getting-started/hatch-assistant/voice-ai-customize-business-hours.png?fit=max&auto=format&n=mTTE-g6K7Eg8nU5b&q=85&s=dcd799e386214fe6da610de094219b47" alt="Customize Business Hours modal showing daily schedule settings" width="1254" height="1322" data-path="images/getting-started/hatch-assistant/voice-ai-customize-business-hours.png" />
</Frame>

1. Toggle each day to **Open** or closed
2. Set the start and end times for each day
3. Use the **+** button to add multiple time ranges per day (e.g., for lunch breaks)
4. Click **Save** to apply your changes

<Note>
  Modifying the business hours here modifies them for the entire workspace. This can impact other features such as SMS campaign automations.
</Note>

The after-hours bot will handle all calls that come in outside of these configured hours.

### Publishing Requirements

There are specific requirements for publishing after-hours bots:

<Info>
  **You must publish a Business Hours bot before you can publish an After Hours bot.** This ensures that calls during business hours are always handled appropriately.
</Info>

| Scenario                                         | Allowed? |
| ------------------------------------------------ | -------- |
| Publish only a Business Hours bot                | Yes      |
| Publish only an After Hours bot                  | No       |
| Publish both Business Hours and After Hours bots | Yes      |

When you publish an after-hours bot, the system verifies that a business hours bot is already published for that workspace. If not, you'll see an error message asking you to publish a business hours bot first.

### Unpublishing Behavior

When you unpublish your **Business Hours bot**, your **After Hours bot will automatically be unpublished** as well. This cascade behavior ensures that your workspace always has proper coverage during business hours.

<Warning>
  If you unpublish your business hours bot, be aware that your after hours bot will also be unpublished. You'll need to republish both if you want to restore after-hours coverage.
</Warning>

### Call Routing Logic

Here's how Hatch determines which bot handles an incoming call:

1. **During business hours**: The Business Hours bot handles the call
2. **Outside business hours**: The After Hours bot handles the call (if published)
3. **Outside business hours with no After Hours bot**: The Business Hours bot handles the call as a fallback
4. **No business hours configured**: The Business Hours bot always handles calls

This fallback behavior ensures that calls are never dropped, even if you haven't set up an after-hours bot.

### Best Practices

#### When to Use an After Hours Bot

Consider creating a separate after-hours bot when you want to:

* Provide different booking options (e.g., next-day appointments only)
* Set different expectations for response times
* Offer emergency-only services after hours
* Use a different tone or persona for evening/weekend callers
* Route calls differently (e.g., only transfer emergencies)

#### Configuring Your After Hours Bot

When setting up your after-hours bot, consider these tips:

1. **Set clear expectations**: Let callers know they're reaching you after hours and when they can expect a callback
2. **Handle emergencies**: Configure transfer rules for urgent situations that need immediate attention
3. **Simplify options**: After-hours callers may prefer faster, simpler interactions
4. **Adjust scheduling**: If your bot books appointments, consider limiting available slots to business hours

### Frequently Asked Questions

<AccordionGroup>
  <Accordion title="Can I have different after-hours bots for different days?">
    No, you can only have one after-hours bot per workspace. However, you can configure your business hours to have different hours for different days of the week, and the after-hours bot will activate accordingly.
  </Accordion>

  <Accordion title="What happens if I only want an after-hours bot?">
    You cannot publish only an after-hours bot. A business hours bot must be published first. If you want all calls to go to the same bot regardless of time, simply use a business hours bot without enabling an after-hours bot.
  </Accordion>

  <Accordion title="Can I test my after-hours bot before publishing?">
    Yes! You can test your after-hours bot in the playground just like any other bot. The playground allows you to simulate conversations regardless of the current time.
  </Accordion>

  <Accordion title="How do I know which bot handled a call?">
    The contact card and call records will show which bot handled the conversation. You can also see this information in your reporting dashboard.
  </Accordion>

  <Accordion title="What if I haven't configured business hours for my workspace?">
    If no business hours are configured, the system defaults to using your business hours bot for all calls. The after-hours bot will never activate until you configure business hours.
  </Accordion>
</AccordionGroup>
