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.

AttributeTypeDescription
interlocutor_idStringThe interlocutor id of the conversation element
interlocutorInterlocutorThe interlocutor, consolidated only for search results
timestampLongTime in second after epoch of the interlocutor query
bot_idStringThe bot ID
input_sourceSourceQualify the source on input_action, (interlocutor or user)
output_sourceSourceQualify the source of the answer, (the bot)
input_action.sourceSourceUsually the same input_source
input_action.actionActionThe interlocutor action (Message or Go to) that trigger the bot answers or the support agent text (to the interlocutor)
input_action.targetTargetThe target the bot will execute, as result of the input_action.action
input_action.matchMatchWhen 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.sourceSourceQualify the source of input_event (when there is one)
input_event.eventMapOpen schema when can be save special event like the take_control event
output_actionsListList 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[].sourceSourceThe story/step source of the actions in following field "actions"
output_actions[].actions[].actionActionAn action as bot response
output_actions[].actions[].parents[]List of actionsIn 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

AttributeTypeDescription
typeStringbot/interlocutor/story/step/actions_block/user
idStringthe Id of the type object
nameStringname of the type object

Target object

AttributeTypeDescription
typeStringstory/step/actions_block
idStringthe Id of the type object
nameStringname of the type object

Match object

AttributeTypeDescription
analyzeTypeString'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)
durationFloatTime in s the nlp analysis took
scoreFloatbetween 0 and 1. The score the text match the following intent.
(optional : no score if no intents was found)
matchingIntentobjectextract of the matching intent
matchingIntent.idStringid of the intent
matchingIntent.nameStringname of the intent
matchingIntent.typeStringalways 'intent'
matchingIntent.priority/.precisionIntegerthe 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": []
        }
      ]
    }
  ]
}