Shopify webhook filter on shopifyOrder model not being applied to shopifyOrderLineItem model
The webhook filter on the
shopifyOrder
model works well however the shopifyOrderLineItem
model has been getting populated with line items that have no order ID.
We don't use syncing at all and a sync has never been ran for any shop in production.
I can't see how these order line items are getting created. I don't see anything in the logs for them. They are not happening right away on every order. Yesterday a bunch of these no order order line items were created around 8:20pm. This makes me think some kind of reconciliation is happening by Gadget?
When I create an order manually it gets filtered properly and no order line items are created so I can't reproduce it.
There are over 5M order line items and less than 9k orders.
This is for https://send-to-many.gadget.app/4 Replies
I'm going to write a script to start bulk deleting these order line items unless there is a better way to remove them.
I added a check in the create action of the shopifyOrderLineItem model to ignore records without an orderId.
In the logs I can see that starting around 8:15PM CST yesterday thousands of records attempted to get created without an associated order.
There is a cron job (reconciliation?) getting run every day starting around 1:15am UTC and I'm not sure how to control that
Hi Mark,
shopifyOrder
and shopifyOrderLineItem
are both sync only fields, which will be synced by Gadget via the scheduledShopifySync.ts
I have a link to our docs on sync only fields here:https://docs.gadget.dev/guides/plugins/shopify/syncing-shopify-data#sync-only-models
when you mention the shopifyOrderLineItem
orderId
do you mean the id
or the order
field?Hey it doesn't look like
shopifyOrder
and shopifyOrderLineItem
are sync only models. Shopify order has several webhooks and the order line items come with those order webhooks. From my understanding the order line items should only be populated when the order webhooks come in but in the logs I can see the order line items getting created with no associated order
and the order itself not being created.
I can see in the logs that this is running everyday on a schedule but there is no scheduledShopifySync
action in our project so I don't know what is triggering this.
You can see yesterdays batch of order line items attempt to be created. I set up logic to not actually create these anymore but I added logs.
Trace id: bc5c29be59ffbaba7472592385e06950We're having a look, thank you for the traceId