Skip to content

Conversation

@agouveia-twilio
Copy link

Introduces a new 'subscription_groups' field to manage user subscription status for specific groups in both updateUserProfile and updateUserProfile2 actions. Updates type definitions, action schemas, and utility functions to handle this new attribute.

A summary of your pull request, including the what change you're making and why.

Testing

Include any additional information about the testing you have completed to
ensure your changes behave as expected. For a speedy review, please check
any of the tasks you completed below during your testing.

  • Added unit tests for new functionality
  • Tested end-to-end using the local server
  • [If destination is already live] Tested for backward compatibility of destination. Note: New required fields are a breaking change.
  • [Segmenters] Tested in the staging environment
  • [Segmenters] [If applicable for this change] Tested for regression with Hadron.

Security Review

Please ensure sensitive data is properly protected in your integration.

  • Reviewed all field definitions for sensitive data (API keys, tokens, passwords, client secrets) and confirmed they use type: 'password'

Introduces a new 'subscription_groups' field to manage user subscription status for specific groups in both updateUserProfile and updateUserProfile2 actions. Updates type definitions, action schemas, and utility functions to handle this new attribute.
@joe-ayoub-segment
Copy link
Contributor

joe-ayoub-segment commented Dec 8, 2025

Hi @agouveia-twilio thanks for the PR.

The change looks pretty straightforward, but there's a little more that needs to be done though before we can deploy it.

We need to ensure that what gets deployed works for all customers, and not just for the customer you are working with.

With that in mind please review the below:

  1. Have we delivered what customers expect? Have we done enough?
  • should other actions also include this functionality? identify() for example?
  • should email / push subscription details also be included in the track() actions?
  • isn't there a global subscription switch in Braze which turns off / on all subscriptions regardless of subscription groups?
  1. Please provide proof that the Braze API can accept these new values. e.g. links to docs and screenshots / excerpts from the docs showing how the payload should be formatted to include subjscription details.

  2. Add unit tests to the tests.ts files which specifically cover the new fields.

  3. Make sure no other unit tests break.

  4. Show proof of testing. i.e screenshots of video showing data being sent from Segment to Braze, with the Braze UI showing the correct outcome of the change.

  5. Confirm if any other Segment <> Braze Destination already has this functionality or not - show how it works - and explain how the implemenation in this PR is different / similar. We want to ensure a consistant customer experience where possible.

If you need help with any of this please reach out and we can jump on a call. But see what you can get done by yourself and we can go from there.

Cheers,
Joe

@joe-ayoub-segment joe-ayoub-segment changed the title Add subscription group support to Braze user profile STRATCONN-6410 - [Braze] - Add subscription group support to Braze user profile Dec 8, 2025
@joe-ayoub-segment
Copy link
Contributor

Note: Customer asking when this will be done.
Joe followed up to ask @agouveia-twilio if he plans to continue work on the PR.
See Slack https://twilio.slack.com/archives/CC97A542H/p1768178183883139

Added the 'defaultObjectUI: keyvalue' property to the subscription groups field in both updateUserProfile and updateUserProfile2 Braze actions to improve the UI for managing subscription group objects.
Added test cases to verify handling of subscription_groups in both updateUserProfile and updateUserProfile2 Braze destination actions. Tests cover scenarios with single, multiple, batched, mixed subscription states, and absence of subscription_groups.
Extended Braze user profile update tests to cover the subscription_groups field, including cases for populated and empty arrays. Updated related snapshots to reflect the new field.
Changed the expected 'subscription_state' in the snapshot test from a placeholder value to 'unsubscribed' to reflect the correct test output.
@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.03%. Comparing base (c122bfc) to head (4923d10).
⚠️ Report is 62 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3455      +/-   ##
==========================================
- Coverage   80.06%   80.03%   -0.03%     
==========================================
  Files        1224     1267      +43     
  Lines       22722    23349     +627     
  Branches     4505     4674     +169     
==========================================
+ Hits        18192    18687     +495     
- Misses       3698     3794      +96     
- Partials      832      868      +36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants