...
Code Block | ||
---|---|---|
| ||
{ "node":{ "brain_id":"n_22367", "brain_version":"5.10.0-SNAPSHOT", "id":"n_22367_725744298", "key":"TEST_NODE_MSG", "serviceName":"enghouse-brain-bot", "serviceVersion":"1", "contents":{ "content":[ { "bargein":"true", "brain_id":"c_22367_13", "contentType":"VIDEOTEXT_CONTENT_RICH", "id":"c_22367_13_178288251241735189", "usePreviousText":"false", "text":"Questo è un contenuto di <b>test</b>." }, { "bargein":"true", "brain_id":"c_22367_32", "contentType":"TEXTREADABLE_CONTENT_RICHPLAIN", "id":"c_22367_32_417351891418502948", "usePreviousText":"false", "text":"Questo è un contenuto di <b>test</b>*test*." }, ] { } } } |
Menu Response:
Code Block | ||
---|---|---|
| ||
{ "node":{ "bargeinbrain_id":"truen_22369", "brain_version":"5.10.0-SNAPSHOT", "brain_id":"cn_2236722369_2698945808", "key":"TEST_MENU", "contentTypeserviceName":"READABLE_PLAINenghouse-brain-bot", "id"serviceVersion":"c_22367_2_14185029481", "contents":{ "usePreviousTextcontent":"false",[ { "text":"Questo è un contenuto di *test*." "bargein":"true", } ] "brain_id":"c_22369_3", } } } |
Menu Response:
Code Block | ||
---|---|---|
| ||
{ "node":{ "brain_idcontentType":"nTEXT_CONTENT_22369RICH", "brain_version":"5.10.0-SNAPSHOT", "id":"nc_22369_3_6989458081619889357", "key":"TEST_MENU", "serviceNameusePreviousText":"enghouse-brain-botfalse", "serviceVersion":"1", "contentstext":{"Choose an option" "content":[ } { ] }, "bargeinactions":"true",{ "action":{ "brain_id":"ca_22369_134423", "contentTypecommand":"VIDEOmenu", "idcontent":"c_22369_1_494762750", "usePreviousTextid":"falsea_34423_1259541208", }"order":"1", {"runAt":"-1", "bargeintarget":"true", "brain_id":"c_22369_3","actions":{ "contentType":"TEXT_CONTENT_RICH",action":[ { "id":"c_22369_3_1619889357", "usePreviousTextbrain_id":"falsea_34424", "textcommand":"Chooseload-item", an option" } "content":"OPTION 1", ] }, "actionsid":{"a_34424_1211377995", "action":{ "brain_idorder":"a_344231", "command":"menu", "contentrunAt":"-1", "id":"a_34423_1259541208", "ordertarget":"TEST_M_1", "runAt":"-1", "node_ref":{ "target":"", "actionskey":{"TEST_M_1", "action":[ "targetUrl":"/enghouse-brain-bot/1/TEST_M_1?referrerActionId=34424" { } " }, { "brain_id":"a_3442434425", "command":"load-item", "content":"OPTION 12", "id":"a_3442434425_1211377995308197190", "order":"12", "runAt":"-1", "target":"TEST_MMENU_12", "node_ref":{ "key":"TEST_MMENU_12", "targetUrl":"/enghouse-brain-bot/1/TEST_MMENU_12?referrerActionId=3442434425" } }, { "brain_id":"a_3442534426", "command":"loadopen-itemurl", "content":"OPTIONPAT 2WEBSITE", "id":"a_3442534426_3081971901665019718", "order":"23", "runAt":"-1", "target":"TEST_MENU_2https://www.pat.eu", "node_refparams":{ "key":"TEST_MENU_2",param":[ { "targetUrl":"/enghouse-brain-bot/1/TEST_MENU_2?referrerActionId=34425" } "name":"method", }, "text":"GET" { "brain_id":"a_34426", }, "command":"open-url", { "content":"PAT WEBSITE", "id":"a_34426_1665019718"name":"where", "order":"3", "text":"_blank" "runAt":"-1", } "target":"https://www.pat.eu", ] "params":{ } "param":[ } {] }, "nameparams":"method", { "textparam":"GET"{ }"name":"display", "text":"v" { } } "name":"where",} } "text":"_blank" } ] } } ] }, "params":{ "param":{ "name":"display", "text":"v" } } } } } } |
Calling a specific node
This service must be called whenever it is specified by a previous response. For example, in the case of a menu, one of the options can specify a node url to be called in the "targetUrl" parameter if the option is chosen by the user.
Syntax:
HTTP GET http://{brain-host}:{port}/brain/autojson/{brain-service}/{node}
headers = {
cookie: <BRAINSID_SessionCookie>
};
Example
Response:
Code Block | ||
---|---|---|
| ||
{ "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} } |
Calling a specific node
This service must be called whenever it is specified by a previous response. For example, in the case of a menu, one of the options can specify a node url to be called in the "targetUrl" parameter if the option is chosen by the user.
Syntax:
HTTP GET http://{brain-host}:{port}/brain/autojson/{brain-service}/{node}
headers = {
cookie: <BRAINSID_SessionCookie>
};
Example
Response:
Code Block | ||
---|---|---|
| ||
{ "node":{ "brain_id":"n_22370", "brain_version":"5.10.0-SNAPSHOT", "id":"n_22370_1287493518", "key":"TEST_M_1", "serviceName":"enghouse-brain-bot", "brain_idserviceVersion":"c_22370_1", "contents":{ "contentTypecontent":"VIDEO",[ { "id":"c_22370_1_962092860", "usePreviousTextbargein":"falsetrue" , } "brain_id":"c_22370_3", ] } } } |
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 | ||
---|---|---|
| ||
{ "node":{"contentType":"TEXT_CONTENT_RICH", "brain_id":"n_22357c_22370_3_266538648", "brain_version "usePreviousText":"5.10.0-SNAPSHOTfalse", "id":"n_22357_1488672544", "keytext":"REDIRECT_TO_OPERATOR",Option 1 selected" "serviceName":"enghouse-brain-bot", "serviceVersion":"1",} "contents":{ ] } "content":[ { } } |
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 | ||
---|---|---|
| ||
{ "bargeinnode":"true", { "brain_id":"cn_22357_2", "contentType"brain_version":"READABLE_PLAIN5.10.0-SNAPSHOT", "id":"n_22357_1488672544", "idkey":"cREDIRECT_22357TO_2_942788559OPERATOR", "serviceName":"enghouse-brain-bot", "usePreviousTextserviceVersion":"false1", "contents":{ }, "content":[ { "bargein":"true", "brain_id":"c_22357_12", "contentType":"VIDEOREADABLE_PLAIN", "id":"c_22357_12_506882387942788559", "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" } ] } } } } } |