Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To ask a question to the Bot specify the standard "RFAQ" node in the request and pass the text of the question in the "hda_sematic_question" parameter.

Syntax:

HTTP GET https://{brain-host}:{port}/brain/autojson/{brain-service}/RFAQ?hda_semantic_question={question}

headers = {
cookie: <BRAINSID_SessionCookie>
};

...

Calling a specific node

Syntax:
HTTP GET http://{brain-host}:{port}/brain/autojson/{brain-service}/{node}

headers = {
cookie: <BRAINSID_SessionCookie>
};

...

Code Block
languagejson
{
   "node":{
      "brain_id":"n_22370",
      "brain_version":"5.10.0-SNAPSHOT",
      "id":"n_22370_1287493518",
      "key":"TEST_M_1",
      "serviceName":"enghouse-brain-bot",
      "serviceVersion":"1",
      "contents":{
         "content":[
            {
               "bargein":"true",
               "brain_id":"c_22370_3",
               "contentType":"TEXT_CONTENT_RICH",
               "id":"c_22370_3_266538648",
               "usePreviousText":"false",
               "text":"Option 1 selected"
            },
            {
               "bargein":"true",
               "brain_id":"c_22370_1",
               "contentType":"VIDEO",
               "id":"c_22370_1_962092860",
               "usePreviousText":"false"
            }
         ]
      }
   }
}

Redirect to operator

The human escalation is triggered by a redirect-to-operator action. It is possible to specify the target queue, the requested service level and skills.

Example

Code Block
languagejson
{
   "node":{
      "brain_id":"n_22357",
      "brain_version":"5.10.0-SNAPSHOT",
      "id":"n_22357_1488672544",
      "key":"REDIRECT_TO_OPERATOR",
      "serviceName":"enghouse-brain-bot",
      "serviceVersion":"1",
      "contents":{
         "content":[
            {
               "bargein":"true",
               "brain_id":"c_22357_2",
               "contentType":"READABLE_PLAIN",
               "id":"c_22357_2_942788559",
               "usePreviousText":"false"
            },
            {
               "bargein":"true",
               "brain_id":"c_22357_1",
               "contentType":"VIDEO",
               "id":"c_22357_1_506882387",
               "usePreviousText":"false"
            },
            {
               "bargein":"true",
               "brain_id":"c_22357_3",
               "contentType":"TEXT_CONTENT_RICH",
               "id":"c_22357_3_1607223715",
               "usePreviousText":"false",
               "text":"<div><b>Ti sto mettendo in contatto con un operatore, un attimo di pazienza...</b></div><div><br></div>"
            }
         ]
      },
      "params":{
         "param":{
            "name":"isPlayerVisible",
            "text":"true"
         }
      },
      "actions":{
         "action":{
            "brain_id":"a_34422",
            "command":"redirect-to-operator",
            "content":"",
            "id":"a_34422_891966757",
            "order":"1",
            "runAt":"-1",
            "target":"",
            "params":{
               "param":[
                  {
                     "name":"skills",
                     "text":"ENGLISH,ITALIAN"
                  },
                  {
                     "name":"serviceLevel",
                     "text":"GOLD"
                  },
                  {
                     "name":"queue",
                     "text":"QUEUE1"
                  }
               ]
            }
         }
      }
   }
}