CartTransform, accessing sellingPlan and sellingPlanAllocation

Hello,

I would like to access selling plan on a cart line, but it is always returning null in the cartTransform query Input as I can see in Partner dashboard under my app CartTransform extension

My cart is composed of one item that has a selling_plan_allocation with a selling plan:

"selling_plan_allocation": {
  "price_adjustments": [],
  "price": 5000,
  "compare_at_price": null,
  "per_delivery_price": 5000,
  "selling_plan": {
    "id": 1234,
    "name": "Delivery every week",
    "description": null,
    "options": [
      {
        "name": "Delivery every",
        "position": 1,
        "value": "Delivery every week"
      }
    ],
    "recurring_deliveries": true,
    "fixed_selling_plan": false,
    "price_adjustments": []
  }
}

My CartTransform query, below, I am able to have other fields but not sellingPlanAllocation/sellingPlan

query Input {
  cart {
    lines {
      id
      merchandise {
        __typename
        ... on ProductVariant {
          id
        }
      }
      sellingPlanAllocation {
        sellingPlan {
          id
        }
      }
    }
  }
}

Am I missing something on the query please ?

Documentation references:

https://shopify.dev/docs/api/functions/reference/cart-transform/graphql/common-objects/cartline

https://shopify.dev/docs/api/functions/reference/cart-transform/graphql/common-objects/sellingplanallocation

1 Like

I’m having the exact same issue. Selling plans return just fine in product discount functions but always null in cart transform functions.
Were you able to get this resolved?

Missed this note:
The expand, merge, and update operations will be dropped in the event that a selling plan is present.
https://shopify.dev/docs/api/functions/reference/cart-transform#invalid-operations