Discussing APIs and development related to customers, discounts, and order management.
Reference doc - https://shopify.dev/api/admin/graphql/reference/common-objects/queryroot#orders-2021-07
Hi,
Is 'firstVisit.referralCode' and 'lastVisit.referralCode' on the 'Order' object query-able in any way?
We only want to fetch orders which have 'referralCode' set to specific value. Currently, fetching all the orders and then filtering through them takes a long time.
Is there way to fetch this data efficiently? I looked at the Webhook topic ("Orders/Create") as an alternative, but this would send a message for every order created too, not just the ones with 'referralCode = specificValue'.
orders(first: 100, query: "referralCode:'value'") {
edges {
cursor
node {
id
}
}
}
Thanks!