The customer on Shopify isn't included on shopifyCustomer record. How can I fix this?
We got this warning message below:
GGT_RECORD_NOT_FOUND: Can’t run action update since there’s no shopifyCustomer record with id=8194478080219
NotFoundError: GGT_RECORD_NOT_FOUND: Can’t run action update since there’s no shopifyCustomer record with id=8194478080219
We trigger shopifyCustomer.update action after receiving orders/update webhook.
traceId: c25a194b8b7b9cc566598c5e415e3d58
We can't log in to this store because the store is in production,
but I think this customer exists on Shopify but not on Gadget, since this order (id: 6227871531227) includes customer: '8194478080219' .
I tried Sync from the Installs page. But the customer doesn't show up.
connectionSyncId = "59638" ( I can't get the trace Id because of a error There was an error running your query, please try again.Error message: There was a problem executing that query
on the Logs page)7 Replies
appName:
rw-ranky
env:
production
Hello,
Its definitely possible that Gadget hasn't gotten the webhook for customer creation. I think that your best course of action in that case is to label the order as "having done work" or not (typically a boolean) then having some other logic that will rectfify missing data. That could potentially be on the customer create side of things
Hello Antoine, thank you for the response.
I'm sorry, I may not fully understand.😭 We want to create a shopifyCustomer record for this customer first, and then update it based on the shopifyOrder record. Is that possible?
Why would you want to create the customer record? Shopify typically handles that.
We thought that we would not be able to process this customer even if the customer is updated in the future.
Also, I think that the current customer's membership rank ( updated for a metafield when orders/update webhook is received ) is not correct.
The problem here is race conditions. You have to handle them in some way. My thought was to process order data after the customer is created so that you don't run into an error. You could return early from the order creation if the customer doesn't exist. There's really no other way around this
I understand. I'll do that moving forward. 🙌
I'm currently contacting Shopify to resolve this issue.