Hi,
In the GraphQL admin API, there is currently no strong link between an order and the market is was placed through (please correct me if I missed something there). So the way we have to identify which market the order was placed through is to first extract the country name of the shipping address :
And have another direct query on the markets to check which one this country belongs to :
This could be fine if the label of the regions/countries were consistent between the order’s shipping address and the markets’ region name. However, for some cases the label is different :
This has forced us to build a list of label exceptions, that we can only react to when they trigger an error in our workflows :
Those are all the differences we have encountered so far. Going forward, it would be nice to :
- either have direct access to the market on the Order object
- or have the country codes returned by the market configuration
- or have consistent country labels between the order and the market
P.S. : I am aware the the query marketByGeography exists ; this is however very suboptimal as it would force us to perform a query for each different country encountered in our workflows, without hard caching between each execution, as our markets configuration can move pretty often.
Also, some form of persistence on the order would be nice, to know which market the order belonged to at the time it was placed, even if its respective country moved between markets since.
Tell me what you think !




