Skip to main content

Dialog API

Querying the dialog engine

The dialog engine can be queried by web services. Depending of what you are using, you must use either a web service in synchronous mode or a web service in asynchronous mode:

  • A dialog in synchronous mode implies that the dialog engine will only respond when asked by a user's question. In the sequence diagram below, the talk dialog requests are synchronous and the result contains the bot's answer;
  • A dialog in asynchronous mode implies that the dialog engine can send messages without having been requested. In the sequence diagram below, the feedback dialog requests are asynchronous and no feedback is expected.

Synchronous dialog web service

You can use the swagger interface available from Preferences > Api > API access. Click the link available and click Chat.

This web service is in REST mode, accessible via HTTP GET or HTTP POST.

Parameters

Here are the parameters of the queries to the web service:

Parameters
contextIdDialog ID
The response of the web service will contain, among others, the value to be later on given to this field to gather all the interactions in a single dialog. An interaction is part of a dialog only if they have the same contextID. On the server side, when the context ID is unused for 10 minutes, the dialog is archived and this ID is revoked. If an invalid or revoked context ID is sent to the web service, the server will ignore it and create a new valid context ID. This parameter is sent the first time by the server with the first query, then it has to be filled in the entry parameters for the next requests.
botUUIDBot ID (Bot identification)
 The bot ID can be found on the page Préférences > Api > API access.
userInputUser Input)
 This parameter contains the user question. Only the first 600 characters of the question are taken into account by the dialog engine.
spaceConsultation space
 The consultation space to be used can be sent to the dialog box thanks to this parameter. So no consultation space is used over others, this parameters has to be set to Default.
languageISO code of the language (fr, en, nl) or language selection in swagger
 The language parameter is useful when the bot is multilingual.This parameter shows the default language of the bot. If the user talks to the bot in another language that it can handle, it will answer anyway in the used language.
alreadyCameInformation if user has already come
 This parameter shows if the user has already come.The true value shows that the user has already come.. The false value shows that the user has never come before.
clientIdUser ID (User identification)
 If this parameter is not filled in, the dialog will be anonymous.If this parameter is filled in, which can happen if the dialog box is used in a connected space of the website, this ID will be linked to the conversation. In the back office, on the dialog reading page, the user name will only be shown to admins.
userUrlUser URL (User current url)
 This parameter shows the URL from which the question was asked.
browserBrowser
 This parameter shows the browser used by the user.
osOS (Operating System)
 This parameter shows the user's OS
enableLanguageDetectionLanguage detection
 This parameter shows if language detection is enabled.When set to true, language detection is enabled. When set to false, language detection is off.
contextTypeDialog context
 This parameter shows the the context of the dialog:
- Web ;
- Vocal ;
- Android ;
- iOS.
qualificationModeQualification mode
 This parameter shows if the questions asked to the bot are in qualification mode. By setting it to true, knowledge items are published and usable. Dialogs are not counted in the analytics. By setting it to false, only already published knowledge items can be used. Dialogs are counted in analytics. This setting is false by default.
solutionUsedSolution used
 This parameter shows the type of solution used: assistant, livechat, etc.
pureLiveChatpureLiveChat
 This parameter shows if the pureLiveChat option is enabled.If true, the option pureLivechat is enabled. If false, the option pureLivechat is disabled.
extraParametersQuestion type
 This parameter shows the query is of a special type.By default, if no type is filled in, the query will be shown as entered by the user.
It is useful if the bot has, for example, reworded and the user has clicked on one of the rewords, or if the answer contained clickable links (to another answer or a URL). This parameters lets you indicate the question is of a different type.
It has no influence on the processing by the dialog engine, but help identify the origin of requests in analytics.
The available types are:
- reword_auto: click on one of the rewords suggested by the bot if the question was misunderstood;
- redirection: click on a URL in a bot answer with opening in the same tab;
- redirection_newpage : click on a URL in a bot answer with opening in a new tab;
- redirection_javascript: click on a URL in a bot answer with launch of a Javascript(ex: escalation to Livechat);
- redirection_knowledge: click on a URL in a bot answer with opening of another knowledge;
- redirection_consultation_space : click on a link when the bot did not have an answer in the current consultation space and suggested to the user to visit another consultation space;
- redirection_personnality
- before_close_dialog
- reword_teaser
- exportable_faq
- reword_feedback
variablescontext variables\
 This parameter allows to pass additional information to the bot. This information can then be used in the backoffice to give custom answers or answers that dependent of the use context.
