# SellingPlanGroup - admin-graphql - OBJECT
Version: 2025-01

## Description
Represents a selling method (for example, "Subscribe and save" or "Pre-paid"). Selling plan groups
and associated records (selling plans and policies) are deleted 48 hours after a merchant
uninstalls their subscriptions app. We recommend backing up these records if you need to restore them later.

### Access Scopes
`read_products` access scope.


## Fields
* [appId](/docs/api/admin-graphql/2025-01/scalars/String): String - The ID for app, exposed in Liquid and product JSON.
* [appliesToProduct](/docs/api/admin-graphql/2025-01/scalars/Boolean): Boolean! - Whether the given product is directly associated to the selling plan group.
* [appliesToProductVariant](/docs/api/admin-graphql/2025-01/scalars/Boolean): Boolean! - Whether the given product variant is directly associated to the selling plan group.
* [appliesToProductVariants](/docs/api/admin-graphql/2025-01/scalars/Boolean): Boolean! - Whether any of the product variants of the given product are associated to the selling plan group.
* [createdAt](/docs/api/admin-graphql/2025-01/scalars/DateTime): DateTime! - The date and time when the selling plan group was created.
* [description](/docs/api/admin-graphql/2025-01/scalars/String): String - The merchant-facing description of the selling plan group.
* [id](/docs/api/admin-graphql/2025-01/scalars/ID): ID! - A globally-unique ID.
* [merchantCode](/docs/api/admin-graphql/2025-01/scalars/String): String! - The merchant-facing label of the selling plan group.
* [name](/docs/api/admin-graphql/2025-01/scalars/String): String! - The buyer-facing label of the selling plan group.
* [options](/docs/api/admin-graphql/2025-01/scalars/String): String! - The values of all options available on the selling plan group. Selling plans are grouped together in Liquid when they're created by the same app, and have the same `selling_plan_group.name` and `selling_plan_group.options` values.
* [position](/docs/api/admin-graphql/2025-01/scalars/Int): Int - The relative position of the selling plan group for display.
* [productVariantsCount](/docs/api/admin-graphql/2025-01/objects/Count): Count - A count of product variants associated to the selling plan group.
* [productsCount](/docs/api/admin-graphql/2025-01/objects/Count): Count - A count of products associated to the selling plan group.
* [summary](/docs/api/admin-graphql/2025-01/scalars/String): String - A summary of the policies associated to the selling plan group.
* [translations](/docs/api/admin-graphql/2025-01/objects/Translation): Translation! - The published translations associated with the resource.

## Connections
* [productVariants](/docs/api/admin-graphql/2025-01/connections/ProductVariantConnection): ProductVariantConnection!
* [products](/docs/api/admin-graphql/2025-01/connections/ProductConnection): ProductConnection!
* [sellingPlans](/docs/api/admin-graphql/2025-01/connections/SellingPlanConnection): SellingPlanConnection!



## Related queries
* [sellingPlanGroup](/docs/api/admin-graphql/2025-01/queries/sellingPlanGroup) Returns a Selling Plan Group resource by ID.
* [sellingPlanGroups](/docs/api/admin-graphql/2025-01/queries/sellingPlanGroups) List Selling Plan Groups.

## Related mutations
* [sellingPlanGroupAddProductVariants](/docs/api/admin-graphql/2025-01/mutations/sellingPlanGroupAddProductVariants) Adds multiple product variants to a selling plan group.
* [sellingPlanGroupAddProducts](/docs/api/admin-graphql/2025-01/mutations/sellingPlanGroupAddProducts) Adds multiple products to a selling plan group.
* [sellingPlanGroupCreate](/docs/api/admin-graphql/2025-01/mutations/sellingPlanGroupCreate) Creates a Selling Plan Group.
* [sellingPlanGroupUpdate](/docs/api/admin-graphql/2025-01/mutations/sellingPlanGroupUpdate) Update a Selling Plan Group.

## Related Unions

