What is the best practice in combining AI Chatbot and Desk?

I’d like to use AI Chatbot and Desk hand in hand.

Initially, I’d like the AI chatbot to show suggested replies for NEW users. When the user clicks a button, I want my app to create a ticket in Desk.

After the ticket is closed, I’d like the channel to be clear and go back to the initial step.

The next time the EXISTING user opens the app, I’d like the AI chatbot to show initial message with a new sets of suggested replies.

So 3 questions.

  1. Does the agent see the conversation of the user and AI inside the created ticket?
  2. How can I delete and create a new channel when the ticket is closed?
  3. Do I need a separate chatbot for NEW and EXISTING users?

What is the best practice in doing this? How can I achieve this?

Hi there.

We have an AI Chat Bot service within Desk. Please give me some time and I will provide details on how it works. The service is super new, so it is taking time to pull the details together. :slight_smile:

Does it have the same functionality as the AI chatbot in Chat SDK? eg. suggested replies, knowledge base, custom response.

Or is it possible to use them both simultaneously?

Hi Jason!

Thank you for the prompt response. I was able to add the AI chatbot I created to Sendbird Desk

However, I think there is a bug in assigning the bot in the Assigment settings. It is saying that the bot does not exist or offline even though I already activated the bot

@ralphordanza Hi there.

I went through the items today and made two video for you.

In the second video there are links to the Desk Widget and also a blog I wrote about a work around to moving from bot to human. Check out the description of video 2.

For your issue…

It is saying that the bot does not exist or offline even though I already activated the bot

I hit that too. If you head over to the Agents menu, you will see your bot in there and you can set it to be online.

1 Like

Hi Jason!

Thank you for the comprehensive guide. Much appreciated :slightly_smiling_face:

@ralphordanza Hi there.

I found better way to transfer between a bot and a human. The end point is /cancel.
Documented as Cancel assignment of a ticket.

Below is the server code I tested.

async function cancelAssignment(channelUrl, groupKey, SENDBIRDDESKAPITOKEN, APP_ID) {
  
  try {
    const ticket = await axios.get(`https://desk-api-${APP_ID}.sendbird.com/platform/v1/tickets?channel_url=${channelUrl}`, {
       headers: { 
         "Content-Type": "application/json; charset=utf8",
         "SENDBIRDDESKAPITOKEN": SENDBIRDDESKAPITOKEN
       }
    })
    const ticketId = ticket.data.results[0].id
    const ticketUpdate = await axios.patch(`https://desk-api-${APP_ID}.sendbird.com/platform/v1/tickets/${ticketId}/cancel`,{
      "group": groupKey}, 
     {
       headers: { 
         "Content-Type": "application/json; charset=utf8",
         "SENDBIRDDESKAPITOKEN": SENDBIRDDESKAPITOKEN
       }
    })
    return { success: true, message: 'Ticket unassigned successfully' };
  } catch (e) {
    console.log(e.response.data)
    return { success: false, message: 'Failed to unassign ticket: ' + JSON.stringify(e.response.data) };
  }
}

I also have some great news. We are working to make it so that /cancel can be called with a channel_url, also. It means that shortly it will be possible to remove the need for a proxy server and just call directly to the Desk API from the Function.

There’s more. I also found that it would be possible to use GTP to route the user to a particular Desk group.

In the below example I prompt the Function to select a particular group id. group_ids can be used in the /cancel call to switch the ticket to a different group.

If you need to the group_id they can be found in the url when editing a Team.

I will keep you informed when we go live with being able to call /cancel with a channel.url directly from the Function call. :slight_smile:

Hi everyone.

It should be noted that a proxy server is no longer needed in order to transfer a Desk AI Chatbot to be removed from a ticket, and the ticket to be added to the human agent queue.

Attached is how to do it.

Human handoff in Sendbird Desk_ V2 (2).pdf (305.5 KB)