We want to create selling plans with the same options but with different billing cycles in a single contract for e.g let’s check the below query with deliver every month but billing should be 4 months, and 6 months.
mutation {
sellingPlanGroupCreate(
input: {
appId: "WS-Subscription"
name: "Yearly Subscript prepaid"
merchantCode: "Yearly Prepaid"
options: ["Delivery every"]
position: 1
sellingPlansToCreate: [{
name: "Deliver every month Bill 4 moth",
options: "1 MONTH",
position: 1,
billingPolicy: { recurring: { interval: MONTH, intervalCount: 4 } },
deliveryPolicy: { recurring: { interval: MONTH, intervalCount: 1 } },
pricingPolicies: [
{
fixed: {
adjustmentType: PERCENTAGE
adjustmentValue: { percentage :30 }
}
}
]
},{
name: "Deliver Every month Bill 6 month",
options: "1 MONTH",
position: 2,
billingPolicy: { recurring: { interval: MONTH, intervalCount: 6 } },
deliveryPolicy: { recurring: { interval: MONTH, intervalCount: 1 } },
pricingPolicies: [
{
fixed: {
adjustmentType: PERCENTAGE
adjustmentValue: { percentage :20 }
}
}
]
}]
},
resources: { productIds: ["gid://shopify/Product/6569815703721"], productVariantIds: [] }
) {
sellingPlanGroup {
id
sellingPlans(first:10) {
edges {
node {
id
}
}
}
}
userErrors {
field
message
}
}
}
and we get following errors
[ { field: [ 'input', 'sellingPlansToCreate', '0', 'options' ],
message:
'Options Cannot have multiple selling plans with the same options.' },
{ field: [ 'input', 'sellingPlansToCreate', '1', 'options' ],
message:
'Options Cannot have multiple selling plans with the same options.' } ]
So my question is Shopify should allow users to create plans like this, Why do they have to create different contracts to achieve this. It should be achieve in one contract with selling plan group.
Hope you understand the question and gave the appropriate solution.
Thanks in advance.