Cancel the flow and go back to the first node in botpress

179 Views Asked by At

We are using botpress for chat bot where all flow are working fine, but we need to implement one functionality that handles the cancel. We created a nlu and assigned a flow to handle it but still flow is not being handled properly.

  /**
   * Small description of your action
   * @title The title displayed in the flow editor
   * @category Custom
   * @author Your_Name
   * @param {string} name - An example string variable
   * @param {any} value - Another Example value
   */
  const myAction = async (name, value) => {
    await bp.dialog.pop()
  }

  return myAction(args.name, args.value)


Any help or guidance is deeply appreciated.

0

There are 0 best solutions below