Upgrade Unsubscribe Link

I built this really great app to allow email recipients to unsubscribe from all emails sent through Salesforce, but it hasn’t been exactly easy to set up or use. Introducing the first upgrade which makes it much more user friendly!

With the upgrade, your Salesforce users can now pull a merge field into their Lightning and Classic email templates to include the Unsubscribe Link. Bam. No more having to modify and clone confusing email templates.

See how easy it is to add the Unsubscribe Link to a List Email? Your users will love this.

Follow these steps to drastically improve the Unsubscribe Link app!

  1. Install Unsubscribe Link from AppExchange v1.11, if you haven’t already.
  2. Follow all the instructions here for setting that up.
  3. Copy your Site domain that you set up for this app.
  4. Install this unmanaged package. Note it has NOT gone through Salesforce security review yet.
    1. Sandbox
    2. Production
  5. In Setup, search for and click on Custom Metadata Types.
  6. Click Manage Records to the left of Unsubscribe Link.
  7. Click Unsubscribe.
  8. In Site Domain, paste in the Site Domain you copied earlier (see image below). Don’t include anything else like “http://” or “https://” or “/Unsubscribe/”.
  9. In Our Organization, type in the name of your organization or company. This will appear in the Unsubscribe Link in emails you send out. If blank, the link will say “Click here to unsubscribe from all email from our organization.” So if your company is called Benji’s Elephant Hats put “Benji’s Elephant Hats” (no quotes) in this field.
  10. Make sure appropriate users have access to the fields “Unsubscribe Link” on Contact and Lead objects.
Paste this value in the Site Domain field in your Custom Metadata Type.

That’s it! Show your users how to add the Unsubscribe Link whenever they want to their emails or email templates.

How It Works

The package includes a Custom Metadata type to store your Site Domain and organization name. Those are pulled into formula fields on the Contact and Lead objects.

Resources

Help Doc: Create an Email Template in Lightning Experience

Webinar: Sending Email Through Salesforce (By me!)

Trailhead: Constituent Email Management (I helped! It’s NPSP focused, but applicable to everyone).

Published by

JessieRymph

Jessie joined Salesforce.org in 2018 to give introductory webinars to nonprofit customers. She now is a Senior Solution Developer supporting nonprofits and education customers at Salesforce. All opinions expressed on this blog are her own or those of the contributors. She's spent 17 years more or less in CRMs and databases, but didn't meet Salesforce until 2011. Jessie co-led the Seattle Salesforce Nonprofit User Group in 2015-2016. She wrote a sh*tty first draft of a novel and hopes to turn it into a screenplay!

14 thoughts on “Upgrade Unsubscribe Link”

  1. Hello, I installed this package on 10/14/2020 6:15 PM. It shows that I have Version Number 1.11 and version name 11.25.19. I do not have the unsubscribe link. When I go to https://unhandledsunshine.com/2020/10/22/upgrade-unsubscribe-link, it mentions to install an update, but the link that mentions the update takes me to here: https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMkfNUAT&preview=%222019-12-16T19%3A03%3A02.000Z%22. This states Latest Release12/2/2019. Where do I find the upgrade? Thank you!

  2. Joyce, if you haven’t started using the app yet (if you don’t have any unsubscribe records that you’d like to keep) I would recommend uninstalling what you have and installing the latest version which is here. https://unhandledsunshine.com/2020/10/27/test-the-newest-unsubscribe-link-app-please/
    To upgrade what you already have, go to step 4 on the blog post we’re currently on and install the upgrade either in your sandbox or production. Instructions for uninstalling what you have are located at the very bottom of this blog post: https://unhandledsunshine.com/2019/10/09/how-to-create-an-unsubscribe-link-revised/. Thank you so much! Sorry it’s complicated. I’m working on that.

    1. I have been using the app and therefore need to keep the current unsubscribe records. Where is the upgrade? I do not see a link that actually goes to the upgrade.

      1. Thank you. One more question: Generally I choose Do not install for “What if existing component names conflict with ones in this package”. Where this is an upgrade is this what you would suggest?

  3. Hi Jessie, I have installed both applications and followed the instructions to set it up.
    When I send a test email to myself and click on the Unsubscribe link I get an error message “an unhandled fault occurred in the flow”.

    Here is where the error occurs, but this combination is valid. It is my correct email and recordID
    GET RECORDS: Get_Contact
    Find one Contact record where:
    Email Equals {!Email} (lraestyle@gmail.com)
    AND Id Equals {!recordId} (0031M000039F6yaQAC)
    Result
    Failed to find record.
    ________________________________________
    Error Occurred: This error occurred when the flow tried to look up records: SELECT Id, Email FROM Contact WHERE (((Email = ‘lraestyle@gmail.com’) ^ ERROR at Row:1:Column:23 sObject type ‘Contact’ is not supported. If you are attempting to use a custom object, be sure to append the ‘__c’ after the entity name.

    Thank you!

    1. Hi Linda! Please make sure you’ve saved ALL of the flows with System Context Without Sharing-Access All Data. I will update the instructions to mention that all three flows must be saved that way.

    2. Thank you for the SPEEDY reply! I saved all flows with System Context Without Sharing-Access All Data and activated them, but unfortunately that didn’t do the trick. I was also able to run the Unsubscribe Part 1 flow in de-bug mode without errors. What else should I check?

    3. I went back through all steps and realized I missed the step to add the UnsubscribeFinish to the Enabled Visualforce Pages list. Now when I click the link I get a message saying “This connection is not private”. Is that something I can resolve as part of this setup or is that another issue?

      Thanks again for your help! I’m so anxious to get this working!

      1. After talking about it, Linda and I currently think the problem is that my domain is not set up in HTTPs.

  4. Hi Jessie,

    This app is what I am looking for. I have tried installing the new version from AppExchange.

    However, I keep getting errors.
    The error I got says:
    ==========
    http://www.123-reg-new-domain.co.uk is blocked
    http://www.123-reg-new-domain.co.uk refused to connect.

    ERR_BLOCKED_BY_RESPONSE
    ==========

    The url i get says: https://https//emailpoc-parkdeanresorts-odi-test.cs189.force.com/Unsubscribe//Unsubscribe?recordId=00Q7a000006C6DtEAK&Email=klemenz357@gmail.com

    Can you please help. As I do not know what I did wrong because it should work.

    Many thanks.

    1. Hello! Make sure you’re on the version that’s 2.2 that is written up here. https://unhandledsunshine.com/2021/01/08/unsubscribe-link-2-2/#more-3829. If so you didn’t need to follow the steps on this page for upgrading. Open the Custom Metadata type and look at the URL you pasted in. It should not have https:// at the beginning and it should not end with Unsubscribe/. The first image on the blog post shows what form the URL should take and where you copy it from. It says ‘Copy this!’ in a blue word bubble.

Leave a Reply to JessieRymphCancel reply