A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
I have a question regarding response data for customers and orders endpoints.
In customers response there are two columns: accepts_marketing and accepts_marketing_updated_at
In orders response there is one column: buyer_accepts_marketing (and apparently not a timestamp)
In the customer response, accepts_marketing may be False, although buyer_accepts_marketing is True in the orders response.
My question what is the difference between accepts_marketing in the customers response and the buyer_accepts_marketing in the orders response?
Hey @dcteam ,
Those two fields represent the same thing, however one represents a historical value and the other represents a real-time value. If you query the "customer" endpoint, you will receive the information about that customer as it is in our database right now. If you query an Order, you will receiver the information about the customer as it was at the time of order, which can be a completely different set of values than the current data, including their marketing status.
So to clarify, your customer currently does not accept marketing, however at the time of that specific order, they did, which is why that data is stored in the order.
Best,
To learn more visit the Shopify Help Center or the Community Blog.