They have to be sent as follows: {"Key1":"value1","Key2":"value2"}
For example, if the following context variables have to be shared:
name: dupont
InvoiceSum: 123.45
The contextVariables parameter will be: {"name":"dupont","InvoiceSum":"123.45"}
doNotRegisterInteractionInformation about dialog storage
 Setting this parameter to true disables saving interactions.Setting this parameter to false enables saving interactions
competencyOperator Competency
 This parameter shows the used operator competency.
timestampTime of the dialog
 This parameter shows the time of the dialog.
templateFormatsTemplate formats
 This parameter shows used format templates.
tag (ou tagID)Tags
 This parameter allows to include a tag.To insert the value of a tag, write in its name or tagID. To find the tagID of a tag: right click > inspect your subtag. Then, find the following code (for example):
div id="tag-6671"
Here, the tagID is 6671.
periodPeriod
 Allows to filter in a period. Possible values are: Today, Yesterday, Last7Days, CurrentMonth, LastMonth, Last30Days, Last3Months, Last6Months, Last12Months.
 Allows to exclude or include the gallery to which your knowledge base is linked. Setting it to true excludes the gallery. Setting is to false includes the gallery.
excludeGalleryContentExclude Gallery Content

QueriesChat

Retrieve a dialog context ID

Mandatory parametersOptional parameters
- botUUID- alreadyCame
- space- clientId
- language- os
- browser
- disableLanguageDetection
- ContextType
- qualificationMode
- solutionUsed
- pureLiveChat

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/context/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "**space**=Defaut&**language**=French&alreadyCame=true&clientId=jmanier&os=Linux&browser=Chrome&disableLanguageDetection=true&contextType=Web&qualificationMode=true&solutionUsed=ASSISTANT&pureLiveChat=false"

Body answer:

console.log('46064f7a-d026-4bf3-ab5d-69a9303a81e7');

Retrieve the list of previous dialogs associated to a user

Mandatory parametersOptional parameters
- botUUID
- solutionUsed
- clientId

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/dialog/previous/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "**solutionUsed**=ASSISTANT&**clientId**=jmanier"

Body answer:

{"values":{"previousDialogs":[]},"type":"getPreviousDialogsResponse"}

Send error

Mandatory parametersOptional parameters
- botUUID- browser
- contextUUID- os
- solutionUsed- stackTrace
- error- jsCreation
- message- userUrl

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/error/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "contextUuid=**e6a5ae08-703c-4ddd-9d57-fa07a8908f0d**&**solutionUsed**=ASSISTANT&**error**=js%20error&**message**=test%20error&browser=Chrome&os=Linux&stackTrace=stacktrace_value&jsCreation=jscreation_value&userUrl=doyoudreamup.com"

Body answer:

{}

Send satisfaction opinion

Mandatory parametersOptional parameters
- botUUID
- contextUUID
- solutionUsed
- feedBack

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/feedback/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "**contextUUID**=e6a5ae08-703c-4ddd-9d57-fa07a8908f0d&**solutionUsed**=ASSISTANT&**feedBack**=positive"

Send satisfaction without comment

Mandatory parametersOptional parameters
- botUUID
- contextUUID
- solutionUsed
- comment

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/feedback/comment/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "**contextUUID**=e6a5ae08-703c-4ddd-9d57-fa07a8908f0d&**solutionUsed**=ASSISTANT&**comment**=feedback_comment"

Send dissatisfaction opinion with selected reason

Mandatory parametersOptional parameters
- botUUID
- contextUUID
- solutionUsed
- choiceKey

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/feedback/insatisfaction/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "**contextUUID**=e6a5ae08-703c-4ddd-9d57-fa07a8908f0d&**solutionUsed**=ASSISTANT&**choiceKey**=choiceKey_value"

