Skip to content

react & plugin-flow-builder: use webview params from flow builder #BLT-2460#3245

Merged
Iru89 merged 7 commits into
masterfrom
BLT-2460-get-params-from-open-webview-node-and-use-it-plugin-flow-builder
Jul 10, 2026
Merged

react & plugin-flow-builder: use webview params from flow builder #BLT-2460#3245
Iru89 merged 7 commits into
masterfrom
BLT-2460-get-params-from-open-webview-node-and-use-it-plugin-flow-builder

Conversation

@Iru89

@Iru89 Iru89 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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

  • Thread botContext through the CMS content factories that can contain buttons targeting webviews.
  • Store webview_params on FlowWebview and build the final params from generated Botonic params, resolved CMS params, and the optional exitSuccessContentID.
  • Let botonic-react accept optional params when opening a webview, keep webviewParams as an empty object when absent or cleared, and serialize iframe URLs through URLSearchParams.
  • Resolve local dev-mode webview descriptors by name so Flow Builder descriptors like { 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 from WebviewRequestContext.params in local webviews and are serialized into the generated iframe URL for hosted webviews.

Testing

The pull request...

  • has unit tests for webview URL param serialization.
  • has unit/component coverage for storing, defaulting, and clearing webviewParams in webchat state.
  • has webchat coverage for resolving a local dev-mode webview descriptor by name.
  • currently has a failing botonic-plugin-flow-builder-tests CI job: tests/tracking/track-webview-action-triggered.test.ts fails in 2 cases because older tracking fixtures do not define webview_params.

@Iru89 Iru89 changed the title WIP WIP: use webview params from flow builder Jul 8, 2026
@Iru89 Iru89 changed the title WIP: use webview params from flow builder WIP: use webview params from flow builder #BLT-2460 Jul 8, 2026
@Iru89 Iru89 changed the title WIP: use webview params from flow builder #BLT-2460 WIP(plugin-flow-builder): get params from webview node Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Test Results

46 tests   46 ✅  1m 36s ⏱️
 6 suites   0 💤
 1 files     0 ❌

Results for commit 701cf70.

♻️ This comment has been updated with latest results.

…ext and add webview params with replaced variables
@Iru89 Iru89 changed the title WIP(plugin-flow-builder): get params from webview node react & plugin-flow-builder: use webview params from flow builder #BLT-2460 Jul 9, 2026
@Iru89 Iru89 self-assigned this Jul 9, 2026
@Iru89
Iru89 requested a review from Davidhidalgo July 9, 2026 10:35
@Iru89
Iru89 marked this pull request as ready for review July 9, 2026 10:35
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@Iru89
Iru89 merged commit 893b107 into master Jul 10, 2026
12 checks passed
@Iru89
Iru89 deleted the BLT-2460-get-params-from-open-webview-node-and-use-it-plugin-flow-builder branch July 10, 2026 07:20
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.

2 participants