Order Update Webhook

Hello!

I just want to know that is there any webhook event in your system that can be triggered on an order update? Let’s say, I want to raise an event if the order fulfillment status is updated, order items are updated, or the order price and quantity are updated??

Please let me know the solution in case the above-mentioned events are not available.

Thanks!

Hello @JMMTech!

These are the webhooks tied to changes in orders:

  • Shipment Update: When an order is shipped, partially or entirely. It contains the information on the shipment.
  • Order Canceled: Triggers when fulfillment status changed to canceled.
  • Return Update: This one triggers when an order is returned, specifying which line items were returned.
  • Tote Complete: All pickable items on an order were picked.
  • Order Packed Out: When the packing process is complete.
  • Order Allocated: When line items have been allocated in an order.
  • Order Deallocated: When line items have been deallocated in an order.

There is no current webhook for changes in other attributes, such as those in the order details panel or prices and ordered quantities in line items.

I will let you know as soon as I have an update on your last question.

Kind regards,

TomasFD

Hi @tomasfd,

Is there a timeline to develop such webhook (order update or order status update)? We need to sync Shiphero orders with another system, and this webhook would be the best solution. Also, there are some orders created by the public API that don’t get stock allocated right away (already opened a ticket with support), and this webhook would help to alert such cases.

Thanks.

1 Like

Hello @pedro!

Unfortunately, this is still unplanned.

The best workaround at the moment would be doing something similar to the following:

query{
  orders(updated_from:"ISODateTime"){
    request_id
    complexity
    data(first:10 after:""){
      pageInfo{
        hasNextPage
        endCursor
      }
      edges{
        node{
          #fields
        }
      }
    }
  }
}

In this case, you could run this query once an hour using the filter updated_from with the value equal to now minus one hour. For example, if today is February the 2nd of 2022 and it’s 16:30, you should send updated_from:"2022-02-07 15:30:00" as your filter.

If you do that every hour, you should always have the orders up to date.

Please let me know if that doesn’t help.

Have a nice day!
TomasFD

Excellent, thanks @tomasfd.

The query is not expensive so it should work.

Best regards

@tomasfd it seems that the Order query result doesn’t bring any “updated_at” datetime. How can we get or calculate that information? from the Order History?

Thanks

Hello @pedro!

That field inside the orders’ object is scheduled for this Q.

For now, you can get it like this:

query{
  order_history(order_id:"string0"){
    request_id
    complexity
    data(first:1 sort:"-created_at"){
      edges{
        node{
          created_at
        }
      }
    }
  }
}

Have a nice day!
TomasFD

Hi @tomasfd!

Thanks.

Best regards

1 Like