Project: MS BOT
Language:: Typescript
Modules: At both Skill & VA level
"bot-solutions": "^1.0.0",
"botbuilder": "^4.11.0",
"botbuilder-ai": "^4.11.0",
"botbuilder-applicationinsights": "^4.11.0",
"botbuilder-azure": "^4.11.0",
"botbuilder-dialogs": "^4.11.0",
"botbuilder-lg": "^4.11.0",
"botframework-config": "^4.11.0",
"botframework-connector": "^4.11.0",
What happens?:
We would like to get the userState data into Skill context from VA context to use the data in flows at Skill level.
We used to share the existing user data like user profile b/w VA and Skill. We maintain which parameter should pass to Skill in manifest.json file like below.
{
"id": "l_test",
"name": "testskill",
"description": "This is the description of the test skill",
"iconUrl": "",
"authenticationConnections": [],
"actions": [
{
"id": "test_skill_Sample",
"definition": {
"description": "Trigger test skill",
"slots": [{
"name": "userState",
"types": ["IUserState"]
}],
"triggers": {
"utteranceSources": [
{
"locale": "en",
"source": [
"testskill#Sample"
]
}
]
}
}
}
]
}
In VA maindialog.ts file
if (this.isSkillIntent(dispatchIntent)) {
const dispatchIntentSkill: string = dispatchIntent;
const skillDialogArgs: BeginSkillDialogOptions = {
activity: activity as Activity
};
console.log(`skillDialogArgs ---> ${JSON.stringify(skillDialogArgs)}`);
// Save active skill in the state.
const selectedSkill: IEnhancedBotFrameworkSkill | undefined = this.skillsConfig.skills.get(dispatchIntentSkill);
if (selectedSkill){
await this.activeSkillProperty.set(stepContext.context, selectedSkill);
}
// Start the skill dialog.
return await stepContext.beginDialog(dispatchIntentSkill, skillDialogArgs);
}
How do I send the state data from VA and read the same state in Skill?
Thanks,
Sreekanth (Ecolab)
@Batta32 can you please take a look at this?
Sure @tonyanziano, we will review this issue with the team!
@SreekanthOAuth, we will start reviewing all the information you provided. As soon as we have any update, we will back to you here 馃槉.
@Batta32 , do you have any updates on this issue?
Yes @taicchoumsft, we were finishing some validations on our side. This week we will have an update!
Hi @SreekanthOAuth, sorry for the delay. The current method to implement this functionality is described in /virtual-assistant/handbook/exchanging-data-with-skills/ document.
We were able to exchange information between a TypeScript Virtual Assistant and a TypeScript Skill following that guide. We created the branch feature/southworks/exchange-data-with-skill so you can see the implementation.
SDK 4.11 is only compatible with 1.0 TypeScript bots, which have not been offically released yet, so use SDK 4.9 as contains the samples of the attached branch.
In the branch you will find:
SampleResponses.lg so it can be used with the new Skill example logicpackage.json and package-lock.json to use the SDK 4.9We will be attentive to your response 馃檪.

@Batta32 , Thank you so much for the update.
We will try out this resolution and come back.
Thanks,
Sreekanth.