Pass parameter from C# api to Kore.ai api

Hi,

I want to pass user location from C# API to kore.ai API along with question text.

Currently I am following below steps,

  • Generate a token
  • Call the API - chatbot/hooks/st-XXXXXXXXXXXXX & pass the payload as below.

{ “message”: {
“text”: “Get weather today” },
“from”: {
“id”: “XXXXXXXXXXXXXXXXXXXXXX”,
“userInfo”: {
“firstName”: “ABC User”,
“lastName”:“ABC Last Name”,
email":"e@e.com
}},
“mergeIdentity” :true
}

How can I pass customData in this payload & receive it on kore.ai bot site? Once I have location I can call the weather service specific to that location. Currently I am getting blank value for firstName on kore.ai side.

Sample prompt message for Entity00 {{context.session.UserContext.firstName}} FFFFERERER EEEE YYY

Please help.

Thanks,
Mehul

Hi @mehul,

You can pass the customData from webSDK and use it in the bot flow internally.

Please refer the following documentation links:

https://developer.kore.ai/docs/bots/bot-builder-tool/dialog-task/context-object/

Let us know if you need any further clarification.

Regards,
Yoga Ramya