Skip to content

CDP-6131: make triggerBroadcast data and recipients params optional#217

Closed
talon-github-manager[bot] wants to merge 1 commit into
mainfrom
factory/cdp-6131/impl-minimal
Closed

CDP-6131: make triggerBroadcast data and recipients params optional#217
talon-github-manager[bot] wants to merge 1 commit into
mainfrom
factory/cdp-6131/impl-minimal

Conversation

@talon-github-manager

@talon-github-manager talon-github-manager Bot commented Jun 10, 2026

Copy link
Copy Markdown

Summary

Makes data and recipients parameters optional in triggerBroadcast(), matching the documented API in the README. When recipients is empty or omitted, the payload no longer includes an empty recipients key (which caused a 422 from the API).

Autonomous fix by Baloo.

Related Issues

https://linear.app/customerio/issue/CDP-6131

Testing

  • Ran affected package tests
  • Ran lint-quick

Deployment

Standard deployment. This change can be safely reverted.

Factory Critic Scores

Strategy Correctness Simplicity Style Total
impl-minimal (winner) 9 10 9 28
impl-idiomatic 9 9 9 27
impl-robust 10 7 8 25

Submitted by Baloo -- autonomous triage agent for Squad Pipelines


Note

Low Risk
Small SDK request-shape fix for broadcast triggers; behavior for non-empty recipients is preserved and covered by existing and new tests.

Overview
Makes data and recipients optional on APIClient.triggerBroadcast() (defaults to {}), so callers can trigger with only a broadcast id or with template data and no recipient selector.

When recipients is omitted or empty, the POST body is { data } only—it no longer includes an empty recipients key, which was causing 422 responses from the API. Segment-style and special-field recipient payloads are unchanged when recipients has content.

Adds unit tests for id-only, id + data, and explicit empty recipients.

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

@thethp

thethp commented Jun 10, 2026

Copy link
Copy Markdown

Closing in favor of #220, which covers the same fix and additionally omits empty data from the request payload and updates the JSDoc to document both params as optional. (This PR was one of several created for CDP-6131 by concurrent Baloo runs.)

@thethp thethp closed this Jun 10, 2026
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.

1 participant