Skip to content

PM-6783: add goods-sold offering filters and booking costs - #221

Merged
jmgasper merged 1 commit into
developfrom
fix/pm-6783-goods-sold
Nov 18, 2026
Merged

jmgasper merged 1 commit into
developfrom
fix/pm-6783-goods-sold

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

Goods Sold Customer-Wise currently exposes member payments only and ignores offering selections. This change returns customerBookingCosts (member payments plus recorded challenge fees) alongside customerPayments, and applies repeated offeringType selections before aggregation. It supplies the matching API contract for platform-ui #2650.

Offerings resolve by exact billing-account ID through the linked Salesforce Opportunity. The lookup validates IDs, batches 200 accounts, caches for one minute, preserves unknowns, and rejects incomplete/conflicting data. Existing date bounds, customer scope, latest payment versions, exclusions, rankings and distinct member counts are retained. Missing fees stay unknown; negative/zero fees are preserved. Salesforce outages preserve unfiltered amounts with a notice, while filtered requests fail explicitly.

Validation: 174 targeted tests verified across Sales/dashboard suites, including real PostgreSQL integration; build, TypeScript and changed-file ESLint passed. Read-only development database verification matched all 52 existing aggregate rows and confirmed empty selections return no amounts. The lookup query and compiled client were verified against the Salesforce sandbox.

Deploy this API before the UI. No migration or new configuration variables are required. The current Reports development OAuth configuration returns invalid_client_id; sandbox verification used the existing billing-account credentials, and deployed credentials were not changed. Working existing Salesforce OAuth configuration and read access to billing accounts/linked Opportunities are needed for offering filters.

Jira: https://topcoder.atlassian.net/browse/PM-6783

@jmgasper
jmgasper merged commit 2179e8c into develop Nov 18, 2026
7 checks passed
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