Use Case: Update Contact After Logging Emails Or Calls

When I was a Salesforce admin, people asked me many times if we can roll the information of activities up to the contact level. It will be a dream if the roll-up summary can handle that, but it is not possible because activities and contacts do not have a master-detail relationship. It is feasible through some 3rd-party apps, but I haven’t found any that meets my need and is easy to use. (Open for suggestion here!!) So let’s build the solution with flow!

Now many of you might have the solution for calls (Task object) already because there is a lookup (contact) field. We can handle this easily with Process Builder. However, email is really the big problem as they are now a separate object called Email Message. When you check the object, you can’t see the contact lookup either. In fact, there is a junction object called “Email Message Relation” that connects the email and the relevant personnel.

This makes it impossible to build the solution in Process Builder, thus a very good example of what flow can achieve.

* Big thanks to Zhizhi Gabanna for sending in the case!

See fields explanation of:
Email Message
Email Message Relation

Lulu Mobile wants to track how fast their salespeople reach out to the newly-created leads or contacts. They have a field called “First Followup Date”, and they want the system to populate this field whenever they send out an email or log a call. Since it is the first followup date, they only want to update it when the field is not empty.

For calls (Task Object), it is very easy to achieve using Process Builder. For emails, we can only use Flow. To demonstrate, we will build both solutions using Flow. If you want to count Events in, simply clone the flow for Task and change the object to Event.

We will use Record-Triggered Flow to make this happen. The solution will work for both Lead and Contact objects.

Flow 1: Update Lead/Contact When Task Is Logged

task - final flow chart #1

Flow 2: Update Lead/Contact When Email Is Logged

email message - final flow chart #1

Please wait while flipbook is loading. For more related info, FAQs and issues please refer to DearFlip WordPress Flipbook Plugin Help documentation.

Record-TriggeredDecision
Get RecordsUpdate Records

Does the solution solve your problem? If not, write us what your problem is and we will build the flow for you!

Official Salesforce Help Article On Flow

Subscribe
Notify of
guest
5 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Catherine Anthony

Wow! Excellent resource! Thank you for working this out. Well done!

Nick Caines

Brilliant stuff, and very timely, having worked the last 2 weeks on increasing activity views in opportunities this is perfect, with a slight tweak and adding a formula element to plus one to a number field each time the flow completes I now have a live engagement counter on each opportunity. Thank you.

Latha

Email flow#2 described above is not working for Lead. Did that work for you?