Subscription's original selling plan group

Solved

Subscription's original selling plan group

tcarmi
Shopify Partner
14 0 3

Is there a way for me to connect a subscription contract, which was created via shopify checkout, to the selling plan group it was derived from?

Accepted Solution (1)

Brian_S
Shopify Partner
170 21 43

This is an accepted solution.

Each line will have a sellingPlanId. With that, assuming you're saving data in your system that connects plans and groups you can make the connection yourself: 

https://shopify.dev/docs/api/admin-graphql/2023-10/objects/SubscriptionLine#field-subscriptionline-s...

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic

View solution in original post

Replies 3 (3)

Brian_S
Shopify Partner
170 21 43

This is an accepted solution.

Each line will have a sellingPlanId. With that, assuming you're saving data in your system that connects plans and groups you can make the connection yourself: 

https://shopify.dev/docs/api/admin-graphql/2023-10/objects/SubscriptionLine#field-subscriptionline-s...

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic
tcarmi
Shopify Partner
14 0 3

Hi @Brian_S , Thanks for answering.
Will there be a way to use the selling plan id in order to easily query for the selling plan group, or would i need to fetch all the groups and filter for the group contains the relevant selling plan?

Brian_S
Shopify Partner
170 21 43

As of the last time I checked there is not a way to query groups by selling plan id.  To make things even more complicated, the original selling plan that was purchased with could have been deleted but the group could still exist. So if you don't save the groups' selling plans in perpetuity you'll never be able to make the connection moving forward

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic