So order editing is documented here: Edit existing orders
However when an order is edited in Shopify, possibly several times, how should one find the history of order edits or committed calculated orders?
The use case is that we need to synchronize order edits to external systems like ERP/WMS/CRM/etc.
To do so in a simple way, we would need to access some kind of history or list of committed calculated orders. But there do not seem to be any APIs for this?
There is no such API, but you can implement this logic through a webhook.
webhookSubscriptionCreate - GraphQL Admin
Hi there
Try using order agreements fields. pls refer to below code: Hope this can help
query {
order(id: "gid://shopify/Order/116757651") {
agreements(first: 10) {
edges {
node {
id
happenedAt
sales(first: 10) {
edges {
node {
actionType
lineType
quantity
totalAmount {
shopMoney {
amount
}
}
... on ProductSale {
lineItem {
id
name
}
}
}
}
}
}
}
}
}
}
1 Like
Hey that’s not bad! I can see the agreement implements different types.
This might be exactly what was needed 