Save GDPR request

Mandatory parametersOptional parameters
- botUUID- language
- clientId
- object
- mail

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/gdpr/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "**clientId**=jmanier&**object**=Get&**mail**=jmanier%40dydu.ai&language=French"

Body answer:

{}

Retrieve dialog history

Mandatory parametersOptional parameters
- botUUID
- contextUUID
- solutionUsed
- dialog 

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/history/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "**contextUuid**=e6a5ae08-703c-4ddd-9d57-fa07a8908f0d&**solutionUsed**=ASSISTANT&**dialog**=ddce9eb2-4015-4c68-bf4c-e59f97096f81"

Body answer:

dydu_showDialogHistory();

Check if there is a new user answer (Livechat mode)

Mandatory parametersOptional parameters
- botUUID
- contextUUID
- solutionUsed
- language
- space
- lastPoll 

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/poll/last/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "**contextUuid**=e6a5ae08-703c-4ddd-9d57-fa07a8908f0d&**solutionUsed**=ASSISTANT&**language**=French&**space**=Defaut&**lastPoll**=12"

Body answer:

dydu_notification('{"code":"RGlhbG9nRmluaXNoZWQ=","context":null,"serverTime":1542034663648,"text":"TGEgY29udmVyc2F0aW9uIGVzdCB0ZXJtaW7DqWU="}');
DYDUServlet.closeDialog(true, false);

Perform a search in a bot's knowledge:

Mandatory parametersOptional parameters
- botUUID- language
- search
- searchInPersonalities

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/search/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "language=French&search=search_value&searchInPersonalities=true"

Body answer:

[]

Send an answer to a survey

Mandatory parametersOptional parameters
- botUUID- interactionSurveyAnswer
- contextUUID
- solutionUsed
- fields

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/survey/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "**contextUuid**=e6a5ae08-703c-4ddd-9d57-fa07a8908f0d&**solutionUsed**=ASSISTANT&**fields**=test_field&interactionSurveyAnswer=true"

Body answer:


Retrieve survey configuration

Mandatory parametersOptional parameters
- botUUID
- contextUUID
- solutionUsed
- language
- surveyId 

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/survey/configuration/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "**contextUuid**=e6a5ae08-703c-4ddd-9d57-fa07a8908f0d&**solutionUsed**=ASSISTANT&**language**=French&**surveyId**=20f4ab33-eb28-47d7-850c-60e5c6a352b3"

Body answer:

{"values":{"surveyId":"MjBmNGFiMzMtZWIyOC00N2Q3LTg1MGMtNjBlNWM2YTM1MmIz","name":"TmV3IHN1cnZleQ==","contextId":"ZTZhNWFlMDgtNzAzYy00ZGRkLTlkNTctZmEwN2E4OTA4ZjBk"},"type":"surveyConfigurationResponse"}

Send interaction without context specification (start new context)

Mandatory parametersOptional parameters
- botUUID- userUrl
- userInput- alreadyCame
- space- clientId
- language- os
- browser
- enableLanguageDetection
- contextType
- qualificationMode
- solutionUsed
- pureLiveChat
- extraParameters
- doNotRegisterInteraction
- competency
- timestamp
- templateFormats

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/talk/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "**userInput**=test&**space**=Defaut&**language**=French&userUrl=doyoudreamup.com&alreadyCame=true&clientId=jmanier&os=Linux&browser=Chrome&enableLanguageDectection=true&contextType=Web&qualificationMode=true&solutionUsed=ASSISTANT&pureLiveChat=false&extraParameters=extra_value&doNotRegisterInteraction=true&competency=marketing&timestamp=24&templateFormats=expert"

Body answer:

