---
updatedAt: 2026-02-25T13:00:19.000Z
---

# Is chat available?

Returns the current chat availability for an organization.

If your organization has [Business Schedules or Holidays](https://support.kustomer.com/business-schedules-SJj3ZxD1E) enabled, the Boolean passed in the callback for `Kustomer.isChatAvailable()` callback will return the following: 1) the availability based on those dates and times, and 2) the initialization state of the SDK.

This callback will return `false` if you have chat completely turned off and the SDK has loaded settings at least once.

This callback tells you if the SDK is ready to present a chat interface. If the SDK hasn’t been initialized (that is, the SDK doesn’t have settings information loaded or cached), `Kustomer.isChatAvailable()` will return `false`. If you have chat set to [appear available outside of business hours](https://kustomer.kustomer.help/chat-settings-B1sdKbtz7#business-hours-availability), `Kustomer.isChatAvailable()` will return `true`.

[block:code]
{
  "codes": [
    {
      "code": "let provider = ChatProvider.shared\n\nlet available: Bool? = provider.isChatAvailable()\n\nif available == nil {\n  print(\"Unknown\")\n} else {\n  print(\"Is chat available? \\(available)\")\n}",
      "language": "swift",
      "name": "Swift: is Chat available? "
    },
    {
      "code": "// This is the deprecated version. Please see the changlog entry for v2.0.7 more information.\n\nlet provider = ChatProvider.shared\n\nprovider.isChatAvailable({ available in\n  print(\"Is chat available? \\(available)\")\n})",
      "language": "swift",
      "name": "Deprecated version for iOS Chat SDK v2.0.6 and earlier"
    }
  ]
}
[/block]

## When `isChatAvailable` is `nil`

If `isChatAvailable()` is `nil`, this means either that 1) the local settings cache is empty or expired, or 2) that an internet connection has never been available when the SDK tried to refresh settings.

**Common scenarios for when `isChatAvailable` is `nil`**

Here are some common scenarios for when `isChatAvailable` is set to `nil`:

1. The user accesses chat during your set business hours
2. The user opens Kustomer Chat with a working internet connection
3. The user force quits your app
4. The user turns on Airplane Mode on their device
5. The user opens your app
6. `isChatAvailable()` is returning `true`

[block:callout]
{
  "type": "success",
  "title": "Automated cache management for chat settings",
  "body": "The Kustomer Chat SDK automatically manages the cache for chat settings.\n\nWith this in mind, do not add calls to `reloadChatSettings` when your app opens, or when internet connectivity changes. \n\nThe Chat SDK does reloads chat settings automatically as needed to show the chat interface."
}
[/block]

\*\*How to query Kustomer servers for the value of `nil`
If `isChatAvailable()` is `nil`, and you need to know the value, you can use `reloadChatSettings` to query Kustomer's servers.

[block:code]
{
  "codes": [
    {
      "code": "let provider = ChatProvider.shared\n\nlet available: Bool? = provider.isChatAvailable()\n\nif available == nil {\n  tryToFetchSettings()\n} else {\n  print(\"Is chat available? \\(available)\")\n}\n\nfunc tryToFetchSettings() {\n  ChatProvider.shared.reloadChatSettings({ error in\n    if error == nil {\n      print(\"Chat settings fetched from servers\")\n    } else {\n      print(\"Could not reload chat settings because \\(error)\")\n    }\n  })\n}",
      "language": "swift",
      "name": "Swift code example to request the value of `isChatAvailable`"
    }
  ]
}
[/block]