Repository navigation
Add project billing history to Salesforce opportunity details - #52
Merged
Merged
Conversation
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.
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/:opportunityIdwithbillingAccount,projectId, andrelatedBillingAccounts.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 lintandpnpm buildpassed.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, andCHALLENGES_DB_URLconfiguration.