Last active
September 19, 2024 21:07
-
-
Save javierportillo/d8c557410eacc91db695ed34f82ef41d to your computer and use it in GitHub Desktop.
Conversation History Schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://json-schema.org/draft/2019-09/schema", | |
"type": "array", | |
"default": [], | |
"title": "Root Schema", | |
"items": { | |
"type": "object", | |
"title": "Turno de Conversacion", | |
"required": [ | |
"request", | |
"response" | |
], | |
"properties": { | |
"request": { | |
"type": "object", | |
"title": "Request del usuario", | |
"required": [ | |
"languageCode", | |
"event", | |
"input", | |
"text" | |
], | |
"properties": { | |
"languageCode": { | |
"type": "string", | |
"title": "The languageCode Schema", | |
"examples": [ | |
"es" | |
] | |
}, | |
"event": { | |
"type": "object", | |
"default": {}, | |
"title": "Cuando el tipo de request es un evento", | |
"required": [ | |
"event" | |
], | |
"properties": { | |
"event": { | |
"type": "string", | |
"default": "", | |
"title": "The event Schema", | |
"examples": [ | |
"WELCOME" | |
] | |
} | |
}, | |
"examples": [ | |
{ | |
"event": "WELCOME" | |
} | |
] | |
}, | |
"input": { | |
"type": "string", | |
"title": "El tipo de mensaje si es texto o evento", | |
"examples": [ | |
"event", | |
"text" | |
] | |
}, | |
"text": { | |
"type": "object", | |
"title": "En caso que el input sea text", | |
"required": [ | |
"text" | |
], | |
"properties": { | |
"text": { | |
"type": "string", | |
"title": "The text Schema", | |
"examples": [ | |
"mensaje número 1", | |
"mensaje número 2", | |
"transfiere me al departamento de venta", | |
"departamento de ventas" | |
] | |
} | |
}, | |
"examples": [ | |
{ | |
"text": "mensaje número 1" | |
}, | |
{ | |
"text": "mensaje número 2" | |
}, | |
{ | |
"text": "transfiere me al departamento de venta" | |
}, | |
{ | |
"text": "departamento de ventas" | |
} | |
] | |
} | |
}, | |
"examples": [ | |
{ | |
"languageCode": "es", | |
"event": { | |
"event": "WELCOME" | |
}, | |
"input": "event" | |
}, | |
{ | |
"languageCode": "es", | |
"text": { | |
"text": "mensaje número 1" | |
}, | |
"input": "text" | |
}, | |
{ | |
"languageCode": "es", | |
"text": { | |
"text": "mensaje número 2" | |
}, | |
"input": "text" | |
}, | |
{ | |
"languageCode": "es", | |
"text": { | |
"text": "transfiere me al departamento de venta" | |
}, | |
"input": "text" | |
}, | |
{ | |
"languageCode": "es", | |
"text": { | |
"text": "departamento de ventas" | |
}, | |
"input": "text" | |
} | |
] | |
}, | |
"response": { | |
"type": "array", | |
"title": "La respuesta del bot", | |
"items": { | |
"type": "object", | |
"title": "A Schema", | |
"required": [ | |
"channel", | |
"text", | |
"message", | |
"payload", | |
"liveAgentHandoff", | |
"endInteraction" | |
], | |
"properties": { | |
"channel": { | |
"type": "string", | |
"title": "The channel Schema", | |
"examples": [ | |
"" | |
] | |
}, | |
"text": { | |
"type": "object", | |
"title": "The text Schema", | |
"required": [ | |
"text", | |
"allowPlaybackInterruption" | |
], | |
"properties": { | |
"text": { | |
"type": "array", | |
"title": "The text Schema", | |
"items": { | |
"type": "string", | |
"title": "A Schema", | |
"examples": [ | |
"Hola, gracias por llamarme aqui, por favor dime si necesitas hablar con el departamento de ventas o con atención al cliente", | |
"¿Puedes decir eso una vez más?", | |
"Lo siento, ¿podrías decir eso de nuevo?", | |
"Por supuesto, te transferiré a nuestro departamento de ventas donde podrás recibir asistencia personalizada." | |
] | |
}, | |
"examples": [ | |
[ | |
"Hola, gracias por llamarme aqui, por favor dime si necesitas hablar con el departamento de ventas o con atención al cliente" | |
], | |
[ | |
"¿Puedes decir eso una vez más?" | |
], | |
[ | |
"Lo siento, ¿podrías decir eso de nuevo?" | |
], | |
[ | |
"Lo siento, ¿podrías decir eso de nuevo?" | |
], | |
[ | |
"Por supuesto, te transferiré a nuestro departamento de ventas donde podrás recibir asistencia personalizada." | |
] | |
] | |
}, | |
"allowPlaybackInterruption": { | |
"type": "boolean", | |
"title": "The allowPlaybackInterruption Schema", | |
"examples": [ | |
false | |
] | |
} | |
}, | |
"examples": [ | |
{ | |
"text": [ | |
"Hola, gracias por llamarme aqui, por favor dime si necesitas hablar con el departamento de ventas o con atención al cliente" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
{ | |
"text": [ | |
"¿Puedes decir eso una vez más?" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
{ | |
"text": [ | |
"Lo siento, ¿podrías decir eso de nuevo?" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
{ | |
"text": [ | |
"Lo siento, ¿podrías decir eso de nuevo?" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
{ | |
"text": [ | |
"Por supuesto, te transferiré a nuestro departamento de ventas donde podrás recibir asistencia personalizada." | |
], | |
"allowPlaybackInterruption": false | |
} | |
] | |
}, | |
"message": { | |
"type": "string", | |
"title": "The message Schema", | |
"examples": [ | |
"text", | |
"payload", | |
"liveAgentHandoff", | |
"endInteraction" | |
] | |
}, | |
"payload": { | |
"type": "object", | |
"default": {}, | |
"title": "The payload Schema", | |
"required": [ | |
"fields" | |
], | |
"properties": { | |
"fields": { | |
"type": "object", | |
"default": {}, | |
"title": "The fields Schema", | |
"required": [ | |
"template", | |
"another" | |
], | |
"properties": { | |
"template": { | |
"type": "object", | |
"default": {}, | |
"title": "The template Schema", | |
"required": [ | |
"stringValue", | |
"kind" | |
], | |
"properties": { | |
"stringValue": { | |
"type": "string", | |
"default": "", | |
"title": "The stringValue Schema", | |
"examples": [ | |
"template_con_botones_saludo_inicial" | |
] | |
}, | |
"kind": { | |
"type": "string", | |
"default": "", | |
"title": "The kind Schema", | |
"examples": [ | |
"stringValue" | |
] | |
} | |
}, | |
"examples": [ | |
{ | |
"stringValue": "template_con_botones_saludo_inicial", | |
"kind": "stringValue" | |
} | |
] | |
}, | |
"another": { | |
"type": "object", | |
"default": {}, | |
"title": "The another Schema", | |
"required": [ | |
"stringValue", | |
"kind" | |
], | |
"properties": { | |
"stringValue": { | |
"type": "string", | |
"default": "", | |
"title": "The stringValue Schema", | |
"examples": [ | |
"thing" | |
] | |
}, | |
"kind": { | |
"type": "string", | |
"default": "", | |
"title": "The kind Schema", | |
"examples": [ | |
"stringValue" | |
] | |
} | |
}, | |
"examples": [ | |
{ | |
"stringValue": "thing", | |
"kind": "stringValue" | |
} | |
] | |
} | |
}, | |
"examples": [ | |
{ | |
"template": { | |
"stringValue": "template_con_botones_saludo_inicial", | |
"kind": "stringValue" | |
}, | |
"another": { | |
"stringValue": "thing", | |
"kind": "stringValue" | |
} | |
} | |
] | |
} | |
}, | |
"examples": [ | |
{ | |
"fields": { | |
"template": { | |
"stringValue": "template_con_botones_saludo_inicial", | |
"kind": "stringValue" | |
}, | |
"another": { | |
"stringValue": "thing", | |
"kind": "stringValue" | |
} | |
} | |
} | |
] | |
}, | |
"liveAgentHandoff": { | |
"type": "object", | |
"default": {}, | |
"title": "The liveAgentHandoff Schema", | |
"required": [ | |
"metadata" | |
], | |
"properties": { | |
"metadata": { | |
"type": "object", | |
"default": {}, | |
"title": "The metadata Schema", | |
"required": [ | |
"fields" | |
], | |
"properties": { | |
"fields": { | |
"type": "object", | |
"default": {}, | |
"title": "The fields Schema", | |
"required": [ | |
"DERIVATE_TO", | |
"DIALER_OPTS", | |
"DF_ACCOUNT" | |
], | |
"properties": { | |
"DERIVATE_TO": { | |
"type": "object", | |
"default": {}, | |
"title": "The DERIVATE_TO Schema", | |
"required": [ | |
"stringValue", | |
"kind" | |
], | |
"properties": { | |
"stringValue": { | |
"type": "string", | |
"default": "", | |
"title": "The stringValue Schema", | |
"examples": [ | |
"DIALER" | |
] | |
}, | |
"kind": { | |
"type": "string", | |
"default": "", | |
"title": "The kind Schema", | |
"examples": [ | |
"stringValue" | |
] | |
} | |
}, | |
"examples": [ | |
{ | |
"stringValue": "DIALER", | |
"kind": "stringValue" | |
} | |
] | |
}, | |
"DIALER_OPTS": { | |
"type": "object", | |
"default": {}, | |
"title": "The DIALER_OPTS Schema", | |
"required": [ | |
"stringValue", | |
"kind" | |
], | |
"properties": { | |
"stringValue": { | |
"type": "string", | |
"default": "", | |
"title": "The stringValue Schema", | |
"examples": [ | |
"inbound,..." | |
] | |
}, | |
"kind": { | |
"type": "string", | |
"default": "", | |
"title": "The kind Schema", | |
"examples": [ | |
"stringValue" | |
] | |
} | |
}, | |
"examples": [ | |
{ | |
"stringValue": "inbound,...", | |
"kind": "stringValue" | |
} | |
] | |
}, | |
"DF_ACCOUNT": { | |
"type": "object", | |
"default": {}, | |
"title": "The DF_ACCOUNT Schema", | |
"required": [ | |
"stringValue", | |
"kind" | |
], | |
"properties": { | |
"stringValue": { | |
"type": "string", | |
"default": "", | |
"title": "The stringValue Schema", | |
"examples": [ | |
"0980s98f0sd9fs0" | |
] | |
}, | |
"kind": { | |
"type": "string", | |
"default": "", | |
"title": "The kind Schema", | |
"examples": [ | |
"stringValue" | |
] | |
} | |
}, | |
"examples": [ | |
{ | |
"stringValue": "0980s98f0sd9fs0", | |
"kind": "stringValue" | |
} | |
] | |
} | |
}, | |
"examples": [ | |
{ | |
"DERIVATE_TO": { | |
"stringValue": "DIALER", | |
"kind": "stringValue" | |
}, | |
"DIALER_OPTS": { | |
"stringValue": "inbound,...", | |
"kind": "stringValue" | |
}, | |
"DF_ACCOUNT": { | |
"stringValue": "0980s98f0sd9fs0", | |
"kind": "stringValue" | |
} | |
} | |
] | |
} | |
}, | |
"examples": [ | |
{ | |
"fields": { | |
"DERIVATE_TO": { | |
"stringValue": "DIALER", | |
"kind": "stringValue" | |
}, | |
"DIALER_OPTS": { | |
"stringValue": "inbound,...", | |
"kind": "stringValue" | |
}, | |
"DF_ACCOUNT": { | |
"stringValue": "0980s98f0sd9fs0", | |
"kind": "stringValue" | |
} | |
} | |
} | |
] | |
} | |
}, | |
"examples": [ | |
{ | |
"metadata": { | |
"fields": { | |
"DERIVATE_TO": { | |
"stringValue": "DIALER", | |
"kind": "stringValue" | |
}, | |
"DIALER_OPTS": { | |
"stringValue": "inbound,...", | |
"kind": "stringValue" | |
}, | |
"DF_ACCOUNT": { | |
"stringValue": "0980s98f0sd9fs0", | |
"kind": "stringValue" | |
} | |
} | |
} | |
} | |
] | |
}, | |
"endInteraction": { | |
"type": "object", | |
"default": {}, | |
"title": "The endInteraction Schema", | |
"required": [], | |
"properties": {}, | |
"examples": [ | |
{} | |
] | |
} | |
}, | |
"examples": [ | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"Hola, gracias por llamarme aqui, por favor dime si necesitas hablar con el departamento de ventas o con atención al cliente" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
}, | |
{ | |
"channel": "", | |
"payload": { | |
"fields": { | |
"template": { | |
"stringValue": "template_con_botones_saludo_inicial", | |
"kind": "stringValue" | |
}, | |
"another": { | |
"stringValue": "thing", | |
"kind": "stringValue" | |
} | |
} | |
}, | |
"message": "payload" | |
}, | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"¿Puedes decir eso una vez más?" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
}, | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"Lo siento, ¿podrías decir eso de nuevo?" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
}, | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"Lo siento, ¿podrías decir eso de nuevo?" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
}, | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"Por supuesto, te transferiré a nuestro departamento de ventas donde podrás recibir asistencia personalizada." | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
}, | |
{ | |
"channel": "", | |
"liveAgentHandoff": { | |
"metadata": { | |
"fields": { | |
"DERIVATE_TO": { | |
"stringValue": "DIALER", | |
"kind": "stringValue" | |
}, | |
"DIALER_OPTS": { | |
"stringValue": "inbound,...", | |
"kind": "stringValue" | |
}, | |
"DF_ACCOUNT": { | |
"stringValue": "0980s98f0sd9fs0", | |
"kind": "stringValue" | |
} | |
} | |
} | |
}, | |
"message": "liveAgentHandoff" | |
}, | |
{ | |
"channel": "", | |
"endInteraction": {}, | |
"message": "endInteraction" | |
} | |
] | |
}, | |
"examples": [ | |
[ | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"Hola, gracias por llamarme aqui, por favor dime si necesitas hablar con el departamento de ventas o con atención al cliente" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
}, | |
{ | |
"channel": "", | |
"payload": { | |
"fields": { | |
"template": { | |
"stringValue": "template_con_botones_saludo_inicial", | |
"kind": "stringValue" | |
}, | |
"another": { | |
"stringValue": "thing", | |
"kind": "stringValue" | |
} | |
} | |
}, | |
"message": "payload" | |
} | |
], | |
[ | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"¿Puedes decir eso una vez más?" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
} | |
], | |
[ | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"Lo siento, ¿podrías decir eso de nuevo?" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
} | |
], | |
[ | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"Lo siento, ¿podrías decir eso de nuevo?" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
} | |
], | |
[ | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"Por supuesto, te transferiré a nuestro departamento de ventas donde podrás recibir asistencia personalizada." | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
}, | |
{ | |
"channel": "", | |
"liveAgentHandoff": { | |
"metadata": { | |
"fields": { | |
"DERIVATE_TO": { | |
"stringValue": "DIALER", | |
"kind": "stringValue" | |
}, | |
"DIALER_OPTS": { | |
"stringValue": "inbound,...", | |
"kind": "stringValue" | |
}, | |
"DF_ACCOUNT": { | |
"stringValue": "0980s98f0sd9fs0", | |
"kind": "stringValue" | |
} | |
} | |
} | |
}, | |
"message": "liveAgentHandoff" | |
}, | |
{ | |
"channel": "", | |
"endInteraction": {}, | |
"message": "endInteraction" | |
} | |
] | |
] | |
} | |
}, | |
"examples": [ | |
{ | |
"request": { | |
"languageCode": "es", | |
"event": { | |
"event": "WELCOME" | |
}, | |
"input": "event" | |
}, | |
"response": [ | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"Hola, gracias por llamarme aqui, por favor dime si necesitas hablar con el departamento de ventas o con atención al cliente" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
}, | |
{ | |
"channel": "", | |
"payload": { | |
"fields": { | |
"template": { | |
"stringValue": "template_con_botones_saludo_inicial", | |
"kind": "stringValue" | |
}, | |
"another": { | |
"stringValue": "thing", | |
"kind": "stringValue" | |
} | |
} | |
}, | |
"message": "payload" | |
} | |
] | |
}, | |
{ | |
"request": { | |
"languageCode": "es", | |
"text": { | |
"text": "mensaje número 1" | |
}, | |
"input": "text" | |
}, | |
"response": [ | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"¿Puedes decir eso una vez más?" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
} | |
] | |
}, | |
{ | |
"request": { | |
"languageCode": "es", | |
"text": { | |
"text": "mensaje número 2" | |
}, | |
"input": "text" | |
}, | |
"response": [ | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"Lo siento, ¿podrías decir eso de nuevo?" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
} | |
] | |
}, | |
{ | |
"request": { | |
"languageCode": "es", | |
"text": { | |
"text": "transfiere me al departamento de venta" | |
}, | |
"input": "text" | |
}, | |
"response": [ | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"Lo siento, ¿podrías decir eso de nuevo?" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
} | |
] | |
}, | |
{ | |
"request": { | |
"languageCode": "es", | |
"text": { | |
"text": "departamento de ventas" | |
}, | |
"input": "text" | |
}, | |
"response": [ | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"Por supuesto, te transferiré a nuestro departamento de ventas donde podrás recibir asistencia personalizada." | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
}, | |
{ | |
"channel": "", | |
"liveAgentHandoff": { | |
"metadata": { | |
"fields": { | |
"DERIVATE_TO": { | |
"stringValue": "DIALER", | |
"kind": "stringValue" | |
}, | |
"DIALER_OPTS": { | |
"stringValue": "inbound,...", | |
"kind": "stringValue" | |
}, | |
"DF_ACCOUNT": { | |
"stringValue": "0980s98f0sd9fs0", | |
"kind": "stringValue" | |
} | |
} | |
} | |
}, | |
"message": "liveAgentHandoff" | |
}, | |
{ | |
"channel": "", | |
"endInteraction": {}, | |
"message": "endInteraction" | |
} | |
] | |
} | |
] | |
}, | |
"examples": [ | |
[ | |
{ | |
"request": { | |
"languageCode": "es", | |
"event": { | |
"event": "WELCOME" | |
}, | |
"input": "event" | |
}, | |
"response": [ | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"Hola, gracias por llamarme aqui, por favor dime si necesitas hablar con el departamento de ventas o con atención al cliente" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
}, | |
{ | |
"channel": "", | |
"payload": { | |
"fields": { | |
"template": { | |
"stringValue": "template_con_botones_saludo_inicial", | |
"kind": "stringValue" | |
}, | |
"another": { | |
"stringValue": "thing", | |
"kind": "stringValue" | |
} | |
} | |
}, | |
"message": "payload" | |
} | |
] | |
}, | |
{ | |
"request": { | |
"languageCode": "es", | |
"text": { | |
"text": "mensaje número 1" | |
}, | |
"input": "text" | |
}, | |
"response": [ | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"¿Puedes decir eso una vez más?" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
} | |
] | |
}, | |
{ | |
"request": { | |
"languageCode": "es", | |
"text": { | |
"text": "mensaje número 2" | |
}, | |
"input": "text" | |
}, | |
"response": [ | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"Lo siento, ¿podrías decir eso de nuevo?" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
} | |
] | |
}, | |
{ | |
"request": { | |
"languageCode": "es", | |
"text": { | |
"text": "transfiere me al departamento de venta" | |
}, | |
"input": "text" | |
}, | |
"response": [ | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"Lo siento, ¿podrías decir eso de nuevo?" | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
} | |
] | |
}, | |
{ | |
"request": { | |
"languageCode": "es", | |
"text": { | |
"text": "departamento de ventas" | |
}, | |
"input": "text" | |
}, | |
"response": [ | |
{ | |
"channel": "", | |
"text": { | |
"text": [ | |
"Por supuesto, te transferiré a nuestro departamento de ventas donde podrás recibir asistencia personalizada." | |
], | |
"allowPlaybackInterruption": false | |
}, | |
"message": "text" | |
}, | |
{ | |
"channel": "", | |
"liveAgentHandoff": { | |
"metadata": { | |
"fields": { | |
"DERIVATE_TO": { | |
"stringValue": "DIALER", | |
"kind": "stringValue" | |
}, | |
"DIALER_OPTS": { | |
"stringValue": "inbound,...", | |
"kind": "stringValue" | |
}, | |
"DF_ACCOUNT": { | |
"stringValue": "0980s98f0sd9fs0", | |
"kind": "stringValue" | |
} | |
} | |
} | |
}, | |
"message": "liveAgentHandoff" | |
}, | |
{ | |
"channel": "", | |
"endInteraction": {}, | |
"message": "endInteraction" | |
} | |
] | |
} | |
] | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment