Skip to content

feat(braze): sync V6 recommended eCommerce events - #1403

Merged
rmi22186 merged 2 commits into
v3-developmentfrom
fix/sync-braze6-upstream-v3
Sep 3, 2026
Merged

feat(braze): sync V6 recommended eCommerce events#1403
rmi22186 merged 2 commits into
v3-developmentfrom
fix/sync-braze6-upstream-v3

Conversation

@rmi22186

@rmi22186 rmi22186 commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

Comparison notes

Test plan

  • cd kits/braze/braze-6 && npm run build && npm test (Chrome Headless + Firefox Headless, 206 successful assertions)
  • Prettier 1.18.2 check on changed source, test, config, and manifest files
  • npm run lint
  • Confirm generated CJS/IIFE/ESM bundles replace the runtime version token during build

Port the canonical opt-in event mapping while retaining monorepo package-version injection and V3 dependency wiring.
@rmi22186
rmi22186 requested a review from a team as a code owner September 3, 2026 19:42
@cursor

cursor Bot commented Sep 3, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Opt-in commerce forwarding changes event shape and Braze APIs for customers who enable it; incorrect mapping or session/cart ID logic could affect analytics correlation, though legacy paths remain the default.

Overview
Adds an opt-in useEcommerceRecommendedEvents path on the Braze v6 web kit so supported mParticle commerce actions map to Braze’s recommended schema (ecommerce.cart_updated, checkout_started, product_viewed, order_placed) via braze.logEcommerceEvent, with refunds sent as ecommerce.order_refunded custom events. Connection settings can remap cart/checkout/subtotal and product URL attributes (including HTML-escaped config JSON); cart/checkout IDs prefer event attributes, then SessionId / sessionManager, so carts can correlate across the funnel.

When the toggle is off, the host SDK lacks logEcommerceEvent, or the action isn’t supported, behavior unchanged—legacy purchase/custom commerce forwarding still runs. @braze/web-sdk is raised to ^6.9.0; kit version comes from package.json at build time via @rollup/plugin-replace. Tests cover mapping, fallbacks, and version exposure.

Reviewed by Cursor Bugbot for commit 875cc6c. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9dc3dc9. Configure here.

Comment thread kits/braze/braze-6/src/BrazeKit-dev.js
Limit metadata deduplication to attributes consumed by each recommended event type so unrelated identifiers and configured aliases remain available.
@sonarqubecloud

sonarqubecloud Bot commented Sep 3, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@rmi22186
rmi22186 merged commit 50e20ef into v3-development Sep 3, 2026
64 of 66 checks passed
github-actions Bot pushed a commit that referenced this pull request Sep 10, 2026
# [3.2.0](v3.1.0...v3.2.0) (2026-09-10)

### Bug Fixes

* **braze:** derive kit versions from package manifests ([#1399](#1399)) ([3fe0073](3fe0073))
* do not resolve query-param keys that name inherited prototype members ([#1375](#1375)) ([b948012](b948012))
* **onetrust:** make async test failures observable ([#1396](#1396)) ([af153c0](af153c0))
* **release:** prioritize Rokt kits release, accept v3 PR targets, increase registry audit timing ([#1397](#1397)) ([28d3a71](28d3a71))
* **rokt:** stop emitting ATTRIBUTE_SETTER_CALLED diagnostic logs ([#1405](#1405)) ([1542678](1542678))

### Features

* **braze:** sync V6 recommended eCommerce events ([#1403](#1403)) ([e59ced7](e59ced7))
* **rokt:** fire early preselect selectPlacements calls on configured pageviews ([#1398](#1398)) ([5920607](5920607))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants