Using bots-node-sdk for custom component development
Summary:
I am using bots-node-sdk to development custom component. I am facing issues while passing variable from Bot to custom component. When i am sending name variable from Bot to custom component, the value is not getting sent correctly. Please help.
Content (please ensure you mask any confidential information):
module.exports = {
metadata: () => ({
name: 'helloWorld',
properties: {
name: { required: true, type: 'string' },
},
supportedActions: ['ok', 'error']
}),
/**
* invoke method gets called when the custom component state is executed in the dialog flow
* @param {CustomComponentContext} context
*/
invoke: async (context) => {
// Retrieve the value of the 'name' component property.
const { name } = context.properties()||'';
// Determine the current date