Collecting SunCo user information for AI Agents powered by Ultimate

Collecting SunCo user information for AI Agents powered by Ultimate

Zendesk has a multi-layered messaging system integrating AI bots, APIs, and Sunshine Conversations. This article explores setting up Ultimate Bot for personalized interactions, accessing user data like WhatsApp numbers, and leveraging APIs to enhance conversational workflows.

Over these last few years Zendesk has seen a lot of changes in their approach to conversations, bots and messaging channels. They've grown from basic chat with Answer Bot towards a powerful, but complex, system of API layers covering Zendesk Messaging, Sunshine Conversations – and now – Ultimate.

A History of Zendesk chat and messaging channels
Over the years, Zendesk evolved from simple email ticketing to offering a full suite of customer care solutions. They now support multiple channels, AI agents, social integrations, and web widgets. This article will dive into how their complex platform works, helping navigate conversational setups.

If you follow the documentation and guidelines it's fairly easy to get your AI Agent, powered by Ultimate (Ultimate Bot in short) connected to your Zendesk instance and make sure that any information your customer entered in the chat becomes visible to your agents upon escalation.

But sometimes you want to do more complex setups that require you to dive into the Ultimate conversation data, or worse, into the Sunshine Conversation API. It's in those scenarios it becomes clear how many layers of integrations there's actually running in between your customer and your agents.

One of these scenarios came up recently: a customer of mine wanted to lookup information about their end-user contacting them via the Ultimate Bot. The user contacted them over WhatsApp and they wanted to automatically lookup information about the user in their CRM based on the WhatsApp number, to then great the user with their name and have context like recent orders available to the bot to display to the user. Since personalized interactions are imported to give good service, this seemed like a logical thing to implement.

SweetHawk apps for Zendesk
Apps that power Employee Experience in Zendesk® & much more!

My thanks to SweetHawk for sponsoring this month's Internal Note newsletter.

Where is the phone number stored?

Sunshine Conversation User Object

All user information for conversations that happen via Ultimate or Messaging are stored in Sunshine Conversations and are accessible as metadata on the user object. Sunshine Conversations (SunCo) is the underlying layer that routes conversations between users, bots and agents, and stores user and conversation information for those elements to interact with.

"user": {
  "signedUpAt": "2023-07-19T06:04:06.199Z",
  "hasPaymentInfo": false,
  "identities": [],
  "toBeRetained": true,
  "id": "372b66ef40d51a45bad4a0b8",
  "profile": {
    "surname": "Verschoren",
    "givenName": "Thomas",
    "locale": "en-GB",
    "localeOrigin": "apiRequest"
  }
}

https://api.smooch.io/v2/apps/{{app_id}}/users/{{user_id}}

This data is accessible in Ultimate via actions. They allow you to grab information from the SunCo objects and store them as variables usable in conversations, conditional flows or API calls.

My first idea of grabbing the phone number was basic: create an action in Ultimate that gets the SunCo user object, grab the phone number and store it as a variable.

Sadly, no such data is available on the user level in SunCo metadata. But since the phone number does show up for agents in Zendesk upon escalation it has to be available somewhere in the SunCo data.