Skip to content

feat(checkout): CHECKOUT-10368 Migrate company address search to customer.activeCompany - #3379

Open
bc-peng wants to merge 1 commit into
masterfrom
CHECKOUT-10368
Open

feat(checkout): CHECKOUT-10368 Migrate company address search to customer.activeCompany#3379
bc-peng wants to merge 1 commit into
masterfrom
CHECKOUT-10368

Conversation

@bc-peng

@bc-peng bc-peng commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Jira: CHECKOUT-10368

What/Why?

Storefront GraphQL is removing the root-level company query field and standardizing on customer.activeCompany as the single entry point for B2B company data.

This PR migrates the SearchCompanyAddresses query to the new shape.

Rollout/Rollback

Rolls out with the next SDK release; no feature flag — customer.activeCompany.addresses is already live in production SFGQL and resolves identically to the root company field (same underlying data and auth gate). Must be live in production before the storefront team removes the root company field (B2B-5578) — sign-off happens on that ticket after verification.

Rollback: revert this PR and release; the root company field still exists until B2B-5578 proceeds.

Testing

Manually tested the changes alongside the checkout-js changes.

image

🤖 Generated with Claude Code


Note

Medium Risk
Breaking SDK contract for B2B address search consumers (companycustomer.activeCompany); timing must stay ahead of SFGQL removing the root company field.

Overview
Prepares the checkout SDK for removal of the root storefront GraphQL company field by routing B2B company address search through customer.activeCompany instead.

The SearchCompanyAddresses operation now queries customer { activeCompany { addresses(...) } }, and derived types (CompanyAddressSearchResult, CompanyCompany) plus CheckoutService.searchCompanyAddresses docs/tests expect customer / customer?.activeCompany rather than company. This is a breaking response shape for callers that read result.company.

packages/core/schema/storefront.graphql is updated in the same change (including the new ActiveCompany type on Customer and many other SFGQL additions); codegen for the search query picks up the new path from that schema.

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

@bc-peng
bc-peng marked this pull request as ready for review August 28, 2026 01:01
@bc-peng
bc-peng requested a review from a team as a code owner August 28, 2026 01:01
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