How to determine the correct sale date for line items in editted orders

New Member
1 0 0

Currently when determining the sale date of a line item i've been using the date that the encompassing "order" was processed. However, since the introduction of order "edits" i've noticed that line items can now have a different sale date to the order and I'm wondering how this can be identified in the API, as there are no dates attached to line items. From what I can see this typically occurs when a customer swaps a product for a different one. They might by 3 items, then in a few days they'll swap one of those items for a different one. With my current system of processing orders this is treated as 4 sales on the initial sale date, and one refund at the swap date. However in the shopify app this is shown as 3 sales on the initial sale date, then 1 sale and 1 refund on the refund date. Should I be using the refund date for these swap sales? If so, how can I identify which returns are swap returns and which are just regular returns?

Let me know if any further details are required.

Replies 0 (0)