Product API returns non-existing product

Hello,

Some SKUs do not exists anymore in ShipHero, but API still shows that products are active, so we are not able to detect removed products.

When user tries to search SKU in ShipHero, then it’s not there. But if query product by SKU via API, then is shows that product exists and active. Is this some issue with API? Example of request ID 6274d23c6bc30f2ade7833d2.

Thank you

Hello @sb2020!

What process did you use to delete those products?

Kind regards,
TomasFD

Sorry for delay. Products were removed using Bulk Delete function in ShipHero by going to the product screen, selecting a checkbox at the front of a SKU, and then clicking Bulk Delete. Here is one more example of request ID that returns SKU not visibke in ShipHero: 62f37e155322026d9998bd93.

@tomasfd Could please take a look at this issue? We have one more client with the same problem, here is one more example of request ID that returns SKU not visibke in ShipHero: 62fa5314e9b1605f64b76272.

Hey @sb2020,

I’m currently investigating this issue. I’ll have an update for you soon.

Best,
RayanP

Hey @sb2020,

I wasn’t able to reproduce your issue, however I was able to find a fix for it.

If you run into any problem SKU’s such as “Bp_ScendidocciaPerla_Prealpi_40x60” you can delete them using the Public API and it should solve your issue. I used this mutation here:
mutation { product_delete(data: { sku: "Bp_ScendidocciaPerla_Prealpi_40x60" }) { request_id complexity } }

Please let me know if you have any questions or concerns!

Best,
RayanP

Thank you @sh-agent. But this solution does not work for us. We have a lot of clients who connect ShipHero accounts to our application, and each account may have many deleted SKUs, it’s not feasible for us to find and delete each problem SKU separately. We need some way to automatically detect deleted SKUs. Is it possible to fix API so that it does not return products which were deleted in ShipHero?

Hey @sb2020,

Wanted to let you know that we’re still looking into this issue. We still haven’t been able to reproduce this issue on our end. This problem is related more so to the bulk delete not clearing out the product data table in our DB compared to the API.

Best,
RayanP

@sh-agent or @tomasfd we seem to be hitting this issue as well.

Many products were bulk deleted via the UI (app.shiphero.com) but they are still returned by API requests.

This is the closest post I found in the developer forum so I wanted to revive this one rather than creating a new topic, we can provide examples if needed.

To reproduce:
Have multiple warehouses
Create a product in all warehouses
Bulk Delete the product from some warehouses
Query for warehouse products with the sku, and all the deleted warehouse products are included in the result.

This is particularly troublesome for us since they’re still ‘active’ in the API response.

Hey @originsid,

Thanks for reaching out, and providing the steps to reproduce!
Are you able to provide a request id for an example where the SKU is not visible in the UI?

Please let me know if you have any questions or concerns.

Best,
RayanP

Yessir @sh-agent !

“request_id”: “6569f27e23f2533052a11c49”,

Note that for this request, we specified “active” as one of our query parameters.

The query didn’t include the “inactive” sku in one of our other warehouses, which is excellent/expected.

The query did include the “active” sku in several warehouses where we deleted those warehouse products using the UI (app.shiphero.com)

Please let us know if there’s any other info we can provide to help.

Thank you!

-Sid

Hey @originsid,

Thanks for providing us with that request id and the extra details. I really appreciate it!

I ran a query for SKU 5000066-002-85EE and had 4 results return through the Public API as well:

"data": {
        "edges": [
          {
            "node": {
              "id": "UHJvZHVjdDo0MTg4MDE4Mzk=",
              "legacy_id": 418801839,
              "warehouse_identifier": "Backorder Origin Labs Wilton",
              "active": true
            }
          },
          {
            "node": {
              "id": "UHJvZHVjdDo0MTg4MDE4NDU=",
              "legacy_id": 418801845,
              "warehouse_identifier": "Backorder Primary",
              "active": true
            }
          },
          {
            "node": {
              "id": "UHJvZHVjdDo0MTg4MDE4NDI=",
              "legacy_id": 418801842,
              "warehouse_identifier": "Nutrition Jay",
              "active": true
            }
          },
          {
            "node": {
              "id": "UHJvZHVjdDo0MTM4NjQ4MTc=",
              "legacy_id": 413864817,
              "warehouse_identifier": "Primary",
              "active": true
            }
          }
        ]
      }
   

This also correlates with what I see in appdot when I search by SKU.

Were all results here bulk deleted previously? Meaning that this product shouldn’t show up in appdot or the Public API.

Please let me know if you have any questions or concerns.

Best,
RayanP

Hey @sh-agent!

This Product/SKU only now exists in our “Primary” and “North Carolina One” warehouses, according to app.shiphero.com when filtering both active and inactive products.

It is inactive in the “Primary” warehouse, and active in the “North Carolina One” warehouse.

We don’t see this sku in any other warehouses when using app.shiphero.com.

We used app.shiphero.com to bulk delete this sku along with many others from the additional warehouses “Backorder Origin Labs Wilton”, “Backorder Primary”, and “Nutrition Jay”

If you’re able to see the sku in those warehouess when using appdot, that’s not the same behavior we’re seeing.

“Were all results here bulk deleted previously? Meaning that this product shouldn’t show up in appdot or the Public API.”

