Why the JSON data in product-handle-js differs depending on the store

Topic summary

A developer discovered inconsistent JSON data structures when retrieving selling plan information via Shopify’s Ajax API (/products/product-handle.js).

The Issue:
When a product with three variants has different selling plan groups assigned to different variants, the API sometimes consolidates multiple plan groups into a single group in the JSON response, despite them being separate in the Shopify Admin.

Root Cause Identified:
The merging occurs when multiple selling plan groups share the same name. The JSON API uses group names (not IDs) for consolidation, following Storefront API conventions rather than Admin API behavior.

Resolution:
Changing the plan group names to be unique resolves the issue and returns the expected separate group structures in the JSON response.

Key Takeaway:
This appears to be intended behavior rather than a bug—selling plan groups with identical names are merged in the Storefront/Ajax API responses, even if they have different IDs in the Admin GraphQL API. The group IDs in the JSON response differ from Admin GraphQL IDs, indicating different API specification standards.

Summarized with AI on November 15. AI used: claude-sonnet-4-5-20250929.

公式な記載はありませんが、JSONのデータのgroupのIDは、Admin GraphQLでかえってきているIDの値と異なっており、これは、Admin APIの仕様ではなくて、Storefront APIの仕様に準拠していると見えます。
https://shopify.dev/docs/api/storefront/unstable/objects/SellingPlanGroup

Strorefront APIで、product > SellingPlanGroupを参照すると、IDはレスポンスに含まれないため、同一名称はマージされるものと思います。