CompanyLocation GraphQL only returning post-migration orders, how to access migrated orders

I’m trying to create a report for new customers based on the company location instead of a user’s email as one location can have many emails and it skews the reporting. To do this, I’ve built an app and using the companyLocations GraphQL query.

The issue I’m having is the client’s store has been migrated to Shopify recently (3 months ago) so when I look at the orders on the companyLocation only the orders placed through the shopify store are retreived although when looking at the company location in the admin I can see a log of all orders from over the past year. I noticed the recent orders are attributed to ‘Online Store’ for the channel and the old migrated orders aren’t attributed to anything.

Is there away to retrieve all orders including migrated orders so I can fetch the first order that companyLocation has ever made or is there a better way to report on this and I’m coming at it from the wrong angle?

1 Like

Hey @JayLewis, do you have an example of how the orders were imported? There was a similar question posted a few weeks ago around the best way to import orders so that they are properly associated with a company.