---
title: Salesforce Email Template Unsubscribe Variable Fix
type: article
created: '2025-11-24'
updated: '2025-11-24'
source_docs:
- raw/2025-11-24-weekly-call-w-karly-103855138.md
tags:
- salesforce
- email
- crm-automation
- html
- unsubscribe
- templates
layer: 2
client_source: null
industry_context: null
transferable: true
---

# Salesforce Email Template Unsubscribe Variable Fix

## Overview

When importing an HTML email template into Salesforce Account Engagement (Pardot), a static `href` link in the unsubscribe element will not satisfy Salesforce's requirement for a valid unsubscribe mechanism. Salesforce detects the missing variable and appends its own default footer — which is visually inconsistent and difficult to control. The fix is to replace the static link with the Salesforce-native unsubscribe variable.

This issue was surfaced during a weekly sync on 2025-11-24 when the team attempted to activate an HTML template created by Raphael for client email campaigns. See [[meetings/2025-11-24-weekly-call-karly]].

---

## Problem

- An HTML email template was built externally and imported into Salesforce.
- The template included an "Unsubscribe here" element, but it was rendered as a plain paragraph (`<p>`) with a static `href` — not a proper Salesforce merge variable.
- Salesforce requires a valid unsubscribe variable to be present in any outgoing email template.
- Because the variable was absent, Salesforce injected its own default unsubscribe footer, resulting in a duplicate, visually broken footer block.

---

## Root Cause

The template used a hardcoded URL in the unsubscribe link:

```html
<!-- Incorrect: static href -->
<p>Unsubscribe here</p>
<!-- or -->
<a href="https://example.com/unsubscribe">Unsubscribe here</a>
```

Salesforce Account Engagement does not recognize a static URL as a valid unsubscribe mechanism. It requires a platform-specific merge variable (e.g., `%%unsubscribe%%` or the equivalent Account Engagement variable) so it can dynamically generate a tracked, compliant unsubscribe link per recipient.

---

## Fix

Replace the static unsubscribe element in the HTML template with the Salesforce Account Engagement unsubscribe variable inside a proper anchor tag:

```html
<!-- Correct: Salesforce unsubscribe variable -->
<a href="%%unsubscribe%%">Unsubscribe</a>
```

> **Note:** The exact variable syntax may differ depending on your Salesforce Account Engagement configuration. Jessica (Salesforce consultant) is being engaged to confirm the correct variable name and demonstrate the fix in context.

### Steps

1. Open the HTML template in Salesforce Account Engagement.
2. Locate the existing unsubscribe element (search for `unsubscribe` in the HTML source).
3. Replace the static `href` value with the appropriate Salesforce unsubscribe merge variable.
4. Ensure the element is an `<a>` tag (anchor), not a bare `<p>` tag.
5. Save and preview the template to confirm Salesforce no longer appends its default footer.

---

## Training & Handoff

- **Jessica** (Salesforce consultant) has been contacted to:
  - Confirm the correct unsubscribe variable syntax.
  - Walk the team through the fix live.
  - Record a short video tutorial for future reference.
- Once the template is corrected and the process is documented, **Raphael** will own all email creation and automation going forward.
- Karly is responsible for scheduling the session with Jessica.

---

## Process Notes

- All future HTML email templates should be validated for the Salesforce unsubscribe variable *before* import.
- When the design team (Raphael) produces new email templates, they should be briefed on required Salesforce variables and dimension constraints prior to building.
- Email flows in Account Engagement are straightforward once the template is correct; the main complexity is ensuring campaigns are grouped under the right campaign names for accurate metric tracking.

---

## Related

- [[meetings/2025-11-24-weekly-call-karly]]
- [[clients/cora-italia/_index]] — primary client context for this email template
- [[knowledge/crm-automation/salesforce-account-engagement-overview]] *(if exists)*