Unable to access the Custom data in WebSDK

In custom data, we need to pass a user authentication token. We tried but were unable to access the custom variable, in which we declared how to access custom data variables in the service node. As mentioned in the document, we tried to access **customDatafrom lastMessage under the BotUserSession of the context object, but I got an undefined value kindly assist on this.
Local SDK file:


My script inside bot action:
MicrosoftTeams-image (5)
Error on local hosting bot:

Error log:

Please let us know how to pass the value in the SDK and access all the service node when it requires a service call.

Hi @abishekkumar ,

Thank you for reaching out to Kore.ai Community.
We are checking the reported issue with the concerned team.

Meanwhile, please refer to the below posts created for Custom Data, these might be helpful for you.

Thank you,
Srujan Madderla
Kore.ai Community Team

@abishekkumar
There is a troubleshooting technique that may help you.
In the bot,
Either in a script add something like
koreDebugger.log(JSON.stringify(context));

This will help you see the debug information under Debug Logs (Analyze section > Task execution failures)

Or in a message node, in advanced JS, write something like
print(JSON.stringify(context));

It will show you the entire context. You can use some JSON path finder to see where you can find the customData key/value.