Commercial Unsubscribe

Learn how to manage commercial email unsubscribe functionality in Knock

Knock provides built-in support for commercial email unsubscribe functionality, allowing recipients to opt out of promotional or commercial messages with a single click.

How commercial unsubscribe works

When you mark a workflow or broadcast as commercial, Knock automatically handles the necessary unsubscribe functionality:

  1. Adds required unsubscribe headers to all emails sent through that workflow or broadcast
  2. Provides an unsubscribe URL variable that can be included in your email templates
  3. Manages recipient opt-outs during preference set evaluation

Configuring commercial workflows

To enable commercial unsubscribe functionality for a workflow or broadcast:

  1. Navigate to the workflow or broadcast
  2. For a workflow, click "Manage workflow". For a broadcast, click "Edit details".
  3. Toggle "Commercial"
  4. Save your changes

Once enabled, Knock will automatically include the necessary unsubscribe headers in all emails sent through that workflow.

When configuring an email layout using the visual editor, you can toggle the "Include commercial unsubscribe link" input to include the unsubscribe link.

Using the code editor

You can add an unsubscribe link to your email layouts or templates using the built-in variable:

You can conditionally include the link by checking if the variable is present:

Configuring the confirmation page

When a user unsubscribes by directly clicking the unsubscribe link in a message, Knock will display a confirmation page indicating they have been succesfully unsubscribed from commercial messages. You can customize this page by navigating to "Developers" > "Preferences", then clicking the "Unsubscribe" tab.

Standard confirmation page

You can customize the title and body text that will appear on the Knock confirmation page.

Custom redirect URL

You can provide a URL that recipient's should be redirected to after unsubscribing.

Preference evaluation rules

When a recipient clicks the unsubscribe link, their default preference set will be updated, marking commercial_unsubscribe as true. They will be opted-out of commercial messages, and they will continue to receive transactional messages based on their other preferences.

Learn more

To learn more about managing recipient preferences and building preference centers with Knock, visit our preferences overview.