Objective

Example model of our insights conversation model and example output document.

Applies To

  • Vonage AI Studio

Procedure

Below is an example model of our insights conversation model. Each conversation will have one such model. Every conversation has a flow path, which is composed of one or more flow steps, each step being a node execution in the agent.
All the fields that are marked with a <> are queryable. If they are wrapped with a “ ” then that means that the field is a string field, otherwise, it’s a number or a boolean.
{
"flow_path" : [
{
"synchronized" : <true/false>,
"request" : {
"headers" : """<request_headers>""",
"payload" : """<request_payload>""",
"verb" : "<request_verb>",
"url" : "<webhook_url>"
},
"response" : {
"code" : <status_code>,
"payload" : """<response_message>"""
},
"context" : {
"output" : null,
"user_input" : "",
"execution_parameters" : [
{
"value_text" : "",
"name" : "<execution_param_1_name>",
"completed" : <true/false>,
"value" : "<execution_param_1_name>",
"entity" : "<execution_param_1_entity>"
},
{
"value_text" : "",
"name" : "<execution_param_2_name>",
"completed" : true/false,
"value" : "<execution_param_2_name>",
"entity" : "<execution_param_2_entity>"
},
{
"value_text" : "",
"name" : "<execution_param_3_name>",
"completed" : true/false,
"value" : "<execution_param_3_name>",
"entity" : "<execution_param_3_entity>"
},
{
"value_text" : "<textual_value>",
"name" : "<param_1_name>",
"completed" : true/false,
"value" : "<param_1_value>",
"entity" : "<param_1_entity>"
}
],
"url" : "webhook_url",
"status" : {
"code" : <response_code>,
"message" : """<response_message>"""
}
},
"type" : "webhook",
"request_id" : "<request_id>",
"node_id" : "<internal_node_id>",
"tags" : [ ],
"execution_time" : <execution_time>
},
{
"synchronized" : <true/false>,
"request" : {
"headers" : "<headers>",
"payload" : "<payload>",
"verb" : "<verb>",
"url" : "<url>"
},
"response" : {
"code" : <response_code>,
"payload" : "<response_payload>"
},
"context" : {
"output" : <output>,
"user_input" : "<user_input>",
"execution_parameters" : [
{
"value_text" : "<execution_param_1_value_text>",
"name" : "<execution_param_1_name>",
"completed" : <true/false>,
"value" : "<execution_param_1_name>",
"entity" : "<execution_param_1_entity>"
},
{
"value_text" : "<execution_param_2_value_text>",
"name" : "<execution_param_2_name>",
"completed" : <true/false>,
"value" : "<execution_param_2_name>",
"entity" : "<execution_param_2_entity>"
},
{
"value_text" : "<execution_param_3_value_text>",
"name" : "<execution_param_3_name>",
"completed" : <true/false>,
"value" : "<execution_param_3_name>",
"entity" : "<execution_param_3_entity>"
},
{
"value_text" : "<textual_value>",
"name" : "<param_1_name>",
"completed" : <true/false>,
"value" : "<param_1_value>",
"entity" : "<param_1_entity>"
}
],
"url" : "",
"status" : {
"code" : <status_code>,
"message" : "<message>"
}
},
"type" : "<node_type>",
"request_id" : "<request_id>",
"node_id" : "<internal_node_id>",
"tags" : [ ],
"execution_time" : 0
}
],
"transcription" : [
{
"user" : "<user_statement>"
},
{
"<agent_id>": "<agent_statement>"
}
],
"tags_list" : [
{
"count" : 1,
"tag" : "<tag_1>",
"category" : "<tag_category_1>"
},
{
"count" : 1,
"tag" : "<tag_2>",
"category" : "<tag_category_2>"
},
{
"count" : 1,
"tag" : "<tag_3>",
"category" : "<tag_category_2>"
}
],
"channel_data" : {
"call_status" : "in_progress/ended"
},
"params_list" : [
{
"value_text" : "<textual_value>",
"name" : "<param_1_name>",
"completed" : <true/false>,
"value" : "<param_1_value>",
"entity" : "<param_1_entity>"
}
],
"destination" : <agent_phone_number>,
"channel" : "<telephony/whatsapp>",
"session_start_time" : "<session time in isoformat>,
"language" : "en-US",
"flow_data" : {
"injected_parameters" : [ ],
"collected_tags" : [
{
"tag" : "<tag_1>",
"category" : "<tag_category_1>"
},
{
"tag" : "<tag_2>",
"category" : "<tag_category_2>"
},
{
"tag" : "<tag_3>",
"category" : "<tag_category_2>"
}
],
"collected_parameters" : [
{
"value_text" : "<textual_value>",
"name" : "<param_1_name>",
"completed" : <true/false>,
"value" : "<param_1_value>",
"entity" : "<param_1_entity>"
}
]
},
"source" : "<caller_phone_number>",
"params" : {
"<param_1_name>" : {
"completed" : <true/false>,
"value" : "<param_1_value>"
}
},
"tags" : {
"<tag_category_1>" : {
"<tag_1>" : tag_1_count
},
"<tag_category_2>" : {
"<tag_2>" : tag_2_count
},
"<tag_category_2>" : {
"<tag_2>" : tag_2_count,
"<tag_3>" : tag_3_count
}
},
"account_id" : "<account_id>",
"api_key" : "N/A",
"request_ids" : [
"<request_id_1>",
"<request_id_2>"
],
"id" : "<session_id>",
"agent_information" : {
"voice" : "<voice>",
"name" : "<name>",
"language" : "<language>",
"version_id" : "<version_id>",
"id" : "<agent_id>",
},
"status" : "<in_progress/ended>"
}

