diff --git a/Authentication/bg/cognitive-flow.json b/Authentication/bg/cognitive-flow.json index 4d18351..65deb48 100644 --- a/Authentication/bg/cognitive-flow.json +++ b/Authentication/bg/cognitive-flow.json @@ -23,14 +23,18 @@ "acknowledgements": [ "Влязохте успешно в системата." ], - "displayTemplate": { + "display": { "type": "login", - "title": "Вход Болница АСМЕ София", - "url": "https://bs-login.darvin.ai/login", - "image": "https://darvin.ai/img/logo.png" + "template": { + "title": "Вход Болница АСМЕ София", + "url": "https://bs-login.darvin.ai/login", + "image": "https://darvin.ai/img/logo.png" + } } }, - "persist-entities": ["auth"] + "persist-entities": [ + "auth" + ] }, "conversations": { "getting-started": { @@ -48,10 +52,13 @@ "messages": [ "С какво мога да ви асистирам?" ], - "quick-replies": [ - "Запазване на час", - "Връзка с оператор" - ] + "display": { + "type": "quick-reply", + "data": [ + "Запазване на час", + "Връзка с оператор" + ] + } } ] }, @@ -64,10 +71,6 @@ "messages": [ "Искаш ли да прехвърля разговора ни с човек от екипа на Болница ACME София?" ], - "quick-replies": [ - "Да", - "Не" - ], "validation": [ { "type": "match", @@ -81,7 +84,14 @@ "Добре, разбирам. Няма да те прехвърлям към оператор. Кажи ми отново с какво мога да ти помогна?" ] } - ] + ], + "display": { + "type": "quick-reply", + "data": [ + "Да", + "Не" + ] + } }, { "type": "message", @@ -98,7 +108,6 @@ "type": "question", "entity": "doctor", "entity-type": "Doctor", - "display": "{{context.FirstName}} {{context.LastName}}", "messages": [ "За кой лекар искате да си запишете час?" ], @@ -108,10 +117,6 @@ "ambiguity": [ "Не съм сигурен, че разбрах за кой доктор точно искате да си запишете час. Моля изберете доктор:" ], - "quick-reply-operation": { - "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctors?language=bg", - "method": "GET" - }, "validation": [ { "type": "custom", @@ -124,7 +129,15 @@ ] } ], - "protected": true + "protected": true, + "display": { + "type": "quick-reply", + "data-source": { + "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctors?language=bg", + "method": "GET" + }, + "template": "{{context.FirstName}} {{context.LastName}}" + } }, { "type": "question", @@ -133,10 +146,6 @@ "messages": [ "За кой ден искате да ви запиша час за {{context.doctor.Title}} {{context.doctor.FirstName}} {{context.doctor.LastName}}?" ], - "quick-reply-operation": { - "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctorDays?doctorId={{encodeURI context.doctor.ExternalId}}", - "method": "GET" - }, "validation": [ { "type": "custom", @@ -148,7 +157,14 @@ "За съжаление, {{context.doctor.Title}} {{context.doctor.FirstName}} {{context.doctor.LastName}} няма свободни часове за {{context.date}}." ] } - ] + ], + "display": { + "type": "quick-reply", + "data-source": { + "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctorDays?doctorId={{encodeURI context.doctor.ExternalId}}", + "method": "GET" + } + } }, { "type": "question", @@ -157,10 +173,6 @@ "messages": [ "За кой час искате да се видите с {{context.doctor.Title}} {{context.doctor.FirstName}} {{context.doctor.LastName}} на {{context.date}}?" ], - "quick-reply-operation": { - "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctorHours?doctorId={{encodeURI context.doctor.ExternalId}}&date={{encodeURI context.date}}", - "method": "GET" - }, "validation": [ { "type": "custom", @@ -172,7 +184,14 @@ "За съжаление, {{context.doctor.Title}} {{context.doctor.FirstName}} {{context.doctor.LastName}} не е свободна на {{context.date}} от {{context.time}}." ] } - ] + ], + "display": { + "type": "quick-reply", + "data-source": { + "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctorHours?doctorId={{encodeURI context.doctor.ExternalId}}&date={{encodeURI context.date}}", + "method": "GET" + } + } }, { "type": "question", @@ -200,10 +219,6 @@ "messages": [ "Запазвам ви час за {{context.doctor.Title}} {{context.doctor.FirstName}} {{context.doctor.LastName}} на {{context.date}} от {{context.time}}. Информацията правилна ли е?" ], - "quick-replies": [ - "Да", - "Не" - ], "validation": [ { "type": "match", @@ -217,11 +232,19 @@ "Добре, разбирам. Няма да запазвам този час все още. Каква е промяната, която искате да направите?" ] } - ] + ], + "display": { + "type": "quick-reply", + "data": [ + "Да", + "Не" + ] + } }, { "type": "webhook", - "request": { + "protected": true, + "data-source": { "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Appointments", "method": "POST", "headers": { @@ -234,8 +257,7 @@ "Date": "{{context.date}}", "Time": "{{context.time}}" } - }, - "protected": true + } }, { "type": "message", diff --git a/Authentication/en/cognitive-flow.json b/Authentication/en/cognitive-flow.json index c3cc59e..8359522 100644 --- a/Authentication/en/cognitive-flow.json +++ b/Authentication/en/cognitive-flow.json @@ -23,14 +23,18 @@ "acknowledgements": [ "You are now logged in." ], - "displayTemplate": { + "display": { "type": "login", - "title": "ACME Hospital - Login", - "url": "https://bs-login.darvin.ai/login", - "image": "https://darvin.ai/img/logo.png" + "template": { + "title": "ACME Hospital - Login", + "url": "https://bs-login.darvin.ai/login", + "image": "https://darvin.ai/img/logo.png" + } } }, - "persist-entities": ["auth"] + "persist-entities": [ + "auth" + ] }, "conversations": { "getting-started": { @@ -48,10 +52,13 @@ "messages": [ "Here is what I can do for you:" ], - "quick-replies": [ - "Book a doctor", - "Contact operator" - ] + "display": { + "type": "quick-reply", + "data": [ + "Book a doctor", + "Contact operator" + ] + } } ] }, @@ -64,10 +71,6 @@ "messages": [ "Do you want to continue the conversation with an operator?" ], - "quick-replies": [ - "Yes", - "No" - ], "validation": [ { "type": "match", @@ -81,7 +84,14 @@ "OK, I won't contact an operator yet. Let me know what you want to do next." ] } - ] + ], + "display": { + "type": "quick-reply", + "data": [ + "Yes", + "No" + ] + } }, { "type": "message", @@ -98,7 +108,6 @@ "type": "question", "entity": "doctor", "entity-type": "Doctor", - "display": "{{context.FirstName}} {{context.LastName}}", "messages": [ "What's the name of the doctor that you want to see?" ], @@ -108,10 +117,6 @@ "ambiguity": [ "I am not sure I understand the doctor you want to meet. Can you select one of the following?" ], - "quick-reply-operation": { - "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctors", - "method": "GET" - }, "validation": [ { "type": "custom", @@ -124,7 +129,15 @@ ] } ], - "protected": true + "protected": true, + "display": { + "type": "quick-reply", + "data-source": { + "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctors", + "method": "GET" + }, + "template": "{{context.FirstName}} {{context.LastName}}" + } }, { "type": "question", @@ -133,10 +146,6 @@ "messages": [ "What date do you want to meet with {{context.doctor.FirstName}} {{context.doctor.LastName}}?" ], - "quick-reply-operation": { - "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctorDays?doctorId={{encodeURI context.doctor.ExternalId}}", - "method": "GET" - }, "validation": [ { "type": "custom", @@ -148,7 +157,14 @@ "Unfortunately, {{context.doctor.Title}} {{context.doctor.FirstName}} {{context.doctor.LastName}} is not available on {{context.date}}." ] } - ] + ], + "display": { + "type": "quick-reply", + "data-source": { + "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctorDays?doctorId={{encodeURI context.doctor.ExternalId}}", + "method": "GET" + } + } }, { "type": "question", @@ -157,10 +173,6 @@ "messages": [ "What time do you want to meet {{context.doctor.FirstName}} {{context.doctor.LastName}} on {{context.date}}?" ], - "quick-reply-operation": { - "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctorHours?doctorId={{encodeURI context.doctor.ExternalId}}&date={{encodeURI context.date}}", - "method": "GET" - }, "validation": [ { "type": "custom", @@ -172,7 +184,14 @@ "Unfortunately, {{context.doctor.FirstName}} {{context.doctor.LastName}} is not available on {{context.date}} at {{context.time}}." ] } - ] + ], + "display": { + "type": "quick-reply", + "data-source": { + "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctorHours?doctorId={{encodeURI context.doctor.ExternalId}}&date={{encodeURI context.date}}", + "method": "GET" + } + } }, { "type": "question", @@ -200,10 +219,6 @@ "messages": [ "I am booking you an appointment for {{context.doctor.Title}} {{context.doctor.FirstName}} {{context.doctor.LastName}} on {{context.date}} at {{context.time}}. Can you please confirm that the information is correct?" ], - "quick-replies": [ - "Yes", - "No" - ], "validation": [ { "type": "match", @@ -217,11 +232,19 @@ "Let me know what you want to change before I can book you an appointment." ] } - ] + ], + "display": { + "type": "quick-reply", + "data": [ + "Yes", + "No" + ] + } }, { "type": "webhook", - "request": { + "protected": true, + "data-source": { "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Appointments", "method": "POST", "headers": { @@ -234,8 +257,7 @@ "Date": "{{context.date}}", "Time": "{{context.time}}" } - }, - "protected": true + } }, { "type": "message", @@ -246,4 +268,4 @@ ] } } -} +} \ No newline at end of file diff --git a/Blank/bg/cognitive-flow.json b/Blank/bg/cognitive-flow.json index c6bb5c0..5280a9a 100644 --- a/Blank/bg/cognitive-flow.json +++ b/Blank/bg/cognitive-flow.json @@ -28,10 +28,13 @@ "Това е началният разговор на твоя бот." ] ], - "quick-replies": [ - "Разговор 1", - "Разговор 2" - ] + "display": { + "type": "quick-reply", + "data": [ + "Разговор 1", + "Разговор 2" + ] + } } ] }, diff --git a/Blank/en/cognitive-flow.json b/Blank/en/cognitive-flow.json index 845b912..a5326cb 100644 --- a/Blank/en/cognitive-flow.json +++ b/Blank/en/cognitive-flow.json @@ -28,10 +28,13 @@ "This is a getting started conversation for your chatbot." ] ], - "quick-replies": [ - "Conversation 1", - "Conversation 2" - ] + "display": { + "type": "quick-reply", + "data": [ + "Conversation 1", + "Conversation 2" + ] + } } ] }, diff --git a/QuickStart/bg/cognitive-flow.json b/QuickStart/bg/cognitive-flow.json index fa78b5f..3de78c4 100644 --- a/QuickStart/bg/cognitive-flow.json +++ b/QuickStart/bg/cognitive-flow.json @@ -32,10 +32,13 @@ "messages": [ "С какво мога да ви асистирам?" ], - "quick-replies": [ - "Запазване на час", - "Връзка с оператор" - ] + "display": { + "type": "quick-reply", + "data": [ + "Запазване на час", + "Връзка с оператор" + ] + } } ] }, @@ -48,10 +51,6 @@ "messages": [ "Искаш ли да прехвърля разговора ни с човек от екипа на Болница ACME София?" ], - "quick-replies": [ - "Да", - "Не" - ], "validation": [ { "type": "match", @@ -65,7 +64,14 @@ "Добре, разбирам. Няма да те прехвърлям към оператор. Кажи ми отново с какво мога да ти помогна?" ] } - ] + ], + "display": { + "type": "quick-reply", + "data": [ + "Да", + "Не" + ] + } }, { "type": "message", @@ -82,7 +88,6 @@ "type": "question", "entity": "doctor", "entity-type": "Doctor", - "display": "{{context.FirstName}} {{context.LastName}}", "messages": [ "За кой лекар искате да си запишете час?" ], @@ -92,10 +97,6 @@ "ambiguity": [ "Не съм сигурен, че разбрах за кой доктор точно искате да си запишете час. Моля изберете доктор:" ], - "quick-reply-operation": { - "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctors?language=bg", - "method": "GET" - }, "validation": [ { "type": "custom", @@ -104,10 +105,18 @@ "expected-response": "OK" }, "error-message": [ - "За съжаление, {{context.doctor.Title}} {{context.doctor.FirstName}} {{dcontext.octor.LastName}} няма свободни часове за момента." + "За съжаление, {{context.doctor.Title}} {{context.doctor.FirstName}} {{context.doctor.LastName}} няма свободни часове за момента." ] } - ] + ], + "display": { + "type": "quick-reply", + "data-source": { + "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctors?language=bg", + "method": "GET" + }, + "template": "{{context.FirstName}} {{context.LastName}}" + } }, { "type": "question", @@ -116,10 +125,6 @@ "messages": [ "За кой ден искате да ви запиша час за {{context.doctor.Title}} {{context.doctor.FirstName}} {{context.doctor.LastName}}?" ], - "quick-reply-operation": { - "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctorDays?doctorId={{encodeURI context.doctor.ExternalId}}", - "method": "GET" - }, "validation": [ { "type": "custom", @@ -131,7 +136,14 @@ "За съжаление, {{context.doctor.Title}} {{context.doctor.FirstName}} {{context.doctor.LastName}} няма свободни часове за {{context.date}}." ] } - ] + ], + "display": { + "type": "quick-reply", + "data-source": { + "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctorDays?doctorId={{encodeURI context.doctor.ExternalId}}", + "method": "GET" + } + } }, { "type": "question", @@ -140,10 +152,6 @@ "messages": [ "За кой час искате да се видите с {{context.doctor.Title}} {{context.doctor.FirstName}} {{context.doctor.LastName}} на {{context.date}}?" ], - "quick-reply-operation": { - "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctorHours?doctorId={{encodeURI context.doctor.ExternalId}}&date={{encodeURI context.date}}", - "method": "GET" - }, "validation": [ { "type": "custom", @@ -155,7 +163,14 @@ "За съжаление, {{context.doctor.Title}} {{context.doctor.FirstName}} {{context.doctor.LastName}} не е свободна на {{context.date}} от {{context.time}}." ] } - ] + ], + "display": { + "type": "quick-reply", + "data-source": { + "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctorHours?doctorId={{encodeURI context.doctor.ExternalId}}&date={{encodeURI context.date}}", + "method": "GET" + } + } }, { "type": "question", @@ -184,10 +199,6 @@ "messages": [ "Запазвам ви час за {{context.doctor.Title}} {{context.doctor.FirstName}} {{context.doctor.LastName}} на {{context.date}} от {{context.time}}. Информацията правилна ли е?" ], - "quick-replies": [ - "Да", - "Не" - ], "validation": [ { "type": "match", @@ -201,11 +212,18 @@ "Добре, разбирам. Няма да запазвам този час все още. Каква е промяната, която искате да направите?" ] } - ] + ], + "display": { + "type": "quick-reply", + "data": [ + "Да", + "Не" + ] + } }, { "type": "webhook", - "request": { + "data-source": { "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Appointments", "method": "POST", "headers": { diff --git a/QuickStart/en/cognitive-flow.json b/QuickStart/en/cognitive-flow.json index 34d1249..e912833 100644 --- a/QuickStart/en/cognitive-flow.json +++ b/QuickStart/en/cognitive-flow.json @@ -32,10 +32,13 @@ "messages": [ "Here is what I can do for you:" ], - "quick-replies": [ - "Book a doctor", - "Contact operator" - ] + "display": { + "type": "quick-reply", + "data": [ + "Book a doctor", + "Contact operator" + ] + } } ] }, @@ -48,10 +51,6 @@ "messages": [ "Do you want to continue the conversation with an operator?" ], - "quick-replies": [ - "Yes", - "No" - ], "validation": [ { "type": "match", @@ -65,7 +64,14 @@ "OK, I won't contact an operator yet. Let me know what you want to do next." ] } - ] + ], + "display": { + "type": "quick-reply", + "data": [ + "Yes", + "No" + ] + } }, { "type": "message", @@ -82,7 +88,6 @@ "type": "question", "entity": "doctor", "entity-type": "Doctor", - "display": "{{context.FirstName}} {{context.LastName}}", "messages": [ "What's the name of the doctor that you want to see?" ], @@ -92,10 +97,6 @@ "ambiguity": [ "I am not sure I understand the doctor you want to meet. Can you select one of the following?" ], - "quick-reply-operation": { - "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctors", - "method": "GET" - }, "validation": [ { "type": "custom", @@ -107,7 +108,15 @@ "Unfortunately, {{context.doctor.Title}} {{context.doctor.FirstName}} {{context.doctor.LastName}} is not available." ] } - ] + ], + "display": { + "type": "quick-reply", + "data-source": { + "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctors", + "method": "GET" + }, + "template": "{{context.FirstName}} {{context.LastName}}" + } }, { "type": "question", @@ -116,10 +125,6 @@ "messages": [ "What date do you want to meet with {{context.doctor.FirstName}} {{context.doctor.LastName}}?" ], - "quick-reply-operation": { - "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctorDays?doctorId={{encodeURI context.doctor.ExternalId}}", - "method": "GET" - }, "validation": [ { "type": "custom", @@ -131,7 +136,14 @@ "Unfortunately, {{context.doctor.Title}} {{context.doctor.FirstName}} {{context.doctor.LastName}} is not available on {{context.date}}." ] } - ] + ], + "display": { + "type": "quick-reply", + "data-source": { + "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctorDays?doctorId={{encodeURI context.doctor.ExternalId}}", + "method": "GET" + } + } }, { "type": "question", @@ -140,10 +152,6 @@ "messages": [ "What time do you want to meet {{context.doctor.FirstName}} {{context.doctor.LastName}} on {{context.date}}?" ], - "quick-reply-operation": { - "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctorHours?doctorId={{encodeURI context.doctor.ExternalId}}&date={{encodeURI context.date}}", - "method": "GET" - }, "validation": [ { "type": "custom", @@ -155,7 +163,14 @@ "Unfortunately, {{context.doctor.FirstName}} {{context.doctor.LastName}} is not available on {{context.date}} at {{context.time}}." ] } - ] + ], + "display": { + "type": "quick-reply", + "data-source": { + "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Functions/GetDoctorHours?doctorId={{encodeURI context.doctor.ExternalId}}&date={{encodeURI context.date}}", + "method": "GET" + } + } }, { "type": "question", @@ -184,10 +199,6 @@ "messages": [ "I am booking you an appointment for {{context.doctor.Title}} {{context.doctor.FirstName}} {{context.doctor.LastName}} on {{context.date}} at {{context.time}}. Can you please confirm that the information is correct?" ], - "quick-replies": [ - "Yes", - "No" - ], "validation": [ { "type": "match", @@ -201,11 +212,18 @@ "Let me know what you want to change before I can book you an appointment." ] } - ] + ], + "display": { + "type": "quick-reply", + "data": [ + "Yes", + "No" + ] + } }, { "type": "webhook", - "request": { + "data-source": { "endpoint": "https://api.everlive.com/v1/niuqpjk7bubu0282/Appointments", "method": "POST", "headers": { @@ -228,4 +246,4 @@ ] } } -} +} \ No newline at end of file