Add-on | AI agents - Advanced |
This guide describes how to set up a default responder per channel through an API call on Sunshine Conversations.
Note: This guide uses Postman. If you don't have Postman, you can sign up for an account on the Postman website and download the app.
Import the API template
- Open the postman_collection.json file. The collection is in JSON format and is not very human-readable.
- Select the entire text and copy it.
3. Open Postman and click Import.
4. Paste the contents of the collection file into the "Paste cURL, Raw text or URL" text box.
The Sunshine Conversations API collection appears in the Postman interface.
Select the PATCH API call from the Collections list
- In Postman, from the Sunshine Conversations API collection, select Integration > Update Integration.
- Follow the steps in Get a list of integration IDs from messaging to retrieve a complete list of your integration IDs and the default responder ID for AI agents.
The Default Responder ID is the same for all integrations.
- For the PATCH API call, replace the default endpoint with your App ID from the Zendesk API key (the same one used to connect to AI agents - Advanced) and the Integration ID you want to modify. In this example, we'll target the iOS integration so it can be launched on the web without the app SDK.
- As shown above, click the Authentication tab and select Basic Auth. Enter your Key ID and Secret Key, both of which are from the same API information from Zendesk.
- In the body tab, manually set the integration (iOS) to use the AI agents by using the Default Responder ID from the AI agents (even if its already set.)
Remove all content in the body except for “defaultResponderId” and add the ID obtained from the Integration list API call. Remember to remove any extraneous commas.
- Run the PATCH API call, then follow it with the Integration List GET API call to verify it updated successfully.
After making the change, the iOS channel continues to use AI agents. However, the "inherited" field is now set to false, which indicates it will not automatically switch to AI agents - Advanced when AI agents - Advanced is connected.
- Connect AI agents - Advanced to the ZD production environment. Notice that only the channels marked with “inherited = true” will use it.
- Once the customer decides to transition additional channels to AI agents - Advanced, send the value "null" (without quotes) to the integration ID of the desired channel. This action reverts the channel to its default behavior, alternating between AI agents - Advanced and Zendesk depending on the connection status of AI agents - Advanced.
The list now shows that the iOS channel has reverted to using AI agents - Advanced.
Now whenever you disconnect AI agents - Advanced, all channels marked with an inherited status will revert to the AI agent, and vice versa. Any channels that were manually set to the AI agent will remain on the AI agent regardless.
Warning: Avoid manually setting a channel to AI agents - Advanced with the inherited property set to false. Doing so could prevent disconnection of AI agents - Advanced from Zendesk. Should there be issues with AI agents - Advanced, the default responder will remain on AI agents - Advanced, potentially causing chats to go unanswered.
0 comments