Organizing Salesforce Cases to their Primary Contact
Finding the Primary Contact from a Created Case

Organizing Salesforce Cases to their Primary Contact

No alt text provided for this image
Image #1: Example of a Salesforce Case

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.

No alt text provided for this image
Image #2: All Newly Created Cases Critieria

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.


No alt text provided for this image
Image #3: Gathering Contact Records based on Primary Contact and AccountId

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.

No alt text provided for this image
Image #4: Decision Element

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.

No alt text provided for this image
Image #5: Yes 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:

No alt text provided for this image
Image #6: No Primary Contact Found
No alt text provided for this image
Image #7: New Criteria for the No Decision


Mark Good

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

回复
Geren Woodbridge

I help businesses boost revenue and connectivity with WiFi & VoIP solutions.

1 年

Nice flow ??Eric! Well done!

回复

要查看或添加评论,请登录

??Eric Alldritt的更多文章

社区洞察

其他会员也浏览了