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
Emma Sayer 7Emma Sayer 7 

Unsubscribe by Salesforce Labs: issue when combining with process builder/flows to update other fields and create records

Hi Everyone, I am new to the Developer community, but I posted this issue on the 'standard' Salesforce community and so far no one can figure out what's going on, I hope someone here might be able to shed some light on this, or at least give me a tit bit of knowledge that might get me going in the right direction.

We have recently installed the fantastically helpful Unsubscribe Apex by Salesforce Labs, and set up email services. This works wonderfully, bravo Salesforce! We are also making use of the Individual Object to record our contact and leads marketing preferences, also very helpful, but the two are clashing. We have built some flows on the back of this to update the individual record etc and they do not see eye to eye, the theory is good, I believe, and I cannot fathom what is causing the errors.

After installing the unsubscribe email option my colleague created processes that would automate some of the manual, boring jobs for our users:
1. Process builder launching a flow: To create an 'Individual' record (if one did not already exist) and associate it to the contact. It would also populate a handful of fields on this Individual record. (we found this on the community: https://salesforce.stackexchange.com/questions/208341/how-do-you-populate-data-on-the-new-individual-object 
2. Same as above but for lead records. 
3. Process builder to update fields: if the record has an 'Individual' record referenced (which it will thanks to the procss above), and the email opt out on the contact = true (which it MIGHT do, if the unsubscribe email service had been utilised) this should update the email opt out field on the 'Individual' record to true also.
4. Same as above but for leads.

For some reason that I cannot wrap my brain around these are refusing to work together.

Unsubsribe works just fine on it's own, and the flows run very nicely together if you deactivate the unsubscribe. But when we activate them ALL and then do an 'unsubscribe' email test it says the unsubscribe email cannot work because it's failing to launch a flow. What I can't figure out for the life of me is what is failing, where and why!

Any hewlp would be greatly appreciated, link to the community question in case this helps:
https://success.salesforce.com/answers?id=9063A000000DuofQAC