You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Using bots-node-sdk for custom component development

Accepted answer
24
Views
4
Comments

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

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!