For instance, let’s say you want to create a dialog conversation to send OTP to a user. The steps for this are as follows:
1) Click on Dialog on the left navigation bar and then click on Homepage. Then click on the Create one button to create a dialog for sending OTP to a user.
2) Now give a name for the dialog like, “Sending OTP to a User” and click on the create button.
3) Type OTP in the Select Intent field and click on “Create New “OTP”” that appears below.
4) Now we must give examples for the newly created OTP Intent so that the Assistant can recognize the dialog for it from the user’s input. You’ll be greeted by the Add Example pop up. Add phrases that you would expect from a user for a password reset request. For example, it can be send otp, One Time Password, etc.,
5) After adding the examples, click on the Save button. Now we can move on to creating a conversation flow.
6) Now click on the + sign that appears next to the first node when you hover the pointer next to the node.
7) Select Options on the pop-up menu that appears. On that, type in what you would like the Assistant to ask the user. It can be What do you want me to do today? Then specify an option like Send OTP and give its value as send otp since we gave it as an example inside the OTP Intent. Then click on Save.
8) You’ll see that a child node/conversation flow called Password reset has been created since we didn’t switch off the Create Child Node button on the Options pop up.
9) Click on the pencil icon that appears on the Sending OTP to a User node when you hover your pointer over that node to edit the Intent for that node. Select OTP in Select Intent field and click on Save.
10) Now create a message that you want the Assistant to display to the user like Please enter your mobile number. Click on the ✓ sign and then click on the Save button.
11) Now click on Get Details so that the Assistant can validate and store the user’s mobile number from their input.
12) Select the sys-mobilenumber system entity for helping the Assistant validate the User’s mobile number input and give phonenumber in the Save it as field. In the If not present, ask user field, give it as Please enter a valid mobile number. Then click on the ✓ sign and then click on Ok.
13) Now we need to call the OTP automation for sending the OTP to the user that we created earlier. For this, click on Call an Automation on the pop-up menu that appears when you click on the + sign that appears next to the Get Details node that we created earlier.
14) On the Call Automation pop up, Select OTP under the Select Automation dropdown and name the automation dialog node as Sending OTP in the Name your Automation field. Then under the mobile number field, map the phonenumber context variable input collected from the user and click on Ok. This is how you’ll have to map a dialog’s context variables as inputs to an automation’s input values.