Dialog Flows [v4.6.1]

For versions:4.6.1

Dialog Flows

In this section we will explain how to make an easy dialog. A dialog is a branching conversation flow that defines responses to the defined intents and entities. You use the dialog in the menu ‘Dialog flow‘ to create conversations with users to provide responses.

  • Login as ‘Trainer‘, for the 3Dolphins SRM login mechanism, do the steps described on the ‘Login‘ page,
  • Go to Bot Settings and click the dialog flow menus, then you will see a dialog flow page such as images below.

Component explanation of dialog management :

IconName of IconDescription
Clone DialogThe trainer can cloning of dialog.
Edit DialogThe trainer can edit/update dialog to update information.
Delete DialogThe trainer can delete dialog.

Create New Dialog

Chatbots are known for their human-like conversational abilities. To generate better user experiences, you can use dialogue flow to make human-chatbot conversations more humane. In 3Dolphins, dialog flow is the crucial aspect that makes chatbots to conduct contextual communications.

The dialogue flow defines the actual dialogue context. For example, a user might say “find the nearest ATM in central jakarta”, then in the middle of that conversation the user might say “find a hotel in central jakarta”, the dialogue flow allows us to do that.

In the upper right corner, click +new dialog button. Then, you will see a page to create new dialog, such as image below.

Dialog Flow consists of 4 steps that must be completed, that is :

  • Intention & Entity
    Determine the intention and entity needed in a dialog.
  • Prompt Response
    Set the response of bots to each predetermined entity.
  • Integration
    Entity from user response can be used to query (get data) through SDK integration web service.
  • Configuration
    Set the confident level of each entity, success response, failed response, until unrecognized response before the save process is performed for the build model.

Description of conversation model in dialog :

IconName of IconDescription
Dialog FallbackTo display failed responses from bots that are in the dialog if there is a fallback.
Term and SynonymTo set the word similarity level or the similarity of words from the user response to the FAQ or dialog understood by the bot.
Transition ResponseTrigger to save the session dialog to be asked again when the user calls another dialog, after another dialog that is called is finished, the Bot will resume the previous dialog session.

Define Intention & Entity from User Response

  • Enter dialog conversation flow that defines responses to the defined intention and entities. An intention represents the purpose of a user’s input. You define an intent for each type of user request. An entity represents a term or object that is relevant to your intents and that provides a specific context for an intent.
  • Select the word that will be used as the intention or entity. And you can delete the intention & entity that has been created.
  • Click the next button to proceed to stage 2 ‘Prompt Response‘.

Define Entity Bot Response

3Dolphins will be redirect you to next proceed to stage 2 “Prompt Response“. uses a prompt response to ask the user for input. A prompt response is a special type of dialog that asks for user input, confirmation for a response, and returns the response to the next step. The user can respond with any text and the bot must decide how to handle the response.

  • On the ‘Prompt Response‘ page, you can switch your prompt by drag and drop icon. And, to fill out question response, click the button,
  • 3Dolphins will be redirect you to pop up of form question, fill out [$output$] . Functions of [$output$] is to display the output of the SDK.
  • Set the entity rules. Function of entity rule is to set the entity rules use MVEL rules (java syntax). For example, entity==”fill in the entity”.

Component explanation of action rule :

Action RuleDescription
Clear AllTo delete the contents of all entities.
Clear CurrentTo delete the contents of all entities the rule has been set.
Clear VariableTo delete the contents of all entities the selected.
Skip VariableTo set the skip entity will not be asked by Bot.
Trigger DialogTo call another dialog. For example, entity==“yes”.
  • Set up the entity values,
  • lick next button to proceed to stage 3 ‘Integration‘.

3Dolphins will be redirect you to next proceed to stage 3 “Integration“. Each entity value can be used to create data requests (queries), click toggle ‘FINAL‘ to integrate SDK on dialog.

  • In a 3Dolphins SDK section, select and attach your SDK.
  • In a rest service section, enter authentication, click “Build Configuration” button,
  • Click next button, to proceed to stage 4 “Configuration“.

