---
schema_version: "1"
id: b3019dfad5817982fd374a7addbe84087af181701fd4e78dd7f726977a0b6f0b
title: Create an Email Opt Out Flow
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/essentials_unsubscribe_flow_builder.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.essentials_unsubscribe_flow_builder.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c4dad207887f7fce8e0a6de953169944ffd4849febcf64d28b0ddece284cdecd
description: Create a Flow that lets leads and contacts unsubscribe from your email campaigns.
products:
  - Cross Cloud
release: "264"
---
# Create an Email Opt Out Flow

Create a Flow that lets leads and contacts unsubscribe from your email campaigns.

## Create a New Flow

1. Open Setup.
2. In the Quick Find box, search for Flows and open it.
3. Click **New Flow** | **Autolaunched Flow** | **Create**.

## Check the Email Opt Out Box When a Lead Unsubscribes via Email-to-Case

1. Click and drag **Update Records** on the canvas.
2. Provide a label like Update Lead.
3. Click **Specify conditions to identify records, and set fields individually**.
4. Select **Lead** as the object.
5. Select **Conditions are Met** as the Condition Requirements.
6. Select **Email** | **Equals** | **New Resource**.
7. Select **Variable** as Resource Type.
8. Provide an API Name like WebEmail.
9. Select **Text** as Data Type.
10. Check both **Available for input** and **Available for output** check boxes.
11. Click **Done**.
12. Confirm {!WebEmail} is listed in the Value field.
13. Under Set Field Values for the Lead Records, select **HasOptedOutOfEmail** for the Field.
14. Select **$GlobalContstant.True** as the Value.
15. Click **Done**.

## Check the Email Opt Out Box When a Contact Unsubscribes via Email-to-Case

1. Click and drag **Update Records** on the canvas.
2. Provide a label like Update Contact.
3. Specify conditions to identify records, and set fields individually.
4. Select **Contact** as the object.
5. Select **Conditions are Met** as the Condition Requirements.
6. Select **Email** | **Equals** | **Web Email**.
7. Under Set Field Values for the Lead Records, select **HasOptedOutOfEmail** for the Field.
8. Select **$GlobalContstant.True** as the Value.
9. Click **Done**.

## Activate the Flow

1. Drag the small circle from Start to Update Records: Update Lead.
2. Drag the small circle from Update Records: Update Lead to Update Records: Update Contact.
3. Save your changes.
4. Name your Flow something like Unsubscribe Flow, and save your changes.
5. Click **Activate**.
6. Click the **← Back** button.