Can't add API-created product to POS cart affecting specific merchants

Our app creates a new product via the API and then we immediately return this variantId to our POS UI Extension and add it to the cart.

We have merchants who have been using our app for years without issue who began experiencing a weird bug recently where they would get a POS cart / checkout error every time they tried to check out a product created by our app: https://drive.google.com/file/d/17AEMD02P4jzxXiH65EiP9QiDMB5ZWUx6/view?usp=drive_link

We debugged this intensively and double checked publications, status, etc. and we don’t know what’s going on. This merchant is on 10.9.1, at least one other merchant has reported the same issue on 10.8.2.

We are currently logged into their POS account on our own device and as one example, here is a product created via the API by our app hours ago (active and published to POS channel) and we can’t seem to find it at all on their POS device which I believe is likely related. Data Synchronization is up to date, here is a link to the product: https://admin.shopify.com/store/spokandy-chocolatier/products/7214581448784

Video: https://photos.app.goo.gl/DDRn2qrAKh4Yuerj9

1 Like

Here’s a photo a different merchant just sent of what happens when they try to save the cart (with the line item that cannot be checked out) and retrieve it as a Draft Order in POS.

Something has seemingly broken / changed and is preventing products created by our app from being available to POS, this is quite urgent.

@Alan_G do you know what might be going on here? It seems to be affecting merchants across multiple Shopify POS versions, did something change or break in the product / publication API side?

Hey @derrick thanks for flagging this! Just wanted to reach out to you here to let you know our product team is investigating this. Can’t guarantee a turnaround time, but either they or I will update you here once we have more info to share.

Appreciate you reporting this, we’ll get this looked into.

Thanks @Alan_G . We just got off the phone with a merchant who, after they spoke with Shopify support for something unrelated to our app, believes it’s due to the introduction of a new Retail Catalog attribute / field, and our temporary products are missing this.

Is this what’s going on? If so, how do we update our GraphQL calls to include this?

Hey @derrick would you be able to provide us with the query you use for creating the products and publishing them on POS?

@AndyC

  1. first we create the product with this mutation:
mutation productCreate($productInput: ProductInput!) {
  productCreate(input: $productInput) {
    product {
      id
      title
      createdAt
    }
    userErrors {
      field
      message
    }
  }
}

{
  "productInput": {
    "title": title,
    "descriptionHtml": description as string,
    "vendor": productData.vendor,
    "productType": productData.productType,
    "tags": productTags,
    "productOptions": [{
      "name": "Title",
      "values": [{ "name": "Default" }, { "name": variantTitle }]
    }]
  }
}

  1. then we do this query to get the publicationId with name=‘Point of Sale’, then use it in the mutation below
{
  publications(first:15) {
      nodes {
        id
        name
      }
  }
}

  1. and then we publish it to POS
mutation publishablePublish($id: ID!, $input: [PublicationInput!]!) {
  publishablePublish(id: $id, input: $input) {
    userErrors {
      field
      message
    }
  }
}

{
  "productId": "productId",
  "input": {
    "publicationId": "publicationId"
  }
}

We’ve identified a manual fix that works:

Shopify Admin > Markets > Catalogs > All Retail > Check the box for Automatically include new products

We appreciate your quick responses so far, but it’s been nearly 24 hours since we reported this, and we ended up learning about this workaround from one of our merchants. If this was suspected or known internally, is there a reason it wasn’t shared with us earlier?

Also, could you clarify how we can programmatically set the Catalog for new products via the API?

Hey @derrick , thanks for reaching out and reporting this. This one was caused by another feature unrelated to POS, I believe they’re working on fixing the root cause. As for your question about programatically setting the catalog when creating a product, I was told this by someone from that team:

“For the control aspect, I think they can subscribe to webhooks for catalog creation and update the auto publish flag on the publication via graphql publicationUpdate , would that work?“

I have almost zero context on this catalog stuff, but it sounds promising?

@JS_Goupil thanks for chiming in, good to hear from you!

We also have very little context on the catalog stuff, but we can’t be the only app that programmatically creates products that a merchant later wants to check out on POS. Having to listen for catalog creation and then add this individually for each merchant feels too onerous.

Our preferred solution would be one of:

  • Make the auto publish flag true by default, at least for All Retail Catalog. If the recommendation from the Catalog team is for us to do this across the board for any merchant with our app installed, programmatically by listening to webhooks, can’t they just implement the change themselves?

OR

  • Related to the above, any product that gets published to POS channel shouldn’t be then excluded from the All Retail catalog. This lets us just continue to depend on Publications instead of the current breaking change

OR

  • In the same way we can publish a specific product to 'Point of Sale' as a channel, let us do the same for the All Retail catalog (though this involves 2 additional calls - one to retrieve their catalogs, and then one to apply it to the product)

Again, I admit I don’t understand how Catalogs work and interact here, but happy to chat directly with someone on that team about our use case so they can recommend the simplest path forward.

From what we can tell based on our own testing, as of today it appears that the POS team and Catalog team got things sorted, so now if a product is published to the POS channel (but not the “All Retail” Catalog), it will still allow the product to check out as expected.

With guidance from @Brian_Edwards, we also learned how to programmatically publish products to the All Retail Catalog as follows. This requires API version 2025-04 or newer.

  1. Get Catalogs:
   catalogs(first:50) {
        nodes {
            id
            title
            publication {
                id
                name
            }
        }
    }
  1. Find the Catalog titled “All Retail” and grab its corresponding Publication ID, and then publish the product to this catalog:
  mutation PublishablePublish($productId: ID!) {
    publishablePublish(id: $productId, input: {publicationId: "${publicationId}"}) {
      userErrors {
        field
        message
      }
    }
  }

Hey @derrick , just confirming that we did push a fix that should resolve this recently. Please let us know if you see the issue pop up again.