Hi!
I have a problem creating products through the API. I made a process to make a massive load of some of our products. The problem is that some of them were created manually, then erased, and now I can’t create the same product again. It tells me that the SKU already exists. I checked out and there isn’t any products with that SKU in Shiphero or the API.
I need to create those products with the same SKUs that had been created before. I can’t change the SKUs. What can be the problem and how do I solve it?
I was trying with this SKU: TIK-7804630010063
Hey @marioreinike,
Thanks for reaching out!
I believe that this is related to an ongoing issue that our Engineers will be looking into soon. I’ll go ahead and add this example as well as your feedback to that ticket.
Best,
RayanP
Hey @marioreinike
Thanks for hanging in there all this time.
I believe the fix for this issue has been pushed, could you let me know if you’re still experiencing issues on your end?
Best,
RayanP
Hi @sh-agent !
Thanks for your support. No, unfortunately, the issue persists. Shiphero does not allow me to create the following SKUs:
TIK-LUM00892
TIK-LUM15398
TIK-LUM15400
TIK-PTFRTFUR0212U
TIK-PTFRTMER0212U
TIK-7804630010803
TIK-PTFRNPEP0180U
TIK-PTFRTPAT0212U
TIK-7804630010520
TIK-PTMATQUI0180U
TIK-PTMACCHI0140U
TIK-PTFRNAND0180U
TIK-7804630010001
TIK-7804630010759
TIK-PTMATHUM0180U
TIK-1645816695123
TIK-1645816557807
TIK-PTFRTCHI0212U
TIK-7804630010421
TIK-7804630010049
TIK-7804630010070
TIK-PTFRNPES0180U
TIK-PTFRTRAQV0170U
TIK-PTPOPCSA0170U
TIK-7804630010810
TIK-PTCERQUI0200U
TIK-7804630010063
TIK-PTPOPCVA0170U
TIK-PTFRNPAT0180U
TIK-7804630010780
TIK-PTFRTPAL0212U
TIK-PTFRNACD0180U
TIK-PTFRTRACG0170U
TIK-PTMACCUR0140U
TIK-7804630010797
TIK-LUM15399
TIK-PTFRTHIL0180U
TIK-LUM00894
TIK-LUM00895
TIK-PACKDIADELPADRE
TIK-Test1
TIK-packBTS
TIK-PTCERCAC0200U
TIK-7804630010728
TIK-7804630010766
TIK-LUM00896
TIK-PTFRTPAT0212U_ED_18
The response error is the following:
[
{
message: 'A product with sku TIK-PTFRNPEP0180U already exists',
operation: 'product_create',
field: 'product_create',
request_id: '63209d5ddc31503cfa041a78',
code: 6
}
]
It is telling me the same problem, that these products already exist. But they are not found neither in the API or the Shiphero App.
Hey @marioreinike,
Thanks for letting me know. I’ll pass along this feedback and look into it myself as well.
I’ll let you know of any updates here.
Best,
RayanP
Hey @marioreinike,
Just wanted to let you know we’re still looking into this and trying to pinpoint what’s going on here. Do you remember how you deleted these SKU’s the first time?
Best,
RayanP
Yeah I remember, I deleted them through the products bulk edit functionality from the Shiphero App.
1 Like
Hi @sh-agent , any updates?
Hey @marioreinike,
Unfortunately I don’t have an update at the moment.
I have still been investigating this issue and looking for a workaround. I’m not sure but I believe that the bulk delete function didn’t completely remove these SKU’s from our database and that might be what the issue is.
Thank you for your continued patience.
Best,
RayanP
Thanks for your response. Yeah I believe it can be a problem like that. Is this error consistent? I mean, if I do the bulk delete again, this is going to happen? or it happened just once and it could not happen again?
Hey @marioreinike,
I just tested this myself and I was able to recreate a SKU after bulk deleting it. However, I’d advise to try not to bulk delete any SKU’s for the time being if you can help it. This ticket is also in Engineering so I’ll let you know when there are updates on that side.
Best,
RayanP
Hey @marioreinike,
Looks like TIK-LUM00892 was able to be created without issue. Could you let me know if you have issues creating the other SKU’s?
Also the engineers are curious which account you did the bulk delete in? (3PL or Child0
Please let me know if you have any questions or concerns!
Best,
RayanP
How did you create it? I tried from the API with all of the products that a mentioned before (including TIK-LUM00892) and it still gives me the error that they are already created.
And about the bulk delete, I’m sorry, I don´t remember if I did it through the 3pl or the child account.
Hey @marioreinike,
I created it using a simple product_create mutation:
mutation {
product_create(
data: { name: "TIK-PTFRNPEP0180U", sku: "TIK-PTFRNPEP0180U", warehouse_products: [{warehouse_id:"8564" on_hand:0}] }
) {
request_id
complexity
product {
id
legacy_id
account_id
name
sku
}
}
}
Could you share some of the request_id;s you got when running into the error, so I can pass those along to Engineering.
Thanks!
Best,
RayanP
Ok @sh-agent this thing is getting really strange haha.
From my computer, I can make a request to create one of the products, and it works perfectly. But when I try to create it from the web server (hosted on US), it tells me that error (I checked both requests and are exactly the same).
For example, you can see the request ids:
- From the web server (it responds with an error): 632b7f825cf6c7f88c1094a8
- From my computer (it works fine): 632b8334a24e50d4738dfa69
Do you manage any database replicas across different geo-locations? or maybe a caching service?
Ok I found something, this is the strangest thing ever. As I said before, the request was working through my computer and not from the web server. And this is because in the web server we have all the data about our products, like dimensions, names, descriptions, prices, packing notes, etc. So, I started testing which one of the fields is making the request to throw the error.
And that field is the packer_note.
If I do not put the packer_note in the request, I can create the product with no problems. If I put the packer_note in, the API responds that the product already exists.
See screenshots:
-
This request does not work (632b8ccd25b5feb668a0b4dd
):
-
This one does work fine (632b8d4545715f8c26e1f846
):
I hope this info can help you find the problem.
1 Like
Hey @marioreinike,
Wow that is really really peculiar.
I’m going to update the Engineering Ticket with this new info, We really appreciate the detailed post. Going to look into possible work arounds, and will update you with that as well as how this is progressing through Engineering.
Thanks so much!
Best,
RayanP
Ok thanks @sh-agent ,
Yeah, now that I know this issue, in the worst case I just remove the packing note for all of these products and we can work with it, but I just wanted to let you know what was causing this error, so you can understand what’s going on.
Thanks!
1 Like
Hey @marioreinike,
You were entirely right, the issue is bulk delete is not properly removing the packer_note
in our db.
If you create these SKU’s without the packer_note
I believe their old packer_notes
will show up automatically since the data was never erased. Would you like us to run a clean up and remove all the packer_notes
for that list of SKU’s, so you can put new ones?
Thanks for the help!
Best,
RayanP
Ok! Let’s do that so we can create the products with the packer notes.
Thanks!