--- title: "Email Marketing Opt in Toggle" slug: "email-marketing-opt-in-toggle" updated: 2025-04-23T10:15:05Z published: 2025-04-23T10:15:05Z canonical: "docs.newstore.com/email-marketing-opt-in-toggle" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.newstore.com/llms.txt > Use this file to discover all available pages before exploring further. # Email Marketing Opt in Toggle An optional marketing opt-in toggle to enable users to give their permission for you to use their personal data for marketing purposes when creating an account can be added to the account create form. The toggle is optional to the user by default and therefore does not need to be checked in order for them to create an account. The value of the toggle will be sent to your backend in the customer create request as a custom attribute containing a boolean value (true/false) This value will then need to be saved in your database. See below for specific platform implementations. It is also possible to add additional toggles to the account create screen allowing the user to consent to multiple different topics. ![](https://cdn.document360.io/c2d22fcd-a44b-4e1e-bf3a-84f0ffba0dbe/Images/Documentation/Screenshot 2025-04-23 at 12.06.59(1).png?sv=2026-02-06&spr=https&st=2026-11-08T14%3A50%3A53Z&se=2026-11-08T15%3A50%3A53Z&sr=c&sp=r&sig=Dj5cQuQIHa3B7BBddBv%2FRtGZGjOXaE5bwZ2dPxVq1Xc%3D) ## Technical Implementation details ### Sales Force Commerce Cloud The attribute will be added to the payload when creating the customer with the `POST /customers` endpoint ```json POST /customers?locale=en-NL {  "password":"12345!aBcD",   "customer": {     "login": "jsmith"     "email":"jsmith@test.com",     "last_name":"Smith",     "first_name: "john",     "c_marketing_toggle": true ** Additional attribute **   } } ``` ### Magento 2 The graphQL `createCustomer` mutation is used to create an account and the attribute will be added to the payload ```json {  "query": "mutation($input: CustomerInput!) {    createCustomer(input: $input) {      customer {        id        email        firstname        lastname        default_billing        default_shipping        marketing_toggle        addresses {          id          firstname          lastname          company          street          postcode          city          country_id          telephone          region {            region_id            region          }        }      }      }  }",  "variables": {    "input": {      "email": "jsmith@test.com",      "password": "Password",      "firstname": "John",      "lastname": "Smith"      "marketing_toggle": true    }  } } ``` ### Bridge API The value of the toggle will be sent as a custom attribute accordingly to the regular API spec that has already been implemented ### Shopify This is not a supported feature on the Shopify platform integration