Ad

How To Determine If A Shopify Order Was Placed Via The Amazon Channel?

- 1 answer

I am querying the Shopify API for a specific order and I would like to know how to determine if the order was placed in our Amazon Seller channel and sent to Shopify as it is described in Shopify's documentation: https://help.shopify.com/en/manual/sell-online/amazon-sales-channel/processing-orders. On the section "Fulfilling Orders" of that page it reads:

All new orders placed through Amazon appear in your orders list and are marked as Amazon.

A real JSON response from the Order API looks like this: https://help.shopify.com/en/api/reference/orders/order#show

I could not find any indication that the order might come via Amazon. I did find the fulfillment service (just a simple Ctrl F "amazon") but that is a different thing.

Being a Shopify Plus customer we asked their Guru Support team how they implement the "marked as Amazon" part and the response was:

Guru: Looking at all your orders you won't be able to differentiate. When you click through to a singular order though, you'll be able to see in its timeline that it came from Amazon instead of your Online store.

My team: mmm so if I connect though the API "orders.json?id=xxxx" the only way I can check it came from amazon is though the timeline?

Guru: As far as I'm aware that's the case. I can check with our development team to see if there's another indicator. Would I be able to email you back with any additional findings?

Of course my team is still waiting on an answer from them but I bet someone at SO has already been in this situation before.

Some might want to know why I need to know the order source. We are sending these orders from Shopify into Netsuite via a Celigo connector. Amazon orders need to hit a different GL account than the normal Shopify orders and my task is to code the correct mapping based on some differentiating element or name/value pair from the JSON response.

Ad

Answer

When an order comes down the JSON has a field called source_name and the value should be something like this: sell-on-amazon

"source_name":"sell-on-amazon"

Ad
source: stackoverflow.com
Ad