Organizing Salesforce Cases to their Primary Contact
??Eric Alldritt
?? Salesforce Marketing Cloud Expert | IP Warming Specialist ?? Helping Brands Improve Deliverability & Inbox Placement ?? Hiring? Let’s Talk!
For this Flow, whenever a Case is created within Salesforce. Our stakeholder wants to have whenever available the person who created the case to be referenced via the Custom Field Account Roles (in the Object, Contacts) to insure that if the Case Owner needs to be contacted they can be.
The criteria for selecting Cases will not have any criteria since we want this to apply to all newly created cases.
Once the case is created, what records do we gather to reference for the Primary Contact? That would be the Contact Object referencing Fields Account Roles and the Account Name (AccountId). When the value in the Account Role equals "Primary Contact" and the AccountId (Account Name) matches the Account Name of the case this insures that the Case will add in the Primary Contact of the Company we are wanting to reference.
Now what if the company does not have a "Primary Contact"? For that scenario, we will need to use the Decision Logic Element to account for both scenarios of if there is a Primary Contact vs. one that does not have a Primary Contact.
The criteria used is if the Primary Contact exists within Contacts with the company of interest. If yes, we will fill out with the Primary Contact on records and if no, then we will leave it blank in this scenario.
As mentioned earlier, if there is a Primary Contact associated with the Account then the ContactID (Contact Name) of the Case is updated with the Primary Contact's Name.
If no on the other hand, the Flow will go back to Contacts and find the oldest contact of the account and use that person as the Primary Contact as shown in Images 6 & 7:
Salesforce AI & GPT Expert ?? Accelerating the Adoption of AI in the CRM Ecosystem
1 年Sweet! I just put together a flow on the case object yesterday as well using #FlowGPT. I could see combining the two for even more value! https://youtu.be/ez7aE6Qgelk
I help businesses boost revenue and connectivity with WiFi & VoIP solutions.
1 年Nice flow ??Eric! Well done!