Unsubscribe Link

Easy Opt Out of Email App on AppExchange

Include a “click here to unsubscribe” link in your email to allow constituents to easily opt-out from email sent from Salesforce. Simply add a merge field into your email template, and when clicked, all contacts and leads with the relevant email address will be checked “Email Opt Out.”

Installation instructions here. Includes troubleshooting information.

Report on Frequency of Unsubscribes

What campaigns are getting the most unsubscribes? Run a report on the custom Unsubscribe Link object included in the package to see when people choose to opt-out.

Confirmation Email?

Do you want to send out an email to confirm that the person has successfully unsubscribed? Great. You’re all set. If not, simply toggle no confirmation email in set up.

What reviewers say

Elegant solution – amazing support

Was able to implement this really easily. The extensive documentation and blog guide really helped. We even managed to create a 2nd mergefield that triggers the same process in another language – with the help of the developer. Totally recommend it!

― Jason Shi

Does exactly what I needed!

I have tested this twice, once in 2020 and once today. The new updates make it easier to install and use…Thanks for all your hard work and for putting this out there for free.

― Byrn Gormley

One thought on “Unsubscribe Link”

  1. Need help! Started getting this getting error message:

    Flow Error Details
    Flow Details

    Flow API Name: jrsl_ul_Unsubscribe_Link
    Type: Screen Flow
    Version: 3
    Status: Active
    Org: Arch Mortgage Insurance Company (00D300000006ZRN)

    Flow Interview Details

    Interview Label: Unsubscribe Link 6/23/2025, 3:53 PM
    Interview GUID: 6964ca7637bb170191a73cc535221979d76dec3-41b9
    Current User: Unsubscribe Link Site Guest User (0054U00000EJBM3)
    Start time: 6/23/2025, 3:53 PM
    Duration: 0 seconds

    How the Interview Started
    Unsubscribe Link Site Guest User (0054U00000EJBM3) started the flow interview.
    API Version for Running the Flow: 49
    GET RECORDS: Get custom metadata
    Find all jrsl_ul_Unsubscribe_Link__mdt records where:
    MasterLabel Equals Unsubscribe
    Store the values of these fields in Get_custom_metadata: jrsl_ul_Send_Confirmation_Email__c, jrsl_ul_Error_Email_Recipients__c, jrsl_ul_Our_Organization__c, Id
    Result
    Successfully found records.
    DECISION: CMDT Record Found
    Skipped this outcome because its conditions weren’t met: CMDT_Not_Found
    Outcome conditions:
    {!Get_custom_metadata} (jrsl_ul_Unsubscribe_Link__mdt (m084U000000Cf0yQAC)) Is null true
    All conditions must be true (AND)

    Default outcome executed.
    DECISION: Contact or Lead
    Skipped this outcome because its conditions weren’t met: Contact
    Outcome conditions:
    {!recordId} (null) Starts with 003
    All conditions must be true (AND)

    Skipped this outcome because its conditions weren’t met: Lead
    Outcome conditions:
    {!recordId} (null) Starts with 00Q
    All conditions must be true (AND)

    Default outcome executed.
    ASSIGNMENT: WrongObject
    {!errorTextVar} Equals The record passed to the flow was neither a lead nor a contact.
    Result
    {!errorTextVar} = “The record passed to the flow was neither a lead nor a contact. ”
    SEND EMAIL: Send Error Alert Email
    Inputs:
    emailBody = {!errorBody} (Alert: there was an error in running the Flow Unsubscribe Link or jrsl_ul_Unsubscribe_Link. This flow is part of the unmanaged package Unsubscribe Link from the AppExchange. https://wp.me/p9qPLI-eU. The record passed to the flow was neither a lead nor a contact. Here are the variables that were input from the link in the email. recordId (the id passed in the URL)= , email = , To modify this error email, open the Flow and edit the text template called errorBody.To modify who receives this email, open the custom metadata type called Unsubscribe Link and the record with Label of “Unsubscribe.” Change the value in Error Email Recipients. )
    emailAddresses = {!Get_custom_metadata.jrsl_ul_Error_Email_Recipients__c} (salesforcecentral@archmi.com)
    sendRichBody = true
    emailSubject = Unsubscribe Email Error Alert
    ________________________________________
    Error Occurred: The current user’s email address isn’t verified. Verify the email address or set the current user to a user with a verified email address.
    ________________________________________
    Transaction Rolled Back
    Because an error occurred, any records that the flow was ready to create, update, or delete weren’t committed to the database.
    ________________________________________
    Salesforce Error ID: 951343445-125697 (-1432607809)

Leave a Reply