STRATCONN-6441 - [Facebook CAPI] - removing flags from actions#3756
Open
joe-ayoub-segment wants to merge 10 commits into
Open
STRATCONN-6441 - [Facebook CAPI] - removing flags from actions#3756joe-ayoub-segment wants to merge 10 commits into
joe-ayoub-segment wants to merge 10 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes per-action feature-flag branching and legacy, duplicated request/validation logic in the Facebook Conversions API destination actions, consolidating behavior around the shared send() helper.
Changes:
- Removed
FEATURE_FLAG_*gating branches from multiple Facebook CAPI actions and routed execution through the sharedsend()path. - Deleted legacy helper modules (
fb-capi-user-data.ts,fb-capi-properties.ts,fb-capi-app-data.ts) that previously contained validation/hashing/app-data logic. - Simplified action implementations by trimming imports and deferring validation/request construction to shared helpers.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/destination-actions/src/destinations/facebook-conversions-api/viewContent2/index.ts | Removes feature-flag branching; always uses shared send() for V2 ViewContent. |
| packages/destination-actions/src/destinations/facebook-conversions-api/viewContent/index.ts | Removes legacy inline implementation; always uses shared send(). |
| packages/destination-actions/src/destinations/facebook-conversions-api/search2/index.ts | Removes feature-flag branching; always uses shared send() for V2 Search. |
| packages/destination-actions/src/destinations/facebook-conversions-api/search/index.ts | Removes legacy inline implementation; always uses shared send(). |
| packages/destination-actions/src/destinations/facebook-conversions-api/purchase2/index.ts | Removes feature-flag branching; always uses shared send() for V2 Purchase. |
| packages/destination-actions/src/destinations/facebook-conversions-api/purchase/index.ts | Removes legacy inline implementation; always uses shared send(). |
| packages/destination-actions/src/destinations/facebook-conversions-api/pageView2/index.ts | Removes feature-flag branching; always uses shared send() for V2 PageView. |
| packages/destination-actions/src/destinations/facebook-conversions-api/pageView/index.ts | Removes legacy inline implementation; always uses shared send(). |
| packages/destination-actions/src/destinations/facebook-conversions-api/initiateCheckout2/index.ts | Removes feature-flag branching; always uses shared send() for V2 InitiateCheckout. |
| packages/destination-actions/src/destinations/facebook-conversions-api/initiateCheckout/index.ts | Removes legacy inline implementation; always uses shared send(). |
| packages/destination-actions/src/destinations/facebook-conversions-api/custom2/index.ts | Removes feature-flag branching; always uses shared send() for V2 Custom. |
| packages/destination-actions/src/destinations/facebook-conversions-api/custom/index.ts | Removes legacy inline implementation; always uses shared send(). |
| packages/destination-actions/src/destinations/facebook-conversions-api/addToCart2/index.ts | Removes feature-flag branching; always uses shared send() for V2 AddToCart. |
| packages/destination-actions/src/destinations/facebook-conversions-api/addToCart/index.ts | Removes legacy inline implementation; always uses shared send(). |
| packages/destination-actions/src/destinations/facebook-conversions-api/fb-capi-user-data.ts | Deletes legacy user-data normalization/hashing module. |
| packages/destination-actions/src/destinations/facebook-conversions-api/fb-capi-properties.ts | Deletes legacy shared field definitions + contents/DP options helpers. |
| packages/destination-actions/src/destinations/facebook-conversions-api/fb-capi-app-data.ts | Deletes legacy app-data generation + field definition module. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3756 +/- ##
==========================================
+ Coverage 80.93% 80.95% +0.02%
==========================================
Files 1348 1343 -5
Lines 25089 24719 -370
Branches 5212 5073 -139
==========================================
- Hits 20305 20012 -293
+ Misses 3837 3781 -56
+ Partials 947 926 -21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
varadarajan-tw
approved these changes
May 12, 2026
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.
Removing flags after Facebook CAPI refactor.
Removes feature flags from the Facebook Conversions API destination actions. Previously, each action had two code paths — a legacy inline implementation and a newer shared send() function gated behind a feature flag. Since all flags have been fully rolled out, this PR removes the flag checks and legacy code paths, making the shared send() function the single implementation for all actions. Also cleans up redundant files (constants.ts, utils.ts, fb-capi-* modules) whose functionality has been consolidated into shared/constants.ts and shared/functions.ts.
export const FEATURE_FLAG_ADD_TO_CART = 'FB_CAPI_REFACTOR_ADD_TO_CART_EVENT'

export const FEATURE_FLAG_CUSTOM = 'FB_CAPI_REFACTOR_CUSTOM_EVENT'

export const FEATURE_FLAG_INITIATE_CHECKOUT = 'FB_CAPI_REFACTOR_INITIATE_CHECKOUT_EVENT'

export const FEATURE_FLAG_PAGE_VIEW = 'FB_CAPI_REFACTOR_PAGE_VIEW_EVENT'

export const FEATURE_FLAG_PURCHASE = 'FB_CAPI_REFACTOR_PURCHASE_EVENT'

export const FEATURE_FLAG_SEARCH = 'FB_CAPI_REFACTOR_SEARCH_EVENT'

export const FEATURE_FLAG_VIEW_CONTENT = 'FB_CAPI_REFACTOR_VIEW_CONTENT_EVENT'

Testing
Deployed to staging for sanity check.
Security Review
Please ensure sensitive data is properly protected in your integration.
type: 'password'New Destination Checklist
verioning-info.tsfile. example