Menu actions

You can provide an array of custom actions that will be displayed on the left-hand side of the user input:

webchat menu actions
menuActions: [
  {
    label: 'Greet',
    message: {
      type: 'text',
      payload: {
        value: 'Hello!',
      },
    },
  },
  {
    label: 'Custom action',
    message: {
      type: 'postback',
      payload: {
        value: {
          custom: 'this is custom',
        },
      },
    },
  },
];

Each entry has to have a label and a message. Clicking on the menu entry will have the same effect as sending the message by typing it or clicking on a Postback button.

Parameter Type Description
label String Text label of menu entry
message Object User message sent to the bot

If you don’t provide a menuActions option or if it is an empty array, the menu won’t be displayed.