Configure Final Response

3Dolphins will be redirect you to next proceed to stage 4 “Configuration“,

Component explanation of configuration dialog :

Response DialogDescription
Success ResponseWill display the response from the dialog that you created.
Failed ResponseWhen the sdk is not working as it should, which is when the SDK is set to failed response.
Cancel ResponseResponse given by the bot when the customer sends a cancel response.
Unknown ResponseWhen the customer sends a question that does not match the dialog, the bot will send an unknown response.

Build Dialog Model

  • Click ‘save and build‘ button. And then, 3Dolphins will be redirect you to pop up form save and train dialog. Enter dialog name and choose language, click ‘Build Dialog‘ button, such as image below.
  • If add new dialog is success, system will appears pop up success notification such as image below.

Test the dialog in the bot emulator

  • Go to Bot Settings and click the bot manager menus, then you will see a bot manager page, select bot and click emulator button ‘‘.
Please, make sure that the Dialog that will be used is already attached in Bot.

You will see a pop up form emulator, enter what user might says. Then, you will see a successful response, click “Send Location” button like the image below.

  • Enter your address, click “Search” button,

Change Contact Name

Get Customer

Get User Token

API Configuration

3Dolphins SRM Bot Macro Commands

CommandsDescription
{bot_name}Print bot name
{customer_name}Print customer name based on messenger profile
[$output$]Print output value from integration in Dialog
$entity$Print entity value

JSON Body Request for 3Dolphin SRM Dialog Rest Integration

Request Sample
{
“intent”:{
“intention”:”Ask Policy”,
“integration”:”{\”type\”:\”rest\”,\”sdkConfig\”:{\”trigger\”:[{\”sdkId\”:\”d030ad9e-2f9d-49fa-81d4-ff6920040312\”,\”promptVariable\”:\”FINAL\”,\”endpointUrl\”:\”\”,\”endpointUrlCommand\”:\”http://localhost:8081/customers\”,\”httpMethod\”:\”POST\”,\”map\”:{\”name\”:\”name\”,\”account\”:\”account\”},\”headers\”:{},\”basicAuth\”:{}}]}}”,
“id”:”737d4ec8f13f226f8c2dc87fa39172a3″,
“botId”:”d59c76210a010240a17bdfd2b94751d6″,
“ticket”:{
“accountId”:”21232f297a57a5a743894a0e4a801fc3″,
“accountName”:”admin@inmotion.co.id”,
“accountScreen”:”admin@inmotion.co.id”,
“channel”:”EMULATOR”,
“channelKey”:”EMULATOR”,
“channelType”:”EMULATOR”,
“message”:”123456″,
“ticketNumber”:”EM-1534275213434″,
“ticketOwner”:”21232f297a57a5a743894a0e4a801fc3″,
“termsMap”:{
“question_term”:[
],
“sconj_term”:[
],
“noun_term”:[
],
“verb_term”:[
],
“pron_term”:[
],
“primary_term”:[
“123456”
]
},
“module”:””,
“context”:””
}
},
“parameters”:[
{
“name”:”intention”,
“value”:”73840234″
},
{
“name”:”name”,
“value”:”Rena”
},
{
“name”:”account”,
“value”:”123456″
}
],
“promptVariable”:”FINAL”
}

JSON Body Response for 3Dolphin SRM Dialog Rest Integration

Response Sample
{
“value”: {
“output”: “Data Customer Account 1234567y\nNama: Reja\nSetoran tiap bulan : Rp. 500,000\nJatuh tempo berikutnya : 15 Agustus 2018”
},
“next”: true,
“success”: true,
“repeat”: false,
“agent”: false
}
ParameterValueDescription
NextTrueDialog will continue to next entity.
SuccessTrueDialog will print success response.
RepeatTrueDialog will repeat from the intention.
AgentTrueTicket will transfer to available agent.
Was this article helpful?
Dislike 0