{"values":{"knowledgeId":168168,"typeResponse":"RE1VbmRlcnN0b29kUXVlc3Rpb24=","contextId":"NzlkNTBlOWYtNmU1ZC00MzBiLWE1ODUtZmIyYWFlZDNiMWJh","serverTime":1542038040852,"language":"ZnI=","botId":"ZWYwN2EzN2EtMmYzOC00NGYxLWEyYzQtZDJlNzFlN2M2ZDIw","text":"UXVlIHNvdWhhaXRlei12b3VzIHNhdm9pcsKgPzxici8+PGJyLz48YSBocmVmPSIjIiBjbGFzcz0icmV3b3JkIiBvbmNsaWNrPSJ0cnkge3Jld29yZCgnQ29tbWVudCB0ZXN0ZXIgbFwnYXNzaXN0YW50ID8nLHsmcXVvdDtsYXN0Y29uZGl0aW9uJnF1b3Q7OjE2ODg4MCwmcXVvdDt0eXBlJnF1b3Q7OiZxdW90O3JlZGlyZWN0aW9uX2tub3dsZWRnZSZxdW90O30pOyByZXR1cm4gZmFsc2U7fWNhdGNoKGUpe30iPkNvbW1lbnQgdGVzdGVyIGwnYXNzaXN0YW50wqA\/PC9hPjxici8+PGEgaHJlZj0iIyIgY2xhc3M9InJld29yZCIgb25jbGljaz0idHJ5IHtyZXdvcmQoJ0NvbW1lbnQgdXRpbGlzZXIgbGVzIGNvbnZlcnNhdGlvbnMgdGVzdHMgPycseyZxdW90O2xhc3Rjb25kaXRpb24mcXVvdDs6MTY4ODgwLCZxdW90O3R5cGUmcXVvdDs6JnF1b3Q7cmVkaXJlY3Rpb25fa25vd2xlZGdlJnF1b3Q7fSk7IHJldHVybiBmYWxzZTt9Y2F0Y2goZSl7fSI+Q29tbWVudCB1dGlsaXNlciBsZXMgY29udmVyc2F0aW9ucyB0ZXN0c8KgPzwvYT48YnIvPjxhIGhyZWY9IiMiIGNsYXNzPSJyZXdvcmQiIG9uY2xpY2s9InRyeSB7cmV3b3JkKCdDb21tZW50IHRlc3RlciBsZXMgdmFyaWFibGVzIGRlIGNvbnRleHRlID8nLHsmcXVvdDtsYXN0Y29uZGl0aW9uJnF1b3Q7OjE2ODg4MCwmcXVvdDt0eXBlJnF1b3Q7OiZxdW90O3JlZGlyZWN0aW9uX2tub3dsZWRnZSZxdW90O30pOyByZXR1cm4gZmFsc2U7fWNhdGNoKGUpe30iPkNvbW1lbnQgdGVzdGVyIGxlcyB2YXJpYWJsZXMgZGUgY29udGV4dGXCoD88L2E+","hasProfilePicture":false,"startLivechat":false,"keepPopinMinimized":false,"human":false,"askFeedback":true},"type":"talkResponse"}

Send interaction with specific context

