Sending a call reason to Deepsearch and storing the detected intent on the babelforce call session

One of the functionalities of our babelforce task-router (TR) is to send off http requests to third party systems and store the response of that request on a variable. Once the response is stored, we can use it in other, subsequent http requests (within the TR) to other systems or process it further on babelforce side.

This article describes a use case using the TR to send off a call reason for an ongoing call (received via a Speech-to-text module) to Deepsearch, get back the intent from Deepsearch and store this intent on the ongoing babelforce call session. Once the intent was stored on the session, we can use it in a Trigger. This Trigger can then be used in a Switch node for example, enabling us to play different audios to the caller  depending on the call reason for instance. In short, the process looks like this: 

  1. Store call reason on a variable in the speech to text module
  2. Use a local automation with an action to invoke a TR template. The template includes a
    - POST request to send off the call reason to deepsearch and a
    - PUT request of detected intent on babelforce call session
  3. Use the session variables as Trigger conditions
  4. Use the Trigger anywhere in your callflow to route calls / choose agents for certain calls / record calls etc. 

In order for you to not have to built the http requests on your side, we prepared a task template for exactly this use case (id: "v1.0.0_babelforce.deepsearch.intent"). To read more about task templates, please head to this article.

Let's go through the steps of how to set this up:

1. Store call reason on a variable in the speech to text module

Create a speech-to-text module in your account. Use a variable name like "call_reason" for instance. It should look similar to this:

mceclip0.png

2. Use a babelforce template action which includes a POST request to deepsearch and a PUT request to set babelforce call sessions


2.1 Jump to the tab "Automations" in that module, to add a local post automation:

mceclip2.png

2.2. The upper part of the automation should look like this: 

  • Position: after
  • Action: create task via template

mceclip3.png

2.3. In the bottom section, we need to insert the following info: 

  • Integration: babelforce tasks (add this under (Integrations > "Add", searching for "tasks")
  • Request body: for the template we want to use, 3 fields are required:
    • body.callId: {call.id}
    • body.api_key: {my_api_key} - the api key of your deepsearch integration
    • body.text: {app.speechToText.call_reason} - the text you want to send off to deepsearch which has been stored above (under 1.)
  • Please make sure to enter your variables in a valid JSON format:
    • wrap every key-value pair in quotes (also the placeholders)
    • wrap all variables in an object

It should look similar to this: 

mceclip9.png

  • At the bottom, enter "v1.0.0_babelforce.deepsearch.intent" as the template Id
  • use style "flat" for the notation

mceclip8.png

3. Use the session variables as Trigger conditions

These are the session variables, the intents are stored on:

  1. "ivr.intent_name_1",
  2. "ivr.intent_name_2":
  3. "ivr.intent_name_3"
  4. "ivr.intent_score_0"
  5. "ivr.intent_score_1"
  6. "ivr.intent_score_2"
  • 1.-3 are the names of the top 3 business cases that deepsearch detected 
  • 4-6. are the respective probability scores of these respective business cases

These can now be used in a Trigger (going to Trigger > "Add") , like this for example: 

mceclip0.png

4. Use the Trigger anywhere in your callflow to route calls / choose agents for certain calls / record calls etc. 

Once you built in the conditions into a Trigger, you can now use it to route calls to certain callflow paths, select agents for calls depending on the detected intent or record calls only for certain intents, etc. 

 

Have more questions? Submit a request