# Add user marketing preference

> [!NOTE]
> **Note:** Please reach out to our support team via [this](https://actionscenter.google.com/support/cases/open) form if you are interested in enabling marketing emails for your existing Reservations End-to-End integration.

This tutorial walks through how to get user-opt in for marketing emails.
Use of this feature is subject to
[The Actions Center's marketing and email policy](https://developers.google.com/actions-center/verticals/reservations/e2e/policies/platform-policies#marketing-and-email-policy), your own terms of
service and privacy policy, and any applicable regulation of the areas which
you operate. If this feature is not enabled for your integration a Reserve
with Google marketing checkbox may still be shown to the user.

## User flow

In production, users see the marketing checkbox (which will default to
unchecked) in every checkout flow. until the user opts in. The user will remain opted in until
they opt out via the unsubscribe link sent in your marketing emails per our
[Partner Marketing Opt-ins](https://developers.google.com/actions-center/verticals/reservations/e2e/policies/platform-policies#partner-marketing-opt-ins) policy.
The checkbox will not be shown for users during guest checkout or when they are using alternate
account information.

> [!NOTE]
> **Note:** In sandbox and production, the checkbox shows for every checkout flow for ease of development and testing.

## How it works

1. The user completes their checkout flow and may or may not check the marketing opt-in box
2. The Actions Center will call your booking server to complete the checkout (`CreateBooking`)
3. The Actions Center (depending on the selection of the user), calls the [SetMarketingPreference method](https://developers.google.com/actions-center/verticals/reservations/e2e/reference/booking-server-api-rest/e2e-methods/setmarketingpreference-method) to `POST /v3/SetMarketingPreference` with the user's selection. Please refer to the below table.

| User checkbox selection | SetMarketingPreferenceRequest | User's subscriptions status |
|---|---|---|
| Opt in | `user_to_receive_marketing` set to `true` | User is now subscribed (unless [double opt-in](https://developers.google.com/actions-center/verticals/reservations/e2e/add-ons/add-marketing-preference#double-opt-in) is required). |
| Opt out | `user_to_receive_marketing` set to `false` | User is unsubscribed. This option is currently not available on the Actions Center UI. Users should unsubscribe through the unsubscribe link in the marketing emails (the partner must implement and include this link in each marketing email as specified in [Partner Marketing Opt-ins policy](https://developers.google.com/actions-center/verticals/reservations/e2e/policies/platform-policies#partner-marketing-opt-ins)). Opt-out is handled outside of Actions Center and there is no need to inform the Actions Center of this change. |
| No selection | No request sent | User's most recent subscription status remains in effect. If the user has not previously made a subscription status selection (opted in or out) then the default status should be "opted out." |

### Double opt-in requirements

Double opt-in may be required depending on the area and type of emails
partners send. In this case, the partner must send the user an email with a
link to complete their opt-in. Users should not be considered subscribed
until they complete the double opt-in process.