We are experiencing an issue with the Shopify Functions API where the buyerIdentity field is returning as null. This field is crucial for our app to detect customer metafield information and to apply discounts accurately. We have entered the email of an existing customer in the checkout, but the buyerIdentity is still null
We would like to know if there are any known settings, configurations, or bugs within Shopify that might cause the buyerIdentity to not be present in the input from the Shopify Functions API. For instance, we discovered that specific settings, such as the “compare price hiding” feature in Shopify markets, can affect how data is reported.
Any insights or guidance on resolving this issue would be greatly appreciated.
Hi Seun and Tobe, is it possible the store is using Dynamic Checkout buttons similar to this other issue?
There also may be some limitations if the merchant is using their own API to pull the cart details from shopify, preventing the logged in customer’s customerAccessToken from being associated with the cart.
Other than that, a potential safeguard could be to enable “Accounts are required” in the store settings, which would ensure customers are authenticated before proceeding to checkout.
Coming from the discounts perspective, other than these two limitations I am unaware of anything else that could be preventing the buyer identity from showing up. If that doesn’t help, I’ll bring it to the attention of our customer accounts team to see if they have anything else to add.
It doesn’t look like the app needs any access scopes for this info, though I’m assuming you have attained level 2 access of protected customer data, as I see that’s required according to the graphql API for buyerIdentity, dropping the link here anyway in case it’s useful at all for this issue.