## Examples
### Retrieve information about a selling plan group
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query sellingPlanGroups { sellingPlanGroup(id: \\\"gid://shopify/SellingPlanGroup/1\\\") { id, name, merchantCode, appId, description, options, position, createdAt, sellingPlans(first: 1) { edges { node { id } } } productVariants(first: 1) { edges { node { id } } } productVariantCount, summary, products(first: 1) { edges { node { id } } } productCount, appliesToProduct(productId: \\\"gid://shopify/Product/1\\\"), appliesToProductVariant(productVariantId: \\\"gid://shopify/ProductVariant/1\\\") app { id } } }\"\n}'\n"
Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n  data: `query sellingPlanGroups {\n    sellingPlanGroup(id: \"gid://shopify/SellingPlanGroup/1\") {\n      id,\n      name,\n      merchantCode,\n      appId,\n      description,\n      options,\n      position,\n      createdAt,\n      sellingPlans(first: 1) {\n        edges {\n          node {\n            id\n          }\n        }\n      }\n      productVariants(first: 1) {\n        edges {\n          node {\n            id\n          }\n        }\n      }\n      productVariantCount,\n      summary,\n      products(first: 1) {\n        edges {\n          node {\n            id\n          }\n        }\n      }\n      productCount,\n      appliesToProduct(productId: \"gid://shopify/Product/1\"),\n      appliesToProductVariant(productVariantId: \"gid://shopify/ProductVariant/1\")\n      app {\n        id\n      }\n    }\n  }`,\n});\n"
Ruby example: "session = ShopifyAPI::Auth::Session.new(\n  shop: \"your-development-store.myshopify.com\",\n  access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n  session: session\n)\n\nquery = <<~QUERY\n  query sellingPlanGroups {\n    sellingPlanGroup(id: \"gid://shopify/SellingPlanGroup/1\") {\n      id,\n      name,\n      merchantCode,\n      appId,\n      description,\n      options,\n      position,\n      createdAt,\n      sellingPlans(first: 1) {\n        edges {\n          node {\n            id\n          }\n        }\n      }\n      productVariants(first: 1) {\n        edges {\n          node {\n            id\n          }\n        }\n      }\n      productVariantCount,\n      summary,\n      products(first: 1) {\n        edges {\n          node {\n            id\n          }\n        }\n      }\n      productCount,\n      appliesToProduct(productId: \"gid://shopify/Product/1\"),\n      appliesToProductVariant(productVariantId: \"gid://shopify/ProductVariant/1\")\n      app {\n        id\n      }\n    }\n  }\nQUERY\n\nresponse = client.query(query: query)\n" 
Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n  `#graphql\n  query sellingPlanGroups {\n    sellingPlanGroup(id: \"gid://shopify/SellingPlanGroup/1\") {\n      id,\n      name,\n      merchantCode,\n      appId,\n      description,\n      options,\n      position,\n      createdAt,\n      sellingPlans(first: 1) {\n        edges {\n          node {\n            id\n          }\n        }\n      }\n      productVariants(first: 1) {\n        edges {\n          node {\n            id\n          }\n        }\n      }\n      productVariantCount,\n      summary,\n      products(first: 1) {\n        edges {\n          node {\n            id\n          }\n        }\n      }\n      productCount,\n      appliesToProduct(productId: \"gid://shopify/Product/1\"),\n      appliesToProductVariant(productVariantId: \"gid://shopify/ProductVariant/1\")\n      app {\n        id\n      }\n    }\n  }`,\n);\n\nconst data = await response.json();\n"
Graphql query: "query sellingPlanGroups {\n  sellingPlanGroup(id: \"gid://shopify/SellingPlanGroup/1\") {\n    id,\n    name,\n    merchantCode,\n    appId,\n    description,\n    options,\n    position,\n    createdAt,\n    sellingPlans(first: 1) {\n      edges {\n        node {\n          id\n        }\n      }\n    }\n    productVariants(first: 1) {\n      edges {\n        node {\n          id\n        }\n      }\n    }\n    productVariantCount,\n    summary,\n    products(first: 1) {\n      edges {\n        node {\n          id\n        }\n      }\n    }\n    productCount,\n    appliesToProduct(productId: \"gid://shopify/Product/1\"),\n    appliesToProductVariant(productVariantId: \"gid://shopify/ProductVariant/1\")\n    app {\n      id\n    }\n  }\n}\n"
#### Graphql Input
null
#### Graphql Response
{
  "data": {
    "sellingPlanGroup": {
      "id": "gid://shopify/SellingPlanGroup/1",
      "name": "Subscribe & Save",
      "merchantCode": "sub-n-save",
      "appId": "gid://shopify/App/1",
      "description": null,
      "options": [
        "Delivery every"
      ],
      "position": null,
      "createdAt": "2023-07-16T19:21:25Z",
      "sellingPlans": {
        "edges": [
          {
            "node": {
              "id": "gid://shopify/SellingPlan/1"
            }
          }
        ]
      },
      "productVariants": {
        "edges": [
          {
            "node": {
              "id": "gid://shopify/ProductVariant/1"
            }
          }
        ]
      },
      "productVariantCount": 1,
      "summary": "1 delivery frequency, 25-26% discount",
      "products": {
        "edges": [
          {
            "node": {
              "id": "gid://shopify/Product/1"
            }
          }
        ]
      },
      "productCount": 1,
      "appliesToProduct": true,
      "appliesToProductVariant": true,
      "app": {
        "id": "gid://shopify/App/1"
      }
    }
  }
}