Skip to content

Dataprovider added in ms bing capi#3718

Merged
joe-ayoub-segment merged 7 commits intomainfrom
STRATCONN-6726-capi-providername
Apr 23, 2026
Merged

Dataprovider added in ms bing capi#3718
joe-ayoub-segment merged 7 commits intomainfrom
STRATCONN-6726-capi-providername

Conversation

@AnkitSegment
Copy link
Copy Markdown
Contributor

In this PR, dataProvider key added in Microsoft BING CAPI.

JIRA ticket: https://twilio-engineering.atlassian.net/browse/STRATCONN-6726

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'

New Destination Checklist

  • Extracted all action API versions to verioning-info.ts file. example

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for a dataProvider attribute in the Microsoft Bing CAPI destination action payload so events can declare the source of event data.

Changes:

  • Adds dataProvider to the action mapping schema and generated payload types.
  • Includes dataProvider in the outbound Bing CAPI request item (defaulting to SEGMENT).
  • Updates request item typings to include dataProvider.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
packages/destination-actions/src/destinations/ms-bing-capi/sendEvent/types.ts Adds dataProvider to the request item type (and touches nearby request field typings).
packages/destination-actions/src/destinations/ms-bing-capi/sendEvent/index.ts Maps dataProvider into the request payload and sets a default.
packages/destination-actions/src/destinations/ms-bing-capi/sendEvent/generated-types.ts Updates generated Payload typing/docs to include dataProvider.
packages/destination-actions/src/destinations/ms-bing-capi/sendEvent/fields.ts Exposes dataProvider as an optional mapped field with default SEGMENT.
Comments suppressed due to low confidence (1)

packages/destination-actions/src/destinations/ms-bing-capi/sendEvent/index.ts:44

  • ...data is spreading the imported data InputField definition (from ./fields) into the outbound request item, not the payload's data object. The destructuring at line 36 does not create a data variable, so this will add keys like label, type, properties, etc. to the request body. Rename/alias the imported field (e.g., import { data as dataField } ... and use fields: { data: dataField, ... }) and then bind const { data = {} } = payload so ...data refers to the payload data.
    const {
      data: { eventTime, eventType, adStorageConsent, eventSourceUrl, eventName, dataProvider } = {},
      userData: { em, ph, ...restOfUserData } = {},
      customData,
      items,
      hotelData
    } = payload
    const jsonItem: BingCAPIRequestItem = {
      ...data,
      eventType: eventType as 'pageLoad' | 'custom',

Comment thread packages/destination-actions/src/destinations/ms-bing-capi/sendEvent/index.ts Outdated
Copilot AI review requested due to automatic review settings April 14, 2026 07:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 53.84615% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.88%. Comparing base (9e03b1d) to head (702ed1d).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ns/src/destinations/amplitude-cohorts/functions.ts 50.00% 4 Missing ⚠️
...ctions/src/destinations/amplitude-cohorts/index.ts 66.66% 1 Missing ⚠️
...s/src/destinations/ms-bing-capi/sendEvent/index.ts 50.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (53.84%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3718      +/-   ##
==========================================
- Coverage   81.07%   80.88%   -0.20%     
==========================================
  Files        1655     1347     -308     
  Lines       32078    25048    -7030     
  Branches     7096     5198    -1898     
==========================================
- Hits        26008    20260    -5748     
+ Misses       5097     3841    -1256     
+ Partials      973      947      -26     

☔ 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.

Copilot AI review requested due to automatic review settings April 20, 2026 13:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

sayan-das-in
sayan-das-in previously approved these changes Apr 23, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

label: 'Cohort Owner Email',
description: 'The email of the user who will own the cohorts in Amplitude. This can be overriden per Audience, but if left blank, all cohorts will be owned by this user.',
description:
'The email of the user who will own the cohorts in Amplitude. This can be overriden per Audience, but if left blank, all cohorts will be owned by this user.',
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

The setting description contains a misspelling: “overriden” should be “overridden”. Since this is user-facing copy, it’s worth correcting.

Suggested change
'The email of the user who will own the cohorts in Amplitude. This can be overriden per Audience, but if left blank, all cohorts will be owned by this user.',
'The email of the user who will own the cohorts in Amplitude. This can be overridden per Audience, but if left blank, all cohorts will be owned by this user.',

Copilot uses AI. Check for mistakes.
Comment on lines 62 to 66
testAuthentication: (request, { settings }) => {
const {
endpoint,
default_owner_email
} = settings
const { endpoint, default_owner_email } = settings
const baseUrl = getEndpointByRegion('usersearch', endpoint)
return request(`${baseUrl}?user=${default_owner_email}`)
}
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

This PR’s stated purpose is adding dataProvider to Microsoft Bing CAPI, but it also includes formatting-only changes in the Amplitude Cohorts destination. To keep scope focused and reviews simpler, consider reverting these unrelated formatting changes (or moving them to a separate PR).

Copilot uses AI. Check for mistakes.
@joe-ayoub-segment joe-ayoub-segment merged commit e9157c8 into main Apr 23, 2026
23 of 25 checks passed
@joe-ayoub-segment joe-ayoub-segment deleted the STRATCONN-6726-capi-providername branch April 23, 2026 12:04
@joe-ayoub-segment
Copy link
Copy Markdown
Contributor

deployed

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.

5 participants