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

# Temporary closures

> Close your agent early or play a closure message for same-day schedule changes.

Handle same-day schedule changes like closing early, holidays, or emergency closures. Choose the approach that matches your agent's current setup.

## Quick reference

| I need to... | Best approach | Time estimate |
| - | - | - |
| Play a closure message (no routing change) | [Managed Topic](#option-1-managed-topic) | 5 min |
| Toggle after-hours mode on/off | [Configuration Builder](#option-2-configuration-builder) | 2 min |
| Redirect calls to a different number | [Call handoff](#option-3-update-call-handoff-routing) | 10 min |

## Option 1: Managed Topic

**Best for:** Playing a closure message without changing call routing. No developer setup required.

**1. Create or update a topic**

Go to **Knowledge > FAQs**. Create a new topic or find an existing one related to hours or closures.

* **Name:** `Temporary closure`
* **Sample questions:** "Are you open?", "What are your hours?", "Can I speak to someone?"
* **Content:** "We're currently closed and will reopen at our normal time tomorrow. Please call back then."
* **Actions:** Leave empty (info only) or add a handoff if you want to transfer the caller.

**2. Activate the topic**

Make sure the topic is active in your Branch. If you have an existing opening hours topic, consider deactivating it temporarily so the closure topic takes priority.

**3. Test in Sandbox**

Use **Agent Chat** in Sandbox to confirm the agent responds with your closure message.

**4. Publish**

Publish your changes to **Live**.

**5. Revert when done**

Deactivate the closure topic and reactivate your normal hours topic. Publish again.

> [!NOTE]
>
> This approach changes what the agent **says**, but does not change call routing. The agent will still answer calls and have a conversation. If you need to hang up or transfer after the message, use one of the other options below.

## Option 2: Configuration Builder

**Best for:** Toggling after-hours mode on and off instantly. Requires a developer to set up the schema first (one-time setup).

> [!NOTE]
>
> If your agent already has after-hours fields in the Configuration Builder, skip to [step 2](#flip-the-toggle).

### One-time setup (developer required)

A developer needs to add an after-hours toggle to the Configuration Builder schema and wire it into the agent's code. See [Configuration Builder](https://docs.poly.ai/real-time-config/introduction.md) for the full guide.

Example schema fields:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "after_hours_enabled": {
    "type": "boolean",
    "title": "After hours mode",
    "description": "Enable to play the after-hours message and skip normal conversation"
  },
  "after_hours_message": {
    "type": "string",
    "title": "After hours message",
    "description": "Message to play when after-hours mode is on"
  }
}
```

Example function code:

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
config = conv.real_time_config
if config.get("after_hours_enabled"):
    message = config.get("after_hours_message", "We're currently closed.")
    conv.call_handoff(
        destination="after_hours",
        utterance=message
    )
    return
```

### Flip the toggle

**1. Open Configuration Builder**

Go to **Real-time config > Data** tab.

**2. Select the Live environment**

Switch to the **Live** tab. Changes here take effect immediately. No publish is needed.

**3. Enable after-hours mode**

Toggle **After hours mode** on and enter your closure message (e.g., "We're closing early today. Please call back tomorrow.").

**4. Save**

Click **Save**. The change is live immediately.

**5. Revert when done**

Toggle **After hours mode** off and save. Normal behavior resumes instantly.

> [!WARNING]
>
> Configuration Builder changes in Live affect all active calls instantly. Double-check your values before saving.

## Option 3: Update call handoff routing

**Best for:** Redirecting all calls to a different number or voicemail during the closure.

**1. Open Call handoffs**

Go to **Integrations** > **Telephony** and click **Handoffs**.

**2. Edit the after-hours destination**

Find the handoff destination used for after-hours or the default handoff. Update the **Route** to point to the closure number or voicemail.

**3. Test in Sandbox**

Make an in-app call in Sandbox and trigger a transfer to check it routes correctly. To test from a real phone, move your Branch to **Staging** and call the Staging number.

**4. Publish**

Publish to Live.

**5. Revert when done**

Change the route back to the original number. Publish again.

For detailed steps, see [Routing and handoffs](https://docs.poly.ai/learn/maintain/routing-handoffs.md).

## Which option should I use?

| Situation | Recommended option |
| - | - |
| Quick same-day closure, no developer available | [Managed Topic](#option-1-managed-topic) |
| Recurring closures (holidays, early Fridays) | [Configuration Builder](#option-2-configuration-builder) |
| Need to redirect calls to another team | [Call handoff](#option-3-update-call-handoff-routing) |
| Need the agent to hang up after the message | [Configuration Builder](#option-2-configuration-builder) (with `conv.call_handoff()` in code) |

## Related pages

* [FAQs](https://docs.poly.ai/knowledge/faqs/introduction.md) - Create and manage agent knowledge
* [Configuration Builder](https://docs.poly.ai/real-time-config/introduction.md) - Real-time configuration without publishing
* [Routing and handoffs](https://docs.poly.ai/learn/maintain/routing-handoffs.md) - Update handoff destinations
* [Environments](https://docs.poly.ai/environments-and-versions/introduction.md) - Publish changes
