Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

How to get "buyer_accepts_marketing" filed in custom event

How to get "buyer_accepts_marketing" filed in custom event

JackLin_PG
Shopify Partner
8 0 1

Checkout extensibility is going to replace custom checkout.liquid so we are migrating our third-party event to custom event.

We want to send a consent event when the user consents buyer_accepts_marketing filed, but there is no buyer_accepts_marketing filed in custom event like checkout.liquid. How to get 

buyer_accepts_marketing in custom event or any suggestions?
Reply 1 (1)

Liam
Community Manager
3108 344 904

Hi  JackLin_PG,

 

There is a buyerIdentity API for checkout UI extensions that has an acceptsMarketing field on it which will work when your app has the customer data scope. Would this work for your use case? 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog