Selling_plan_pricing_policies_must_contain_a_fixed_pricing_policy

Hello,

API version: 2021-10

When I’m trying to create a sellingPlanGroup, I’m getting an error: SELLING_PLAN_PRICING_POLICIES_MUST_CONTAIN_A_FIXED_PRICING_POLICY

I saw on this post that the issue was resolved but I still have the error.

Here is my mutation:

import { gql } from 'apollo-boost';

export const sellingPlanGroupCreateMutation = gql`
  mutation {
    sellingPlanGroupCreate(
      input: {
        name: "Test"
        options: ["a"]
        sellingPlansToCreate: [
          {
            name: "Tous les mois"
            options: ["a"]
            billingPolicy: {
              recurring: {
                anchors: { type: MONTHDAY, day: 27, month: null }
                interval: MONTH
              }
            }
            deliveryPolicy: {
              recurring: {
                anchors: { type: MONTHDAY, day: 27, month: null }
                interval: MONTH
              }
            }
            pricingPolicies: {
              recurring: {
                adjustmentType: PERCENTAGE
                adjustmentValue: { percentage: 10 }
                afterCycle: 0
              }
            }
          }
        ]
      }
      resources: { productIds: ["gid://shopify/Product/6700227166344"] }
    ) {
      sellingPlanGroup {
        id
        sellingPlans(first: 10) {
          edges {
            node {
              id
              name
            }
          }
        }
      }
      userErrors {
        code
        field
        message
      }
    }
  }
`;

When I’m changing the recurring key with a fixed, it’s working but when I’m trying to put both, I got another error.

Thank you.

Hi,

I think the original post was about why “SELLING_PLAN_PRICING_POLICIES_MUST_CONTAIN_A_FIXED_PRICING_POLICY” error suddenly showed up without proper versioning and we solved the version problem.

Therefore, fixed pricing policy is actually required after 2021-04.

Hope this helps!