Track order line delete from Shopify

Highlighted
Tourist
16 0 1

Dear Members,

 

I have one query regarding delete product in Shopify order, How can I track from API side.

 

Let's say I have one product with 1 quantity.

Payment status is Paid and Fulfillment status is Unfulfilled

 

A user going to click on Edit order and remove the item. Here my question is how can I know this product and qty removed by user. Is there any field in line_items parameter or order level, I can identify field name to know.

 

Note:-

Using Python Shopify Library

 

Thanks  

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 167

Hey @poojaz,

 

Try the orders/edited webhook. This will inform you of additions/removals:

 

{
  "order_edit": {
    "id": 78912328793123782,
    "app_id": null,
    "created_at": "2020-02-06T12:43:16-05:00",
    "notify_customer": false,
    "order_id": 820982911946154508,
    "staff_note": "",
    "user_id": null,
    "line_items": {
      "additions": [
        {
          "id": 78643924236718232,
          "delta": 1
        }
      ],
      "removals": [
        {
          "id": 866550311766439020,
          "delta": 1
        }
      ]
    }
  }
}
Notice; Out of office, replies will be delayed until my return. Thanks!
0 Likes
Highlighted
Tourist
16 0 1

Hi @SBD_ ,

 

Thanks for the update but still I am not able to configure in my shopify as I can see only four options in order and orders/edited option is not available. Also not able to see below json key, May I know how can I achieve for the same.

 

"line_items": {
      "additions": [
        {
          "id": 78643924236718232,
          "delta": 1
        }
      ],
      "removals": [
        {
          "id": 866550311766439020,
          "delta": 1
        }
      ]
    }

 

Also want to know,

 

Can I use in python lib as shopify.Orders.Edited() or something like that or any url need to send to shopify.

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 167

Hey @poojaz,

 

Try creating the webhook using the API.

Notice; Out of office, replies will be delayed until my return. Thanks!
0 Likes