Order sales location

I want to attribute sales to retail stores and web purchases. How can I find the original sales location of the order? Fulfillment would provide me with the location from which the order was fulfilled, but I am concerned with the initial store from which the order originated.

Are you using the REST API or the GraphQL API to get info on orders? There is a location_id field on the REST order resource, which could get the POS location (as suggested in this forum post). If this does not, or you’re using the GraphQL API, then it might be a bit more challenging. One option could be to use order based metafields and set up a process that each order made through the POS will apply a metafield for that specific location, which would be saved on the order and could be used to distinguish where orders originated from.

1 Like

Thank you for your reply. I’ve been using the GraphQL API, but I require this specific information, which seems to be available only through the REST API. However, the documentation for the REST API is also unclear. Concerning the “location_id” field, it mentions that it represents “The ID of one of the locations that was assigned to fulfill the order when the order was created,” suggesting it’s a fulfillment location. Therefore, can I assume this refers to the POS location?