Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin-flow-builder: create executeConversationStart #BLT-1259 #2944

Merged

Conversation

Iru89
Copy link
Contributor

@Iru89 Iru89 commented Nov 29, 2024

Description

Create executeConversationStart to allow handoffs and bot actions in typical WelcomeAction.

Context

If in a WelcomeAction you get the contents connected to the Conversation Start using

const contents = pluginFlowBuilder.getStartContents()

but you do not execute the FlowBuilderAction.botonicInit(request, contentID) where contentID is contents[0].code neither the handoffs nor the bot actions are executed.

To document / Usage example

Now you can write WelcomeAction as:

export class WelcomeAction extends FlowBuilderMultichannelAction {
  static contextType = RequestContext
  static async botonicInit(
    request: BotRequest
  ): Promise<FlowBuilderActionProps> {

   //extra logic

    return await super.executeConversationStart(request)
  }
}

@Iru89 Iru89 merged commit 502219e into master-lts Dec 2, 2024
3 of 4 checks passed
@Iru89 Iru89 deleted the BLT-1259-conversation-start-with-bot-actions-and-handoffs branch December 2, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants