Knowledge Center next icon Creating an End-To-End Integrated Dialog
Nov 21, 2023
21 minutes read

Creating an End-To-End Integrated Dialog

This guide will talk you through creating a more elaborate dialog when compared to the dialog that’s built in the “Getting Started With Dialogs” page.

In this guide you’ll be building out an order status dialog that:

  • Asks the end-user for input using the “Capture Input” node type and validates that same input
  • Performs an API call to an external API using the “API Callout” node type to retrieve an order based on the input provided by the end-user
  • Validates the response of that API call using the “Logical Step” node type
  • And returns the end-user the status of their order
  • Should the order not be found, we’ll provide the customer with the ability to go back to the start of the dialog using the “Go To” node type, or to wrap up the dialog.

As stated in the “introduction to Dialogs” page, a dialog is a collection of dialog nodes connected to provide an end-to-end conversational experience.

In this guide we’ll be using all dialog node types to realize our use case:

  • Recognition
  • Capture Input
  • API Callout
  • Logical Step
  • Output
  • Go To

How to Retrieve Order Status Using Dialogs

1. Navigate to https://cms.digitalcx.com

2. Click this button to create an End-To-End integrated Dialog.

image.png


3. Click this field and assign an appropriate name to your new dialog.

image.png

4. Don't forget to add a corresponding description of your dialog and click on "Create".

image.png


5. In this dialog we'll start with creating a recognition node.

image.png


6. After adding the recognition node click on "Edit Output" to edit the output of this node.

image.png


7. Click here to start typing.

image.png

8. Click on "Add answer" once you have finished inputting your text.

image.png


9. Click here or the "X" button to exit to the dialog overview.

image.png


10. Next, we'll incorporate a capture input node.

image.png


11. Click the "Add recognition..." field to add recognition.

image.png


12. In this dialog we want to make it possible to retrieve an order status. In this case I'll fill: "I want to retrieve my order status" for the recognition.

13. Click this button to add your recognition for this node.

image.png

14. Click here to activate the quick reply.

image.png
image.png


15. Now go back to your capture input node and click on "Edit Output".

image.png


16. Begin typing by clicking here. Whatever you enter will be displayed when the designated recognition or selected dialog option is triggered. In this case I want to capture the email of the customer.

image.png


17. Click "Add answer"

image.png


18. Click here or the "X" button to exit to the dialog overview.

image.png


19. Click on "Dialog variables" to create a new dialog variable.

image.png


20. Click the "Variable name..." field.

image.png


21. Type "email"

22. Click this button.

image.png


23. Click here to close the window.

image.png


24. Go back to your capture node and select the dialog variable which you have created in the previous step. This will capture the input of the user into this variable.

image.png


25. Click here to select your variable.

image.png

26. Click "Quick replies OR regex validation"
Allow quick replies or validate user input using regular expression" if you want to execute a check on the input of the user. This can be done on quick replies or by Regex validation.

image.png


27. Click the "Insert expression..." field to insert your regular expression.

image.png


28. At "Max retries" you can define a limit on the retries if the validation doesn't pass.

image.png


29. Click this field to fill in an error message.

image.png


30. In this case I'll type: "This is not a valid email".

31. Click this field to fill in a default value, which can be used at your logic step for e.g.

image.png


32. Now I add another "Capture Input" node because I want to retrieve the order number.

image.png


33. Click "Edit Output"

image.png


34. Begin typing by clicking here. Whatever you enter will be displayed when the designated recognition or selected dialog option is triggered. In this case I want to capture the order number of the customer.

image.png


35. Click "Add answer"

image.png


36. Click here or the "X" button to exit to the dialog overview.

image.png


37. Click "Dialog variables"

image.png


38. Click the "Variable name..." field and in this case I'll add a variable where I can save the order number into.

image.png


39. Click here to add your dialog variable.

image.png


40. Click here.

image.png


41. Click here to add the previously created variable where the input needs to be stored into.
image.png


42. Click here.

image.png


43. In the next step I want to do an "API Callout".

image.png


44. Click the "Enter URL... (required)" field to fill in your endpoint.

image.png


45. Click "Success Handler"

image.png

46. Click "Dialog variables" and create a new dialog variable. In this case a variable where we can save the order status into.

image.png


47. Click the "Variable name..." field.

image.png

48. Type "orderstatus"


49. Click here to add your dialog variable.

image.png


50. Click here.


51. Click here to close the window.

image.png


52. Click "Store Response"

image.png


image.png


53. Click the "Select property... (required)" field and select a property from the response using JMESPath.

image.png


54. Click here to select a variable where to save the order status into.

image.png


55. Click here.

image.png


56. Click "orderstatus"

image.png


57. Click "Logical Step"

image.png


58. Click "Output"

image.png


59. Click "Add condition"

image.png


60. Click here to select your variable where you want to make the logic for.

image.png


61. In this case the I'll use the dialog variable "orderstatus".

image.png


62. Click on condition and define your requirements. In this case: "Not Empty".

image.png


63. Click "Edit Output"

image.png


64. Click here.

image.png


image.png


65. Click here to add your dialog variable to the output of this node.

image.png


66. Click here.

image.png


67. Click "Add answer"

image.png


68. Click here or the "X" button to exit to the dialog overview.

image.png


69. Now add another "Output" node for when there is no order found.

image.png


70. Click "Edit Output"

image.png

71. Click "Edit"

72. Click here.

image.png



73. Click "Update"

image.png


74. Click here.

image.png

75. Click on condition and define your requirements. In this case: "Empty".

image.png


76. Click here.

image.png

77. Click here and select the dialog variable where the logic check needs to be done on.

image.png


78. Click "orderstatus"

image.png


79. Click "Empty"

image.png

80. Click "Go To" and create a new node.

image.png


81. Click "Recognition"

image.png


82. Click "Set as fallback". What this will do is that if the logic doesn't pass the go to node will function as a fallback in this scenario.

image.png


83. Click "Save"

image.png

84. Go to your first node and click on: "Test from here" to test your dialog.

image.png


85. Click the "Type your question here" field.

image.png


86. Click "I want to retrieve my order status" and proceed testing your dialog.

image.png

group icon
Get support

Can’t find the answer you are looking for?
Ask for the help of our chatbot, or get in touch with our support team.

Contact Support
Is this region a better fit for you?
Go
close icon