Data communication between the babelforce and Zendesk AI Agent

Katrin Geske
Katrin Geske
  • Updated

The babelforce AI Agent can both send an receive data from the underlying chatbot it connects to.

High level use cases examples:

 

  • User is asked for a customer id in babelforce IVR
  • Customer reaches AI Agent in babelforce - customer id as well as the call's session id is forwarded to Zendesk AI Agent
  • Customer is asked about call reason and further details in the AI Agent
  • An escalation event is reached and Zendesk AI prints forwards information to babelforce call session
  • With the escalation event, an exit trigger takes the call to the next part in the IVR, the ACD

In this article, we explain how to send data items to the chatbot engine (Zendesk AI). On the other end, we will use the example of a Zendesk AI Agent to explain how data can be send back to babelforce. See the example use case above to contextualize the setup.

Ensure you have a working setup for the AI Agent, find details about the Zendesk AI integration in this article.

Sending data from babelforce to chat bot provider

  • Open your babelforce AI Agent
  • Scroll to the end, you find the session "Request Body"
  • In this section, you can add any key value pairs
    • whenever you want to later send back data to babelforce, you should send the Session id {session.id}
    • in our example, we also pass on the response of an Input Reader response

  • To check the data in Zendesk AI, log into your Zendesk system and find the conversation logs
  • Click on "Details"
  • Open "Session data" - there you will find the details sent by babelforce
  • You can now use the variables "sessionId" and "customerId" in your chatbot

Sending data from Zendesk AI to back to babelforce 

In this section, we will explain how to setup a PUT request, sending sessions from Zendesk to babelforce.

  • In your Zendesk AI Agent, find the API integration section
  • We will now create a new API integration that will set a session in babelforce:
    • Add integration and give it a relevant name
    • Create a new environment and fill it with the following details:
      • Method type = PUT
      • URL = https://{{env}}.babelforce.com/api/v2/sessions/{{sessionId}} - {{env}} needs to be replaced with the relevant environment your babelforce account is hosted on - ask Success if you need support
      • Next, add a Header to complete the authorization
        • Setup the Header as follows: 
          • Key = Authorization
          • Value = Bearer xxxx
        • The Bearer needs to be a never expiring token - use the same token you used to setup the CRM (see second screenshot below
          • Take the bearer token from the CRM integration

        • Finally, setup the Body which defines the session data you send to babelforce
          • {
              "ivr.myVar":"{{keyInChatBot}}",
              "ivr.myVar2": "{{someKey}}"
            }
          • Above you see an example how the data is structured
          • Ensure to setup variables that are used in your Zendesk AI Agent and that are set in the flow
    • If successful, the data will now be saved on the call session. 
    • You can check the content of the session via API, also see: https://apps.latest.dev.babelforce.com/developer-hub/manager/#/Manager/getSessionVariables 

Exit trigger in the babelforce AI Agent

To end the AI Agent interaction, you have to define an exit condition. To achieve this, find the tab "Exit condition" in the AI agent:


Next, create a trigger that checks the content of the relevant session. In our example, we use the session ivr.escalation. If this session is given, the trigger fires and the call therefore goes into the afterflow:


 

Was this article helpful?

/

Comments

0 comments

Please sign in to leave a comment.