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
Dane DowellDane Dowell 

Need help fixing complex email automation process

We have several brands being worked within one Salesforce org by using a multi-picklist field called “Brand Connect” to keep it all separated and organized.

We have 2 custom fields, called “The Appointment Setter” and “The Appointment Setter ID”. These are used to reference a User ID and there is automation running so whenever The Appointment Setter is input, their persons associated User ID is populated in The Appointment Setter ID.

For our email automation we have Process Builder calling Apex. It was designed to use The Appointment Setter ID to set the correlated “Sender ID” for the email, and it pulls in email signature data from custom fields on the User object that are set up for each brand (so tagline and email address can be set uniquely for each brand).

The problem is that the developer we worked with only set it up for one brand, and we need it to work for all the brands in our org.

Here's the email template:

User-added image

To support this we have a visualforce component called "SenderSignature" -- Here we need some sort of If/Else statements at the end to reference the custom field called "Brand_Connect__c" ...

1. Company should be the value of Brand Connect
2. For Sig_Tagline and Sig_Email, we have custom fields on the User object for each individual brand. What we want to do is define the references for each brand. So “if Brand Connect = Advisor Fuel then use Sig AF Tagline” and “if Brand Connect = DB Lightning then use Sig DB Email”.

<apex:component controller="SenderSignatureCtrl" access="global">
   <apex:attribute name="company" description="name of company" type="string"/>
   <apex:attribute name="senderId" description="Id of sender" type="String" required="required" assignTo="{!appSetterId}" />

and here's the apex class "SenderSignatureCtrl"

public class SenderSignatureCtrl {
   public String appSetterId { get; set; }
   public User sender {
       get {
           if (appSetterId != null) {
               sender = [SELECT Sig_Tagline__c, Sig_Name__c, CompanyName, Sig_AF_Title__c, Phone, Sig_AF_Email__c FROM User WHERE Id = :appSetterId];
               system.debug('Sender Signature ==> ' + sender);
           return sender;


I'm happy to provide any additional information that may be necessary to troubleshoot the problem. Thank you so much to whoever is willing to help!

Best Answer chosen by Dane Dowell
Could you please let me know that "Brand_Connect__c" field is in which Object?

All Answers

Could you please let me know that "Brand_Connect__c" field is in which Object?
This was selected as the best answer
Dane DowellDane Dowell


Brand Connect was created on Lead, Account, Contact and Opportunity -- and the value maps upon lead conversion.

Dane DowellDane Dowell
Still haven't been able to fix this, anybody have an idea of what's wrong?