I have created a sub intent dialog task in which i am using the entities from the main dialog task but i cant get/fetch the entities in sub intent task.
Hi @tabish13khan . Sub intents do not exist independently and they were to be called within other intents. Meaning, when the sub intents are invoked within dialog as linked dialog, the context of the parent dialog can be passed to the invoked sub intent by mapping the parameter values.
Below is an example. I have a created a subintent only dialog (This can only be used in other dialog and users can’t invoke it directly)
I have used an entity node in the sub intent only dialog and below is its configuration.
I have created a parent dialog with an entity node in it and am invoking the sub intent only dialog as a linked dialog.
Now at the instance properties of the sub intent invoked as dialog in the parent dialog, I am mapping the entity from parent to the subintent as follows:
Have executed the dialog and we see the entity data from parent is passed to the entity present in sub intent only dialog.
Mentioned below are some useful links to work around linked intents and sub intent:
Below are some questions we have for you:
- Are you using a sub intent only dialog or create a new intent within the parent dialog?
- Are you invoking the dialog within parent dialog as an intent or a dialog?
Could you please provide snapshots of your configuration so that we could debug and suggest further as needed?
Parent Dialog Task
sub intent only dialog
Sub intent dialog
i want to pass all context which i am having in the parent dialog.
is there more effecient way to pass all context value and entities to sub intent or i have to pass key/value for all required context value to be passed as i have logic depending on the parent dialog task value
I have followed above guidelines to get the values from one dialogue task to another dialogue task.
Please guide me how to get the parent dialogue task values to sub intent dialogue task
and creating the sub intent settings.
Thanks in advance
While executing a sub-intent, the data captured from the parent should be a part of the context data, so developer need configure any further to pass data.
Could you please explain more on your usecase so that I’d be able to help?
Hi, I am trying to capture Personel details like firstname , email , mobile no etc in 1st dialogue task.
In the second Dialogue Task i wanted to capture those details and like 3rd , 4 th Dialogue task.
In 1st task bot asking personal details i wanted to store and carry forward to next/entire coming tasks
Thanks in advance
Well, you could always use the session and context variables (Say, BotUserSession) to store values captures at entities of Dialog 1 using script nodes, set values to entities at other Dialogs of your bot referring to the values present in context variables.
Please refer to below link for more details
Thanks for your Reply i will implement it now and i have another query
can we show the default welcome message where should i write the welcome message like
"Hi ‘User Name’ Welcome to Our Application.
Thanks in advance
@jayaprakash.gurrapu, Yes, you can.
Please refer to the below snips wherein I have configured the onConnect event to show a message to the user.
Configuring the onconnect event to show a message displaying the username:
Bot displaying the name of the user in the chat window as configured at the event:
thanks for reply i have implemented.
When i am trying to enable web/mobile , newly created/developing bot is not visible in the dropdown list.
For this what should i do , is there any further steps i needed to do, to get this web/mobile channel enable.
thanks in advance.
@jayaprakash.gurrapu WebSDK works on web socket connection and uses the application that the developer could create on Bot Builder.
The developer could use an existing application which by selecting from the above dropdown or create a new application. Creating an application would generate a client ID and client Secret which needs to be configured at the webSDK for generating the JWT.
Please refer to the below link for details on enabling webSDK channel.
Also, we request you to please post your questions as new topics on community or even reply to related topics which wouldn’t deviate other developers on the community referring to this thread.
thank you for your reply.
Using a weather bot as an example, if a user simply asks what the weather is in New York, the bot responds with the answer. The user then asks “what about Los Angeles?”
After the bot initially responds with weather info for New York, I have it set to end the dialog . Does it need to stay open so it recognizes follow up questions like “what about Los Angeles” or “how about Miami?” Is this related to context output? I’m having a lot of difficulty finding help on this.
This use case can be achieved both by using sub intents and the context output.
Please refer to the below configuration wherein, I have used sub intent to deal with the follow up utterance .
The dialog “Post Details” would fetch the user the details of a post if the post number if provided.
At the message node, I have added a transition rule on “On user input” to execute a sub intent if the intent matches “followUpPostDetails”.
I have trained the sub intent “FollowUpPostDetails” at ML section to identify the intent based on utterance.
Followed by the sub intent, I have added a script node “deletePreviousEntities” to delete all the entities which were previously captured and stored in context.
The script node "“deletePreviousEntities” is now connected to the entity node “postNum”
Below are snips of run time execution showing that the follow up question "how about * " is identified
At the entity node “postNum”, I have selected the option “Evaluate unused text from previous utterances” at entity extraction.
I will soon post an other configuration here to demonstrate that the use case can be achieved using context output as well.
Please let us know if you have any further questions.
Please refer to the below configuration wherein I have used the context output of a dialog to handle the follow up question.
Configuration of Post Details dialog which returns the details of post when the post number is provided by the user.
At the intent node “Post Details”, I have configured the NL section to emit the context output as “postdetails”
I have created an other dialog “FollowUp PostDetails” with same configuration as it was at “Post details” but had the Intent precondition as “postdetails” (So, the dialog “FollowUp PostDetails” can only be identified when the context contains “postdetails” which will be emitted when the dialog “Post details” is executed)
Configured an intent pattern to identify the followup utterance
Below are the snips of run time execution which shows that the follow up question “what about 4” is handled based on Context Output.
Thank you very much @Subrahmanyam, this answered my question! I was on the right track and you confirmed it.