Can someone help me understand this. In my current system all my orders come in with a “Waiting for merge” status (we did that with an automation rule). I then have a Python script that update that status to “pending” after 1 business day to give us time to merge the orders.
while True:
for order in sh.query_orders(match={"fulfillment_status": "Waiting for merge", "shop_name": "moi-dabord.myshopify.com"},
sort=["+order_date"],
data=["id", "shop_name", "order_number", "fulfillment_status", "order_date"]):
# if expired change status
order_datetime = datetime.strptime(order["order_date"], '%Y-%m-%dT%H:%M:%S')
if datetime.utcnow() > (order_datetime + BDay(1)):
__log__.info(f'Updating order {order["order_number"]}')
sh.mutation_order_update(order_id=order["id"],
data={"fulfillment_status": "pending"})
__log__.info("Sleep for 30 minutes")
time.sleep(1800)
The issue is that these orders do NOT appear in the packing app if I select “status: Default” in the dropdown.
It dosent appear in the picking app either.
It will show up in the packing app only IF i do it manually:
Select all orders
A bulk edit on all orders
Update the status to Default
Am I setting the wrong status with the API? Should it be different than “pending”?
I tried “default”, “Default”, “unfulfilled” and it sets the status to “no status”. “pending” does change the status to “Default”, but only partially (a.k.a not for the packing app or the picking app)?
In other words, what’s the appropriate way to set an order status to “Default” using the API.
Hi @hansdaigle!
Our apologies for the delayed response about this.
Do you happen to have a request ID of when you updated an order status using the Public API?
Then, with that information we can investigate further on our end to see why its not working.
Hi @hansdaigle
Thank you very much for that detailed description of the issue and the video!
I edited it because it had some sensitive information (password) on the video, but we got that part so thanks!
Allow us to do some troubleshooting and investigation regarding this and get back to you asap
I updated my script with the new mutation and it’s working correctly now, thank you so much for the fix! Does that mean we shouldn’t update the order fulfillment_status using the order_update mutation?
This new mutation also creates 2 entries in the logs:
Hey @hansdaigle !
Thanks for pointing that out. I will make a ticket for our engineers to remove that extra empty note.
Yeah I assume that the order_update_fulfillment_status is more specific and probably contemplates an “extra step” upon updating the order values, so I will ask internally, because maybe we want to remove the ability of updating the order status form the order_update mutation or fix it