New email marketing consent for customers and deprecated fields
API
Effective April 01, 2022
The accepts marketing and related fields were used to indicate if a customer subscribed to all marketing channels. In 2021, we started separating marketing consent into SMS and email channels by introducing SMS marketing consent.
In API version 2022-04, we’re completing that split by deprecating the accepts marketing fields and replacing them with email marketing consent fields. You’ll need to update your apps to use the SMS and email marketing consent fields to send the opt-in level, consent state and the time at which the consent was granted, instead of a simple Boolean to express the marketing consent of customers.
As of GraphQL Admin API version 2022-04, we're deprecating the acceptsMarketing
, acceptsMarketingUpdatedAt
and marketingOptInLevel
fields on the Customer
object and CustomerInput
input object.
The deprecated fields are replaced by the following new fields, that you can access using the emailMarketingConsent
field on the CustomerInput
object:
marketingState
consentUpdatedAt
marketingOptInLevel
For more information, refer to the CustomerInput
input object on Shopify.dev.
As of REST Admin API version 2022-04, we're deprecating the accepts_marketing
, accepts_marketing_updated_at
and marketing_opt_in_level
fields on the Customer
resource.
The deprecated fields are replaced by the following properties on the new email_marketing_consent
field for the Customer
resource:
state
consent_updated_at
opt_in_level
For more information, refer to the Customer
resource on Shopify.dev.