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

# Hand off to live Zendesk agents with Sunshine Conversations

> Connect Sunshine Conversations so your AI agent can hand customers to a live human agent in Zendesk

The Chatbase Sunshine integration connects your AI agent to Zendesk's Sunshine Conversations, so a customer chatting in the Chatbase widget can be handed to a live human agent in Zendesk. Your Zendesk agent works the chat from Zendesk, and their replies appear in the same Chatbase widget the customer is already using. Use it when customers chat on the Chat Bubble, Center Stage, or Help Page and you want a live Zendesk agent to take over there.

> [card] What you can do:
>
> Let the AI handle routine questions, and hand the customer to a live Zendesk agent in real time when the issue needs a person.

## Before you start

* A Chatbase account with an AI agent.
* A Zendesk account on a **Professional** Suite plan or above.
* The [Zendesk](https://chatbase.co/docs/user-guides/integrations/zendesk.md) ticketing integration connected on the same AI agent. Until it is, the **Sunshine** Connect button is disabled and shows **Connect Zendesk first** when you hover over it. Chatbase uses that connection to set up Sunshine in your Zendesk account.
* [Zendesk Messaging](https://chatbase.co/docs/user-guides/integrations/zendesk-messaging.md) not connected on this AI agent. An AI agent can use Sunshine or Zendesk Messaging, not both.
* A workspace that isn't HIPAA-compliant. Sunshine isn't available on HIPAA-compliant accounts.

## How Sunshine differs from Zendesk Messaging

| | Sunshine | Zendesk Messaging |
| - | - | - |
| Where customers chat | Chatbase's own widget: Chat Bubble, Center Stage, or Help Page | Your Zendesk messaging channels, like the Zendesk Web Widget, mobile SDKs, or WhatsApp |
| Where agent replies appear | In the Chatbase widget | In the Zendesk channel |
| Needs the Zendesk ticketing integration | Yes | No |
| HIPAA-compliant accounts | Not available | Available, if you have your own BAA with Zendesk ([HIPAA compliance](https://chatbase.co/docs/user-guides/workspace/hipaa-compliance.md)) |

## How to connect Sunshine

**1. Create an API key in Zendesk**

1. Sign in to your Zendesk account as an Admin and navigate to the **Admin Center**.
2. Navigate to **Apps and integrations > APIs > Conversations API**.
3. Click **Create API Key**, enter **Chatbase** as the name, and press **Next**.
4. Copy the **App ID**, **Key ID**, and **Secret key** displayed.

![Creating a Conversations API key in the Zendesk Admin Center](https://mintcdn.com/chatbase/kU-6NVMb2BBkym9H/user-guides/integrations/images/sunshine/sunshine-1.jpg?fit=max\&auto=format\&n=kU-6NVMb2BBkym9H\&q=85\&s=23d64598b1daa762945071e82b1e3b63)

**2. Set up the Sunshine integration in Chatbase**

1. Navigate to your Chatbase [dashboard](https://www.chatbase.co/dashboard/).
2. Click the AI agent you wish to enable live chat for.
3. Navigate to **Integrations**. Make sure **Zendesk** is connected before you attempt to connect **Sunshine**.
4. Enter the copied **App ID**, **Key ID**, and **Secret key**, then press **Submit**.

If any of the three values is wrong, Chatbase shows "Incorrect credentials, please check your credentials and try again". Copy them again from Zendesk and resubmit.

**3. Enable multi-conversations in Zendesk**

Every handoff creates a new Zendesk messaging conversation for the customer, and Zendesk only allows that when multi-conversations is on. Without it, handoffs fail with: "Zendesk account does not have multi-conversations enabled (Admin Center > Messaging and social > Messaging > Manage settings)".

1. Sign in to your Zendesk account as an Admin and navigate to the **Admin Center**.
2. Click **Channels** in the sidebar, then select **Messaging and social > Messaging**.
3. At the top of the page, click **Manage settings**.
4. Under Web Widget and Mobile SDKs, expand **Multi-conversations**.
5. Click **Set up multi-conversations**.
6. Click **Turn on multi-conversations for your account**, select the channels you want to offer multi-conversations on, then click **Save**.

For more detail, see Zendesk's [Understanding multi-conversations for messaging](https://support.zendesk.com/hc/en-us/articles/8195486407706-Understanding-multi-conversations-for-messaging).

**4. Enable end messaging sessions in Zendesk**

This lets your human Zendesk agents close the messaging conversation when the issue is resolved. When they do, a Zendesk trigger named **Chatbase Sunshine Conversation Ended**, which Chatbase creates for you, tells Chatbase to end the conversation there too.

1. Sign in to your Zendesk account as an Admin and navigate to the **Admin Center**.
2. Click **Channels** in the sidebar, then select **Messaging and social > Messaging**.
3. At the top of the page, click **Manage settings**.
4. Under Advanced, expand **Ending sessions**.
5. Select **Agents can end messaging sessions at any time**.
6. Click **Save settings**.

For more detail, see Zendesk's [About ending messaging sessions](https://support.zendesk.com/hc/en-us/articles/8009788438042-About-ending-messaging-sessions).

**5. Enable the Live Chat Action**

This Action lets all customers, both [identified](https://chatbase.co/docs/developer-guides/website-integration/identity-verification.md) and unidentified, start a live chat from the Chat Bubble, Center Stage, or Help Page.

1. Navigate to your Chatbase [dashboard](https://www.chatbase.co/dashboard/).
2. Choose the AI agent you integrated with Sunshine Conversations.
3. Navigate to **Build > Actions**.
4. Click **Create Action**, then select **Sunshine live chat**.
5. Customize the **When to use** field, click **Continue**, then click **Enable**.

Under **Collect from user**, you can check **Name** and **Email**. Checked details are required before transferring, so your agents see who the customer is in Zendesk.

> [!TIP]
>
> Test the integration by asking your AI agent to speak to a human, and confirm the conversation reaches a live agent in Zendesk.

## What happens during a handoff

1. The AI agent decides the customer needs a person, based on the Action's **When to use**, and collects any details checked under **Collect from user**.
2. Chatbase opens a new Zendesk messaging conversation as the customer. Its first message contains a title, the link to the Chatbase conversation, and either a summary or the full conversation, depending on the Action's conversation content setting.
3. Your Zendesk agent replies from Zendesk. Each reply appears in the customer's Chatbase widget with the agent's name and avatar.
4. When your agent closes the conversation in Zendesk, the **Chatbase Sunshine Conversation Ended** trigger ends the conversation in Chatbase.

### What your Zendesk agent receives

* A **title** for the chat.
* The line "conversation link in Chatbase:" followed by the link to the Chatbase conversation.
* **Summary:** followed by an AI-written summary, or **Full conversation:** followed by the transcript and the customer's attachments, when the Action is set to send the full conversation.
* The customer's **name** and **email**, on the customer's profile in Zendesk.

If a [conversation link field](https://chatbase.co/docs/user-guides/integrations/zendesk.md#conversation-link-on-tickets) is set on the Zendesk integration, Chatbase also writes the conversation link into that field.

### Example handoff

A customer on your Help Page writes:

> **Customer:** My account is locked and the reset email never arrives. I need to talk to someone.
>
> **AI agent:** I can connect you with our support team. What's your name and email?
>
> **Customer:** Sam Lee, [sam@example.com](mailto:sam@example.com)

A new conversation opens in Zendesk with a title like "Locked account, reset email not received", the conversation link, and a summary. Your agent replies "Hi Sam, I've unlocked your account." and that message appears in the Help Page chat with the agent's name and avatar. When the agent closes the conversation in Zendesk, the chat ends in Chatbase.

## Limitations

* **Sunshine requires Zendesk.** The Zendesk integration must be connected in Chatbase first.
* **Sunshine and Zendesk Messaging can't share an AI agent.** Disconnect one before connecting the other.
* **Not available on HIPAA-compliant accounts.**
* **A Professional Suite plan or above is required** on your Zendesk account.
* **The live chat Action runs on the Chatbase widget only.** It is compatible with the **Chat Bubble**, **Center Stage**, and **Help Page** channels only. Every other channel is incompatible and can't be selected. See [Channels](https://chatbase.co/docs/user-guides/chatbot/actions/actions-overview.md#channels) for what configured, unconfigured, and incompatible mean.

## Troubleshooting

> [accordion] The Connect button is disabled and shows Connect Zendesk first
>
> Connect the [Zendesk](https://chatbase.co/docs/user-guides/integrations/zendesk.md) ticketing integration on the same AI agent's **Integrations** page, then connect Sunshine.

> [accordion] Connecting shows Incorrect credentials
>
> "Incorrect credentials, please check your credentials and try again" means the **App ID**, **Key ID**, or **Secret key** is wrong. Copy all three from **Apps and integrations > APIs > Conversations API** in Zendesk Admin Center and submit again. If you lost the secret key, create a new API key.

> [accordion] Connecting says Zendesk Messaging is already connected
>
> "This chatbot already has a Zendesk Messaging integration connected. Disconnect it first before connecting Zendesk Sunshine." Disconnect [Zendesk Messaging](https://chatbase.co/docs/user-guides/integrations/zendesk-messaging.md) on the **Integrations** page, then connect Sunshine.

> [accordion] Handoffs fail with a multi-conversations error
>
> Turn on multi-conversations in Zendesk under **Admin Center > Messaging and social > Messaging > Manage settings**. Every handoff opens a new conversation, which Zendesk only allows with multi-conversations on.

> [accordion] The chat doesn't end in Chatbase when my agent finishes
>
> The conversation ends in Chatbase only when your agent closes the messaging conversation in Zendesk. Check that **Agents can end messaging sessions at any time** is selected under **Ending sessions**, and that the **Chatbase Sunshine Conversation Ended** trigger is still active in Zendesk.

> [accordion] The Sunshine card is unavailable on my account
>
> If the card shows "Not available on HIPAA-compliant accounts.", your workspace is HIPAA-compliant and Sunshine can't be connected.

## Frequently asked questions

> [accordion] Do I need the Zendesk integration to use Sunshine?
>
> Yes. Connect the [Zendesk](https://chatbase.co/docs/user-guides/integrations/zendesk.md) ticketing integration first. Chatbase uses it to set up Sunshine in your Zendesk account.

> [accordion] Where does the customer see the Zendesk agent's replies?
>
> In the same Chatbase widget they were already chatting in, with the agent's name and avatar.

> [accordion] Who ends a Sunshine conversation?
>
> Your human Zendesk agent, by closing the messaging conversation in Zendesk. The AI agent doesn't end it.

> [accordion] Can I use Sunshine and Zendesk Messaging on the same AI agent?
>
> No. An AI agent can have one of the two connected. See [How Sunshine differs from Zendesk Messaging](#how-sunshine-differs-from-zendesk-messaging).

> [accordion] Which channels support Sunshine live chat?
>
> The Chat Bubble, Center Stage, and Help Page. It isn't available on WhatsApp, Instagram, Messenger, email, or other channels.

> [accordion] Why do I need multi-conversations in Zendesk?
>
> Each handoff creates a new Zendesk messaging conversation for the customer. Zendesk rejects that unless multi-conversations is turned on, so handoffs fail without it.

## Next steps

> [card] [Escalations Action](https://chatbase.co/docs/user-guides/chatbot/actions/escalate-to-human.md)
>
> Prefer an asynchronous handoff? Open a ticket instead of routing the customer to a live agent.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.