Skip to content

Add project billing history to Salesforce opportunity details - #52

Merged
jmgasper merged 1 commit into
devfrom
feat/sales-opportunity-billing-history
Oct 6, 2026
Merged

jmgasper merged 1 commit into
devfrom
feat/sales-opportunity-billing-history

Conversation

@jmgasper

@jmgasper jmgasper commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Sales opportunity details currently contain only Salesforce fields, so the Sales modal cannot show the Work project or its billing history. Expand GET /v6/projects/salesforce/opportunities/:opportunityId with billingAccount, projectId, and relatedBillingAccounts.

Resolve the current account through the Billing Accounts API opportunity filter, then find the non-deleted project using that account. Collect every unique billing account ID referenced by its challenges, regardless of challenge or account status, and return ID/name summaries in numeric order. Missing metadata retains the ID; an opportunity with no account returns null account/project values and an empty history. Lookup failures return sanitized errors.

The shared account resolver now checks the Billing Accounts API with at most five concurrent requests, then falls back to Salesforce for unresolved IDs. Includes response documentation, configuration/deployment guidance, and regression tests. No schema migration is required.

Validation

  • pnpm lint and pnpm build passed.
  • pnpm test --runInBand salesforce billingAccount.service.spec.ts: 39 tests passed.

Dependency and deployment

Deploy topcoder-platform/billing-accounts-api-v6#29 first, then this PR, then topcoder-platform/platform-ui#2437. Uses the existing BILLING_ACCOUNTS_API_URL, M2M read access, and CHALLENGES_DB_URL configuration.

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