Not all results, just the ones that weren’t in the “North Carolina One” or “Primary” warehouses, so it should show up in appdot and the Public API for those two warehouses, but should not show up for any other warehouses.

Please let me know if there’s anything else we can clarify to help pin this down.

Thank you!

-Sid

1 Like

Hey @originsid,

Thank you again for the insight and explanation!

Could you please share a screenshot of your search for SKU 5000066-002-85EE in appdot? I can present this case to the team with this last bit of information.

Please let me know if you have any questions or concerns!

Best,
RayanP

@sh-agent apologies for the delay, we’re getting close to data we don’t readily share publicly, but here’s a screenshot showing that, as well as the query parameters, and the response we’re getting:

*note: to reproduce, search products for that sku, and filter “Active: All”

Query:

query {
  warehouse_products(sku:"5000066-002-85EE") {
    request_id
    data(first:100) {
      pageInfo {
        hasNextPage
        endCursor
      }
      edges {
        node {
          id
					active
          warehouse_id
					warehouse {
						identifier
					}
          updated_at
          product {
            id
            sku
            barcode
            updated_at
          }
        }
      }
    }
  }
}

Query response:

{
	"data": {
		"warehouse_products": {
			"request_id": "657090403106d0b2e067a0fe",
			"data": {
				"pageInfo": {
					"hasNextPage": false,
					"endCursor": "YXJyYXljb25uZWN0aW9uOjQ="
				},
				"edges": [
					{
						"node": {
							"id": "UHJvZHVjdDo0MTg4MDE4Mzk=",
							"active": true,
							"warehouse_id": "V2FyZWhvdXNlOjYxMTcz",
							"warehouse": {
								"identifier": "Backorder Origin Labs Wilton"
							},
							"updated_at": "2023-09-14T21:05:29",
							"product": {
								"id": "UHJvZHVjdEluZm86MzA4MjQ3NTU0",
								"sku": "5000066-002-85EE",
								"barcode": "197088026739",
								"updated_at": "2023-12-04T15:47:50"
							}
						}
					},
					{
						"node": {
							"id": "UHJvZHVjdDo0MTg4MDE4NDU=",
							"active": true,
							"warehouse_id": "V2FyZWhvdXNlOjYxMTcy",
							"warehouse": {
								"identifier": "Backorder Primary"
							},
							"updated_at": "2023-09-14T21:05:29",
							"product": {
								"id": "UHJvZHVjdEluZm86MzA4MjQ3NTU0",
								"sku": "5000066-002-85EE",
								"barcode": "197088026739",
								"updated_at": "2023-12-04T15:47:50"
							}
						}
					},
					{
						"node": {
							"id": "UHJvZHVjdDo0MTM4NjQ4MTg=",
							"active": false,
							"warehouse_id": "V2FyZWhvdXNlOjgwNTg0",
							"warehouse": {
								"identifier": "North Carolina One"
							},
							"updated_at": "2023-12-01T11:24:32",
							"product": {
								"id": "UHJvZHVjdEluZm86MzA4MjQ3NTU0",
								"sku": "5000066-002-85EE",
								"barcode": "197088026739",
								"updated_at": "2023-12-04T15:47:50"
							}
						}
					},
					{
						"node": {
							"id": "UHJvZHVjdDo0MTg4MDE4NDI=",
							"active": true,
							"warehouse_id": "V2FyZWhvdXNlOjY4ODcw",
							"warehouse": {
								"identifier": "Nutrition Jay"
							},
							"updated_at": "2023-09-14T21:05:29",
							"product": {
								"id": "UHJvZHVjdEluZm86MzA4MjQ3NTU0",
								"sku": "5000066-002-85EE",
								"barcode": "197088026739",
								"updated_at": "2023-12-04T15:47:50"
							}
						}
					},
					{
						"node": {
							"id": "UHJvZHVjdDo0MTM4NjQ4MTc=",
							"active": true,
							"warehouse_id": "V2FyZWhvdXNlOjk4Nw==",
							"warehouse": {
								"identifier": "Primary"
							},
							"updated_at": "2023-11-29T21:19:12",
							"product": {
								"id": "UHJvZHVjdEluZm86MzA4MjQ3NTU0",
								"sku": "5000066-002-85EE",
								"barcode": "197088026739",
								"updated_at": "2023-12-04T15:47:50"
							}
						}
					}
				]
			}
		}
	},
	"extensions": {
		"throttling": {
			"estimated_complexity": 101,
			"cost": 6,
			"cost_detail": {
				"warehouse_products": {
					"items_count": 5,
					"cost": 1,
					"total_cost": 6,
					"fields": {}
				}
			},
			"user_quota": {
				"credits_remaining": 1993,
				"max_available": 2002,
				"increment_rate": 30
			}
		}
	}
}

Hey @originsid,

Thanks for providing this detailed information!

I’ll have an update for you shortly.

Best,
RayanP

Hey @originsid,

Thanks for hanging in there!

I’ve created a fresh engineering ticket for this issue. Thank you again for the detailed information - it goes a long way.

I’ll update you here when there are any updates to share.

Best,
RayanP

Excellent, thank you @sh-agent !

Definitely understand it’s a huge help to have clear info on a problem and how to reproduce it before working on a solution for it

:sunglasses::call_me_hand:

1 Like