Skip to content

Commit 7b77a5d

Browse files
committed
feat: first pass at 1-click unsubscribe docs
1 parent 564cca3 commit 7b77a5d

File tree

1 file changed

+65
-4
lines changed

1 file changed

+65
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,69 @@
11
---
2-
title: "Commercial unsubscribe"
3-
description: "Learn how to enable 1-click unsubscribe links for commercial notifications."
4-
tags: ["recipients", "unsubscribe", "commercial", "prefs", "preferences"]
2+
title: "Commercial Unsubscribe"
3+
description: "Learn how to manage commercial email unsubscribe functionality in Knock"
4+
tags: ["preferences", "unsubscribe", "commercial", "broadcasts", "workflows"]
55
section: Preferences
66
---
77

8-
To comply with CAN-SPAM, you can mark a workflow or broadcast as commercial if it sends commercial or promotional messages. You can include a 1-click unsubscribe link in your templates and Knock will handle sending the appropriate email headers.
8+
Knock provides built-in support for commercial email unsubscribe functionality, allowing recipients to opt out of promotional or commercial messages with a single click.
9+
10+
## How commercial unsubscribe works
11+
12+
When you mark a workflow or broadcast as commercial, Knock automatically handles the necessary unsubscribe functionality:
13+
14+
1. Adds required unsubscribe headers to all emails sent through that workflow or broadcast
15+
1. Provides an unsubscribe URL variable that can be included in your email templates
16+
1. Manages recipient opt-outs during preference set evaluation
17+
18+
## Configuring commercial workflows
19+
20+
To enable commercial unsubscribe functionality for a workflow or broadcast:
21+
22+
1. Navigate to the workflow or broadcast
23+
1. For a workflow, click "Manage workflow". For a broadcast, click "Edit details".
24+
1. Toggle "Commercial"
25+
1. Save your changes
26+
27+
Once enabled, Knock will automatically include the necessary unsubscribe headers in all emails sent through that workflow.
28+
29+
## Adding unsubscribe links to emails
30+
31+
### Using footer links
32+
33+
When configuring an email layout using the visual editor, you can toggle the "Include commercial unsubscribe link" input to include the unsubscribe link.
34+
35+
### Using the code editor
36+
37+
You can add an unsubscribe link to your email layouts or templates using the built-in variable:
38+
39+
```liquid title="Show unsubscribe link"
40+
<a href="{{vars.commercial_unsubscribe_url}}">Unsubscribe</a>
41+
```
42+
43+
You can conditionally include the link by checking if the variable is present:
44+
45+
```liquid title="Show unsubscribe link only for commercial messages"
46+
{% if vars.commercial_unsubscribe_url %}
47+
<a href="{{vars.commercial_unsubscribe_url}}">Unsubscribe</a>
48+
{% endif %}
49+
```
50+
51+
## Configuring the confirmation page
52+
53+
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.
54+
55+
### Standard confirmation page
56+
57+
You can customize the title and body text that will appear on the Knock confirmation page.
58+
59+
### Custom redirect URL
60+
61+
You can provide a URL that recipient's should be redirected to after unsubscribing.
62+
63+
## Preference evaluation rules
64+
65+
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.
66+
67+
## Learn more
68+
69+
To learn more about managing recipient preferences and building preference centers with Knock, visit our [preferences overview](/preferences/overview).

0 commit comments

Comments
 (0)