Example Output Document

Get All Result
{
"total": 1, // The total number of results available
"hits": [ // An array of results
{
"transcription": [
{
"5f7f2f337340dc7249f81406": "sup?"
},
{
"5f7f2f337340dc7249f81406": "name?"
},
{
"user": "Benjamin"
},
{
"5f7f2f337340dc7249f81406": "shut up Benjamin"
}
],
"account_id": "5f7f277cf090a7001116fabe",
"api_key": "N/A",
"status": "ended",
"id": "8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36",
"language": "en-US",
"tags": {
"ddbc05ccbc48431d898104ac5e5b561a": {
"two": 1,
"one": 1,
"three": 2
}
},
"params": {
"name": {
"completed": true,
"value": "Benjamin"
}
},
"tags_list": [
{
"count": 1,
"tag": "two",
"category": "ddbc05ccbc48431d898104ac5e5b561a"
},
{
"count": 1,
"tag": "one",
"category": "ddbc05ccbc48431d898104ac5e5b561a"
},
{
"count": 2,
"tag": "three",
"category": "ddbc05ccbc48431d898104ac5e5b561a"
}
],
"params_list": [
{
"value_text": "Benjamin",
"name": "name",
"completed": true,
"type": "sys.names",
"value": "Benjamin"
}
],
"agent_information": {
"version_id": "5f7f2f337340dc7249f81406",
"id": "5f7f2e60a6034c9b5c79d16c",
"name": "oriprod2",
"voice": "Salli",
"language": "en-US"
},
"source": "9720014044002502",
"destination": "972523656841",
"channel": "voice",
"session_start_time": "2020-10-08T17:09:27.758983",
"request_ids": [
"759a8938-c296-4ff5-9ec9-d3f0267893f9",
"db2a0259-92fa-4067-a50c-728689276c58"
],
"channel_data": {
"duration": 27000,
"audio_url": "5f7f277cf090a7001116fabe/5f7f2f337340dc7249f81406/8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36.mp3",
"call_status": "ended",
"status_code": 200
},
"flow_data": {
"collected_tags": [
{
"tag": "two",
"category": "ddbc05ccbc48431d898104ac5e5b561a"
},
{
"tag": "one",
"category": "ddbc05ccbc48431d898104ac5e5b561a"
},
{
"tag": "three",
"category": "ddbc05ccbc48431d898104ac5e5b561a"
},
{
"tag": "three",
"category": "ddbc05ccbc48431d898104ac5e5b561a"
}
],
"collected_parameters": [
{
"value_text": "Benjamin",
"name": "name",
"completed": true,
"type": "sys.names",
"value": "Benjamin"
}
],
"injected_parameters": []
},
"flow_path": [
{
"node_id": "5f7f2e60a6034c9b5c79d16b",
"type": "start",
"context": {
"execution_parameters": [
{
"name": "name",
"type": "sys.names",
"value": "",
"value_text": "",
"completed": false
}
],
"status": {
"code": 200,
"message": ""
},
"output": null,
"user_input": "",
"url": ""
},
"tags": [],
"execution_time": 0,
"synchronized": true,
"request_id": "759a8938-c296-4ff5-9ec9-d3f0267893f9",
"request": {
"payload": "",
"headers": "",
"verb": "POST",
"url": ""
},
"response": {
"payload": "",
"code": 200
}
},
{
"synchronized": true,
"request": {
"headers": "{\"Content-Type\": \"application/json\"}",
"payload": "{\"session_id\": \"8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\", \"action_id\": \"5f7f2e689ce1d4ecd57793c5\", \"is_collect_input\": false, \"type\": \"speak\", \"text\": \"sup?\", \"audio\": null, \"voice_id\": \"Salli\", \"language_code\": \"en-US\"}",
"verb": "POST",
"url": "http://telephony-connector.ai.vonage.com/api/actions/speak"
},
"response": {
"code": 201,
"payload": "{\"message\": \"Succesfully registered SPEAK action for session_id: 8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\"}"
},
"context": {
"output": null,
"user_input": "",
"execution_parameters": [
{
"value_text": "",
"name": "name",
"completed": false,
"type": "sys.names",
"value": ""
}
],
"url": "http://telephony-connector.ai.vonage.com/api/actions/speak",
"status": {
"code": 201,
"message": "{\"message\": \"Succesfully registered SPEAK action for session_id: 8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\"}"
}
},
"type": "speak",
"request_id": "759a8938-c296-4ff5-9ec9-d3f0267893f9",
"node_id": "5f7f2e689ce1d4ecd57793c5",
"tags": [
{
"tag": "two",
"category": "ddbc05ccbc48431d898104ac5e5b561a"
}
],
"execution_time": 168
},
{
"synchronized": true,
"request": {
"headers": "{\"Content-Type\": \"application/json\"}",
"payload": "{\"session_id\": \"8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\", \"action_id\": \"7f99f590-437d-4e50-b985-196d419da71e\", \"is_collect_input\": true, \"type\": \"speak\", \"text\": \"name?\", \"audio\": null, \"voice_id\": \"Salli\", \"language_code\": \"en-US\"}",
"verb": "POST",
"url": "http://telephony-connector.ai.vonage.com/api/actions/speak"
},
"response": {
"code": 201,
"payload": "{\"message\": \"Succesfully registered SPEAK action for session_id: 8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\"}"
},
"context": {
"output": null,
"user_input": "",
"execution_parameters": [
{
"value_text": "",
"name": "name",
"completed": false,
"type": "sys.names",
"value": ""
}
],
"url": "http://telephony-connector.ai.vonage.com/api/actions/speak",
"status": {
"code": 201,
"message": "{\"message\": \"Succesfully registered SPEAK action for session_id: 8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\"}"
}
},
"type": "speak",
"request_id": "759a8938-c296-4ff5-9ec9-d3f0267893f9",
"node_id": "7f99f590-437d-4e50-b985-196d419da71e",
"tags": [],
"execution_time": 4777
},
{
"synchronized": true,
"request": {
"headers": "",
"payload": "",
"verb": "POST",
"url": ""
},
"response": {
"code": 200,
"payload": ""
},
"context": {
"output": null,
"user_input": "Benjamin",
"execution_parameters": [
{
"value_text": "Benjamin",
"name": "name",
"completed": true,
"type": "sys.names",
"value": "Benjamin"
}
],
"url": "",
"status": {
"code": 200,
"message": ""
}
},
"type": "param_completion",
"request_id": "db2a0259-92fa-4067-a50c-728689276c58",
"node_id": "5f7f2e6f7340dc7249f813fa",
"tags": [
{
"tag": "one",
"category": "ddbc05ccbc48431d898104ac5e5b561a"
}
],
"execution_time": 53
},
{
"synchronized": true,
"request": {
"headers": "{\"Content-Type\": \"application/json\"}",
"payload": "{\"session_id\": \"8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\", \"action_id\": \"5f7f2eca35e7e1a6c42754e9\", \"is_collect_input\": false, \"type\": \"speak\", \"text\": \"shut up Benjamin\", \"audio\": null, \"voice_id\": \"Salli\", \"language_code\": \"en-US\"}",
"verb": "POST",
"url": "http://telephony-connector.ai.vonage.com/api/actions/speak"
},
"response": {
"code": 201,
"payload": "{\"message\": \"Successfully registered SPEAK action for session_id: 8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\"}"
},
"context": {
"output": null,
"user_input": "",
"execution_parameters": [
{
"value_text": "Benjamin",
"name": "name",
"completed": true,
"type": "sys.names",
"value": "Benjamin"
}
],
"url": "http://telephony-connector.ai.vonage.com/api/actions/speak",
"status": {
"code": 201,
"message": "{\"message\": \"Successfully registered SPEAK action for session_id: 8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\"}"
}
},
"type": "speak",
"request_id": "db2a0259-92fa-4067-a50c-728689276c58",
"node_id": "5f7f2eca35e7e1a6c42754e9",
"tags": [
{
"tag": "three",
"category": "ddbc05ccbc48431d898104ac5e5b561a"
}
],
"execution_time": 4727
},
{
"synchronized": true,
"request": {
"headers": "",
"payload": "",
"verb": "POST",
"url": ""
},
"response": {
"code": 200,
"payload": ""
},
"context": {
"output": null,
"user_input": "",
"execution_parameters": [
{
"value_text": "Benjamin",
"name": "name",
"completed": true,
"type": "sys.names",
"value": "Benjamin"
}
],
"url": "",
"status": {
"code": 200,
"message": ""
}
},
"type": "end_call",
"request_id": "db2a0259-92fa-4067-a50c-728689276c58",
"node_id": "5f7f2eca35e7e1a6c42754e9",
"tags": [
{
"tag": "three",
"category": "ddbc05ccbc48431d898104ac5e5b561a"
}
],
"execution_time": 0
}
]
}
],
"page_size": "10", // The page size the user provided
"page_number": "0" // The page number the user provided
}