Mandatory parametersOptional parameters
- botUUID- userUrl
- contextUUID- alreadyCame
- userInput- clientId
- space- os
- language- browser
- enableLanguageDetection
- contextType
- qualificationMode
- solutionUsed
- pureLiveChat
- extraParameters
- DoNotRegisterInteraction
- competency
- timestamp
- templateFormats

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/talk/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**/**e6a5ae08-703c-4ddd-9d57-fa07a8908f0d**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "**userInput**=test&**space**=Defaut&**language**=French&userUrl=doyoudreamup.com&alreadyCame=true&clientId=jmanier&os=Linux&browser=Chrome&enableLanguageDectection=true&contextType=Web&qualificationMode=true&solutionUsed=ASSISTANT&pureLiveChat=false&extraParameters=extra_value&doNotRegisterInteraction=true&competency=marketing&timestamp=24&templateFormats=expert"

Answer body:

{"values":{"knowledgeId":168168,"typeResponse":"RE1VbmRlcnN0b29kUXVlc3Rpb24=","contextId":"MzBiYTMyMjQtYzM0Mi00OTQ0LTg2NDAtMjRmODEwZGIyM2Iw","serverTime":1542039200149,"language":"ZnI=","botId":"ZWYwN2EzN2EtMmYzOC00NGYxLWEyYzQtZDJlNzFlN2M2ZDIw","text":"UXVlIHNvdWhhaXRlei12b3VzIHNhdm9pcsKgPzxici8+PGJyLz48YSBocmVmPSIjIiBjbGFzcz0icmV3b3JkIiBvbmNsaWNrPSJ0cnkge3Jld29yZCgnQ29tbWVudCB0ZXN0ZXIgbFwnYXNzaXN0YW50ID8nLHsmcXVvdDtsYXN0Y29uZGl0aW9uJnF1b3Q7OjE2ODg4MCwmcXVvdDt0eXBlJnF1b3Q7OiZxdW90O3JlZGlyZWN0aW9uX2tub3dsZWRnZSZxdW90O30pOyByZXR1cm4gZmFsc2U7fWNhdGNoKGUpe30iPkNvbW1lbnQgdGVzdGVyIGwnYXNzaXN0YW50wqA\/PC9hPjxici8+PGEgaHJlZj0iIyIgY2xhc3M9InJld29yZCIgb25jbGljaz0idHJ5IHtyZXdvcmQoJ0NvbW1lbnQgdXRpbGlzZXIgbGVzIGNvbnZlcnNhdGlvbnMgdGVzdHMgPycseyZxdW90O2xhc3Rjb25kaXRpb24mcXVvdDs6MTY4ODgwLCZxdW90O3R5cGUmcXVvdDs6JnF1b3Q7cmVkaXJlY3Rpb25fa25vd2xlZGdlJnF1b3Q7fSk7IHJldHVybiBmYWxzZTt9Y2F0Y2goZSl7fSI+Q29tbWVudCB1dGlsaXNlciBsZXMgY29udmVyc2F0aW9ucyB0ZXN0c8KgPzwvYT48YnIvPjxhIGhyZWY9IiMiIGNsYXNzPSJyZXdvcmQiIG9uY2xpY2s9InRyeSB7cmV3b3JkKCdDb21tZW50IHRlc3RlciBsZXMgdmFyaWFibGVzIGRlIGNvbnRleHRlID8nLHsmcXVvdDtsYXN0Y29uZGl0aW9uJnF1b3Q7OjE2ODg4MCwmcXVvdDt0eXBlJnF1b3Q7OiZxdW90O3JlZGlyZWN0aW9uX2tub3dsZWRnZSZxdW90O30pOyByZXR1cm4gZmFsc2U7fWNhdGNoKGUpe30iPkNvbW1lbnQgdGVzdGVyIGxlcyB2YXJpYWJsZXMgZGUgY29udGV4dGXCoD88L2E+","hasProfilePicture":false,"startLivechat":false,"keepPopinMinimized":false,"human":false,"askFeedback":true},"type":"talkResponse"}

Retrieve top used knowledge

Mandatory parametersOptional parameters
- botUUID- includeTagChildren
- solutionUsed- qualificationMode
- language- maxKnowledge
- space
- period
- tag

Note: you can also insert the tagID instead of the tag name (see details in parameter table).

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/topknowledge/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "**solutionUsed**=ASSISTANT&**language**=French&**space**=Defaut&**period**=period_value&**tag**=Tag_value&includeTagChildren=true&qualificationMode=true&maxKnowledge=5"

Body answer:

{"values":{"knowledgeArticles":"W3sicmV3b3JkIjoiQ29tbWVudCBjcsOpZXIgdW5lIGNvbm5haXNzYW5jZSA\/IiwicGF0aFRhZyI6IkNvbm5haXNzYW5jZXNcLzAxLiBDcsOpYXRpb24gZGUgY29ubmFpc3NhbmNlcyIsInVzYWdlIjotMS4wLCJpbnB1dENvbmRpdGlvbklkIjoyOTIxMX0seyJyZXdvcmQiOiJDb21tZW50IGNyw6llciB1biB0YWJsZWF1ID8iLCJwYXRoVGFnIjoiQ29ubmFpc3NhbmNlc1wvMDQuIFLDqXBvbnNlIMOgIHVuZSBxdWVzdGlvbiIsInVzYWdlIjotMS4wLCJpbnB1dENvbmRpdGlvbklkIjozMzg3Nn0seyJyZXdvcmQiOiJDb21tZW50IGNyw6llciB1bmUgbm91dmVsbGUgY29uZmlndXJhdGlvbiBwb3VyIG1vbiBjaGF0Ym90ID8iLCJwYXRoVGFnIjoiUHLDqWbDqXJlbmNlc1wvQ29uZmlndXJhdGlvbiBjaGF0Ym94IiwidXNhZ2UiOi0xLjAsImlucHV0Q29uZGl0aW9uSWQiOjM0NjA2fSx7InJld29yZCI6Ikd1aWRlcyBpbnRlcmFjdGlmcyIsInBhdGhUYWciOiJBcHBjdWVzIiwidXNhZ2UiOjIxLjAsImlucHV0Q29uZGl0aW9uSWQiOjMxODA4OX0seyJyZXdvcmQiOiJDcsOpYXRpb24gZCd1bmUgY29ubmFpc3NhbmNlIiwicGF0aFRhZyI6IkFwcGN1ZXMiLCJ1c2FnZSI6MTQuMCwiaW5wdXRDb25kaXRpb25JZCI6MzE4MDg3fV0=","serverTime":1542040024994,"tagName":"VGFnX3ZhbHVl"},"type":"topKnowledgeResponse"}

Send information about content typed in by user

Mandatory settingsOptional settings
- botUUID- typing
- contextUUID
- solutionUsed
- content

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/typing/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "**contextUuid**=e6a5ae08-703c-4ddd-9d57-fa07a8908f0d&**solutionUsed**=ASSISTANT&**content**=content_value&typing=true"

Body answer:

{}

Insert of delete a context variable

Mandatory parametersOptional parameters
- botUUID
- contextUUID
- solutionUsed
- name
- value 

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/variable/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "**contextUuid**=e6a5ae08-703c-4ddd-9d57-fa07a8908f0d&**solutionUsed**=ASSISTANT&**name**=test&**value**=1"

Store a user visit

Mandatory parametersOptional parameters
- botUUID- qualificationMode
- contextUUID
- solutionUsed
- language
- space

Curl request:

curl -X POST "https://app1.earth.doyoudreamup.com/servlet/api/chat/welcomecall/**ef07a37a-2f38-44f1-a2c4-d2e71e7c6d20**" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" -d "**contextUuid**=e6a5ae08-703c-4ddd-9d57-fa07a8908f0d&**solutionUsed**=ASSISTANT&**language**=French&**space**=Defaut&**qualificationMode**=true"

Body answer:

/*logged*/

Asynchronous dialog web service

The asynchronous web service works on the principle of websockets.

The protocol to use in websockets is named dyduchat.

This mechanism is especially useful when the user talks with an operator because then, the operator does not have to wait for a user's question to give an answer. They can speak first or send several messages to the user.

Customer requests

The client must send its requests in JSON format as described below:

Request talk**

The format of the request talk is as follows:

All field values ​​must be base64 encoded.

The parameters in the parameters field are the same as those defined for the REST web service from the synchronous mode.

Requests feedBack**

As in synchronous mode, no feedback is expected for feedBack requests.

All field values must be base64 encoded.

The values of the fields are the same as those defined for the synchronous mode REST web service.

Positive / Negative satisfaction

Reason for dissatisfaction

Commentary of dissatisfaction

Server Requests

Answer to display

Requests sent by the server tell the client that a message has been issued by an automated bot or by a human operator.

They can be sent without the user having made a request.

All parameters except human are exactly the same as for the Synchronous Mode REST web service.

The new human field indicates that the message is from a human operator if it is true.

Notification

Notifications are used to inform the user of some elements without replacing the last answer.

They can, for example, inform the user that the human operator is no longer connected.