> To build a Wix site agentically, or add Wix features like bookings or a store to a site you already have, follow https://www.wix.com/headless/skill.md
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Sample Flows

## Article: Sample Flows

## Article Link: https://dev.wix.com/docs/api-reference/business-management/ai-site-chat/assistant-inbox-channels-settings-v1/sample-flows.md

## Article Content:

# Assistant Inbox Channels Settings: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.

The examples use WhatsApp. To manage Instagram, use `instagram` in place of `whatsapp` in requests, and read `operatingModes.instagram` in responses.

## Check whether the AI assistant is responding on a channel

A business owner wants to know if the AI assistant is answering customers on WhatsApp, and why not if it isn't.

To check the AI assistant's status on a channel:

1. Call [Get Assistant Inbox Channels Settings](https://dev.wix.com/docs/api-reference/business-management/ai-site-chat/assistant-inbox-channels-settings-v1/get-assistant-inbox-channels-settings.md).
1. Show the business owner the value of `operatingModes.whatsapp` from the response. `ACTIVE` means the AI assistant is responding. Any other value gives the reason it isn't: `CHANNEL_NOT_CONNECTED` means the WhatsApp account isn't connected to the site, `DISABLED` means the AI assistant is turned off for the channel, and `OUTSIDE_ACTIVE_HOURS` means the current time is outside the schedule in `assistantInboxChannelsSettings.whatsapp.activeHours`.

## Turn the AI assistant off for a channel

A business owner wants to handle all WhatsApp conversations manually.

To turn the AI assistant off for a channel:

1. Call [Get Assistant Inbox Channels Settings](https://dev.wix.com/docs/api-reference/business-management/ai-site-chat/assistant-inbox-channels-settings-v1/get-assistant-inbox-channels-settings.md) and save `assistantInboxChannelsSettings.revision`.
1. Call [Update Assistant Inbox Channels Settings](https://dev.wix.com/docs/api-reference/business-management/ai-site-chat/assistant-inbox-channels-settings-v1/update-assistant-inbox-channels-settings.md) with the saved `revision` and `whatsapp.enabled` set to `false`. Other settings, such as the channel's active hours, are left unchanged. From now on, `operatingModes.whatsapp` is `DISABLED`, or `CHANNEL_NOT_CONNECTED` if the WhatsApp account isn't connected.

## Limit the AI assistant to business hours

A business owner wants the AI assistant to answer WhatsApp messages only on weekdays from 9:00 AM to 5:00 PM, and to handle messages manually the rest of the time.

To limit the AI assistant to business hours:

1. Call [Get Assistant Inbox Channels Settings](https://dev.wix.com/docs/api-reference/business-management/ai-site-chat/assistant-inbox-channels-settings-v1/get-assistant-inbox-channels-settings.md) and save `assistantInboxChannelsSettings.revision`.
1. Call [Update Assistant Inbox Channels Settings](https://dev.wix.com/docs/api-reference/business-management/ai-site-chat/assistant-inbox-channels-settings-v1/update-assistant-inbox-channels-settings.md) with the saved `revision`, `whatsapp.enabled` set to `true`, and `whatsapp.activeHours` set to `SCHEDULED` mode with a time zone and a weekly schedule:

    ```json
    {
      "assistantInboxChannelsSettings": {
        "revision": "1",
        "whatsapp": {
          "enabled": true,
          "activeHours": {
            "mode": "SCHEDULED",
            "timeZone": "America/New_York",
            "schedule": [
              {
                "startTime": "09:00",
                "endTime": "17:00",
                "days": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"]
              }
            ]
          }
        }
      }
    }
    ```

    If the WhatsApp account is connected, `operatingModes.whatsapp` is now `ACTIVE` during the scheduled hours and `OUTSIDE_ACTIVE_HOURS` the rest of the time.

Keep these rules in mind when you build a schedule:

- Always specify `timeZone` and `schedule` together. The request fails if you specify only one of them. To change the schedule later, pass both again.
- In `SCHEDULED` mode, the AI assistant responds only during the frames in `schedule`. If the schedule is empty, it never responds.
- `timeZone` must be a standard [IANA time zone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), such as `"America/New_York"`. Fixed offsets like `"+02:00"` and `"UTC"` also work, but abbreviations like `"EST"` don't.
- `startTime` is inclusive, `endTime` is exclusive, and `endTime` must be later than `startTime`.
- To end a frame at midnight, set `endTime` to `"00:00"`. `"24:00"` isn't valid.
- Frames can't overlap on a shared day. To cover hours that span midnight, use one frame ending at `"00:00"` and another starting at `"00:00"` on the next day.