function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Piotr@ProntoPiotr@Pronto 

Email Opt Out in Email Alerts sent out from SFDC

Hi everyone,

 

Lately we began sending Email Alerts to our Contacts from SFDC. The problem we're facing now is the unsubscribe link that we need to include in each email. At the moment once you click on "unsubscribe" it takes you to a little form that asks you for your email address and once it's filled out and submitted, we get notified and personally unsusbcribe or check "email opt out" checkbox for a contact.

 

This is obviously inconvenient and requires a lot of manual work. Is there any way we can somehow get that integrated so once someone clicks on "unsubscribe" email opt out becomes "true"?

 

We don't want to send those emails from another platform and workflows are a way to go here. It makes it easy, but the unsubscribe is a bit tough...

 

Thanks,

Piotr

AmitSahuAmitSahu

It's just a thought .... pardon if not in the context : 

 

Can we use webService call here from the link "Unsubscribe..".. On clikcking on the link it will pass the email address to the webservice. The webservice will search the contact object and check the email optout where it finds the email address..

Piotr@ProntoPiotr@Pronto

I'm not really sure what you're referring to here...

 

In the meantime I've found this: https://wiki.apexdevnet.com/page/Force.com_Email_Services_Unsubscribe

 

Has anyone used that code? Would it accomplish what I am looking for?

sfdcfoxsfdcfox

It would work as advertised. You could also perform the same logic in an email-opt-out page as well. I had a demo script written up at some point, but I can't seem to find it. There's several ways to go about this.

Piotr@ProntoPiotr@Pronto

I see thanks.

 

Do you by chance have a Apex Test Code for this? I think this is necessary since Im getting low code coverage and aren't able to deploy it...