react & plugin-flow-builder: use webview params from flow builder #BLT-2460#3245
Merged
Iru89 merged 7 commits intoJul 10, 2026
Conversation
…-and-use-it-plugin-flow-builder
Test Results46 tests 46 ✅ 1m 36s ⏱️ Results for commit 701cf70. ♻️ This comment has been updated with latest results. |
…ext and add webview params with replaced variables
Iru89
marked this pull request as ready for review
July 9, 2026 10:35
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Davidhidalgo
approved these changes
Jul 9, 2026
Iru89
deleted the
BLT-2460-get-params-from-open-webview-node-and-use-it-plugin-flow-builder
branch
July 10, 2026 07:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Flow Builder webviews can now receive the params configured in the Open Webview node, with Botonic variables resolved against the current bot context before the webview opens. Botonic React keeps those params in webchat state and exposes them to local webviews through
WebviewRequestContext.params.Context
Before this change, Flow Builder only sent Botonic-generated webview params such as
webviewId, timestamp, and the success exit content id. CMS-configured webview params were ignored, so teams could not pass Flow Builder data or resolved bot variables into the webview from the Open Webview node.Related: BLT-2460
Approach taken / Explain the design
botContextthrough the CMS content factories that can contain buttons targeting webviews.webview_paramsonFlowWebviewand build the final params from generated Botonic params, resolved CMS params, and the optionalexitSuccessContentID.botonic-reactaccept optional params when opening a webview, keepwebviewParamsas an empty object when absent or cleared, and serialize iframe URLs throughURLSearchParams.{ name: 'MyWebview' }can render the matching local React component.To document / Usage example
Flow Builder can configure params on an Open Webview node, for example
orderId,locale, or any value that includes Botonic variables. When the webview opens, those values are available fromWebviewRequestContext.paramsin local webviews and are serialized into the generated iframe URL for hosted webviews.Testing
The pull request...
webviewParamsin webchat state.botonic-plugin-flow-builder-testsCI job:tests/tracking/track-webview-action-triggered.test.tsfails in 2 cases because older tracking fixtures do not definewebview_params.