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:
https://developer.kore.ai/docs/bots/bot-builder/defining-bot-tasks/dialog-tasks/working-with-the-intent-node/
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
Hi @Subrahmanyam,
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
Jayaprakashhan
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
Jayaprakashhan
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
Hi @Subrahmanyam,
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
Jayaprakashhan
@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:
Hi @Subrahmanyam,
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
@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.
https://developer.kore.ai/docs/bots/sdks/kore-ai-web-sdk-tutorial/
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.
Hello @Subrahmanyam.
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.
Thanks,
Eddie
Hi @ek2842,
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
Note:
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.
Hi Subramanyam,
I have same issue. In first i.e login task I am asking user for email and passsword. at the end of the task I have invoked another task add beneficiary as dialogue task which ask user- name of the beneficiary and IBAN of the beneficiary. Now I want to use service node to save the data like email, name of the beneficiary and IBAN . But I can only see name of the beneficiary and IBAN in the API data. How to get that email entity called in the add beneficiary task?
Thank you in advance.
Hi @jayaprakash.gurrapu ,
I have same issue just like you -
1st dialog contains user name and I want to use UserName entity in 2nd dialog task.
Iām try to use BotUserSession and implement under 1st dialog
BotAction -->script
var user_name = {
ātitleā:labels[Welcome_Task],
āvalueā: context.Name_Entity
};
BotUserSession.put(āUserNameā, user_name, ā20000ā);
After this code implementation Bot not able to run
Show this error ā āI am sorry, something went wrong and I had to discard your task. Please retry.ā
Can you tell me how to fetch values in another dialog ā
Iām try to use this syntax ā {{context.session.BotUserSession.UserName}}
{{context.entities.user_name}}
{{context.entities.Name_Entity}}
None of these working.
Can you please help me out.
Thank You