Hi Shopify team,
In Customer Account UI extensions (API 2026-04), we can:
- Get the authenticated customer and B2B context:
shopify.authenticatedAccount.customer.valueshopify.authenticatedAccount.purchasingCompany.value(withlocation.id)
- Call the Storefront API for public catalog data via
shopify.query.
However, there’s no documented way inside the extension environment to fetch B2B contextual prices (e.g. by companyLocationId) for products/variants, similar to:
# (Admin GraphQL)
productVariant(id: $variantId) {
contextualPricing(context: { companyLocationId: $companyLocationId }) {
price { amount currencyCode }
}
}
The only documented way is this one but it requires a customerAccessToken which UI Extensions do not have access to:
# (Storefront @inContext)
query @inContext(buyer: { customerAccessToken: "...", companyLocationId: "..." }) {
# variant price with B2B context
}
Feature request
Please provide a supported way for Customer Account UI extensions to query contextual B2B prices directly, for example:
- A dedicated pricing API in the extension sandbox, e.g.:
const prices = await shopify.pricing.getContextualPrices({
productVariantIds: [...],
companyLocationId: purchasingCompany?.location?.id,
country: "US",
});
or
- A Storefront API mode where
@inContextcan use the current customer account + B2B location automatically, without manually handling any tokens in the extension, e.g.:
const { data } = await shopify.query(`
query ProductsForCurrentBuyer @inContext(
buyer: { useCurrentCustomerAccountContext: true }
) {
products(first: 10) { ... }
}
`);
This would make it possible to show accurate B2B prices inside customer accounts (company + country aware) using only the APIs available to Customer Account UI extensions.
Thanks!