Conversation Element

Piece of Conversation Object

A Conversation Element is an object containing an interlocutor interaction (text, button action, url loaded event, custom event) and the corresponding bot answer.
The Conversation Element objects are used in the return value of the Conversation history endpoints.

Attribute

Type

Description

interlocutor_id

String

The interlocutor id of the conversation element

interlocutor

Interlocutor

The interlocutor, consolidated only for search results

timestamp

Long

Time in second after epoch of the interlocutor query

bot_id

String

The bot ID

input_source

Source

Qualify the source on input_action, (interlocutor or user)

output_source

Source

Qualify the source of the answer, (the bot)

input_action.source

Source

Usually the same input_source

input_action.action

Action

The interlocutor action (Message or Go to) that trigger the bot answers or the support agent text (to the interlocutor)

input_action.target

Target

The target the bot will execute, as result of the input_action.action

input_action.match

Match

When the input_action.action is of type 'text', the optional 'match' field explain the intent that was found as matching the user query

input_event.source

Source

Qualify the source of input_event (when there is one)

input_event.event

Map

Open schema when can be save special event like the take_control event

output_actions

List

List of all the actions the bot executed to reply to the interlocutor. The list is distributed into 2 levels, so the actions are grouped by step source (where the actions are defined)

output_actions[].source

Source

The story/step source of the actions in following field "actions"

output_actions[].actions[].action

Action

An action as bot response

output_actions[].actions[].parents[]

List of actions

In case the previous action is transformed from another kind of action (ex : google_custom_search action is transformed into send_cards_action to be displayed to user), this is the list (usually one) of originated action.

Source object

Attribute

Type

Description

type

String

bot/interlocutor/story/step/actions_block/user

id

String

the Id of the type object

name

String

name of the type object

Target object

Attribute

Type

Description

type

String

story/step/actions_block

id

String

the Id of the type object

name

String

name of the type object

Match object

Attribute

Type

Description

analyzeType

String

'detect' when the nlp analysis was made in regards of all bot's intents.
'select' when the nlp analysis was made inregards of a subset of intents (in 'Then' in steps connections /matchIntent)

duration

Float

Time in s the nlp analysis took

score

Float

between 0 and 1. The score the text match the following intent.
(optional : no score if no intents was found)

matchingIntent

object

extract of the matching intent

matchingIntent.id

String

id of the intent

matchingIntent.name

String

name of the intent

matchingIntent.type

String

always 'intent'

matchingIntent.priority/.precision

Integer

the priority and precision parametrized of the intent

{
  "interlocutor_id": "5c58414ffd43ca0010fa1ae1",
  "timestamp": 1557157686,
  "bot_id": "5bfe9b243422d7000e046da8",
  "input_source": {
      "type": "interlocutor",
      "interlocutor_id": "5c58414ffd43ca0010fa1ae1"
  },
  "output_source": {
      "type": "bot",
      "bot_id": "5bfe9b243422d7000e046da8"
  },
  "input_action": {
      "source": {
          "type": "interlocutor",
          "interlocutor_id": "5c58414ffd43ca0010fa1ae1"
      },
     "action": {
       "type": "text",
         "message": "hello robot"
     },
     "target": {
      "id": "5bfe9b25e6b7bb0009914338",
      "type": "actions_block",
      "name": "Hello"
    },
    "match": {
      "analyzeType": "detect",
      "duration": 0.0131217912,
      "score": 1,
      "matchingIntent": {
        "id": "5d35c9a7ba2bbb000dd3945d",
        "type": "intent",
        "name": "Hello",
        "priority": 20000,
        "precision": 20000
      }
    }
  },
  "output_actions": [
    {
      "source": {
        "type": "actions_block",
        "actions_block_id": "5bfe9b25e6b7bb0009914338"
      },
      "actions": [
        {
          "action": {
            "type": "wait_action",
            "duration": 2
          },
          "parent_actions": []
        },
        {
          "action": {
            "type": "send_text_action",
            "alternatives": [
              "Hello you.\n"
            ],
            "text": "Hello you.\n"
          },
          "parent_actions": []
        },
        {
          "action": {
            "type": "wait_action",
            "duration": 2
          },
          "parent_actions": []
        },
        {
          "action": {
            "type": "send_text_action",
            "alternatives": [
              "How do you do ?"
            ],
            "text": "How do you do ?"
          },
          "parent_actions": []
        }
      ]
    }
  ]
}