Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

productSet does not set ownership correctly

productSet does not set ownership correctly

AV_SL
Shopify Partner
40 4 18

I'm migrating to the latest API and am trying to use productSet to create a parent bundle product.

When using productSet - the newly created bundle product is not being associated with the app that created it.

When using productCreate - the newly created bundle product is correctly being associated with the app that created it.

 

In the examples below, I'm using GraphiQL to create the products with 2024-10

 

productCreate

 

mutation createProductMetafields($input: ProductInput!) {
  productCreate(input: $input) {
    product {
      id
      title
      tags
      status
      productType
    }
    userErrors {
      message
      field
    }
  }
}
{
  "input": {
    "title": "GraphiQL productCreate Product",
    "productType": "Bundle",
    "tags": "graphiql-bundle-product",
    "status": "ACTIVE",
    "claimOwnership": {
      "bundles": true
    }
  }
}

 

productCreate result

Screenshot 2024-10-20 at 10.06.41 AM.png

 

 

productSet

 

mutation createProductSynchronous($productSet: ProductSetInput!, $synchronous: Boolean!) {
  productSet(synchronous: $synchronous, input: $productSet) {
    product {
      id
      title
      status
      templateSuffix
      variants(first: 10) {
        edges {
          node {
            id
            title
            price
            compareAtPrice
            requiresComponents
            inventoryPolicy
          }
        }
      }
    }
    userErrors {
      code
      field
      message
    }
  }
}
{
  "productSet": {
    "claimOwnership": {
      "bundles": true
    },
    "productOptions": [
      {
        "name": "Title",
        "values": [
          {
            "name": "Default Title"
          }
        ]
      }
    ],
    "productType": "Bundle",
    "status": "ACTIVE",
    "tags": "graphiql-bundle-product",
    "title": "Graphiql productSet product",
    "variants": [
      {
        "compareAtPrice": 38,
        "inventoryPolicy": "DENY",
        "optionValues": [
          {
            "name": "Default Title",
            "optionName": "Title"
          }
        ],
        "price": 34.2,
        "requiresComponents": true
      }
    ]
  },
  "synchronous": true
}

 

 

result

Screenshot 2024-10-20 at 10.13.16 AM.png

Screenshot 2024-10-20 at 10.14.28 AM.png

Biscuits Bundles App - Create beautiful mix and match bundles using native Shopify bundles functionality.
Replies 0 (0)