Get a Grip on Salesforce Activities

Salesforce Activities help facilitate the story of an organization & its customers’ experience. They are key components of facilitating workflows on platform & transcend it in the form of meetings & other interactions. A helpful way to think of activities is as both the glue that binds entities & the lubrication that ensures all the gears are turning. Understanding their limitations is pivotal in creating a perpetual system that knows only one goal – success. 

 

Einstein Activity Capture

Einstein Activity Capture (EAC) is a powerful tool that syncs calendar events and emails to Salesforce. Contacts are also captured & sync’d along the way. No more manually logging meetings or events. While a key part of Salesforce productivity, EAC treats your activities in a slightly unexpected way. It stores them in AWS & surfaces them inside of Salesforce on the activity timeline for record pages. Why this matters: No Standard Reports. No Queries. No Triggers. 

 

Activities Get Archived

In order to provide an optimal reporting system, Salesforce automatically archives activities Events with an end date greater than 365 days ago. For Tasks, Salesforce will archive anything with a due date greater than 365 days ago or anything with no due date created 365 days ago. While Archived activities will appear in your Activity timeline, you will not be able to report on them. Consider yourself warned. This can be extended to up to 10 years by logging a case. Salesforce will consider extensions beyond the 10-year maximum in very limited cases that have a compelling business reason. 

 

No History Tracking

At least not yet. You cannot enable field history tracking on Activities as of today. Fortunately, this does look like it’s up for consideration and is currently prioritized by the Salesforce Product Management team. Popcorn anyone? 

 

Who, What, Why & Polymorphism 

Activities can be related to most objects in Salesforce. The lookup is generally specified in one of two fields – WhoId or WhatId. An easy way to remember the difference is a WhoID refers to people (Contacts, Leads or Users) & a WhatId refers to just about everything else. They are Polymorphic. What does “Polymorphic” – or more specifically, polymorphism mean within Salesforce? That a single field — a lookup field — can reference objects of different types. 

 

Shared Activities

You can enable shared activities that allow for a single activity to be related to 1 or more records. Activities will be created for each linked entity under the hood (think duplicates) but the flag isChild will be set to True for the secondary activities which will allow us to differentiate. An important thing to note however is secondary activities will not directly reference the parent. A junction table called EventRelation or TaskRelation will instead act as a junction object between the secondary & primary event. 

 

Task & Event Relation Triggers

Things can get very tricky very fast if you want to react to changes in event or task relations. One cannot create a traditional trigger to listen to change events. Thankfully, the system does broadcast a Platform Event when changes in the relation table occur that we can create a listener for. We can catch the Platform Event & respond accordingly. This is of course asynchronous which means real-time changes are not possible so plan accordingly — (Thinking of you, compliance officers!) 

 

Keeping Activities Private 

Due to the significance of activities & the role they play, correctly configuring permissions & sharing often requires experience & insight. There are nuances to how activities behave & how they inherit permissions from the parent object that can be frustrating to navigate. Remember, nobody likes a cranky compliance officer. Einstein Activity Capture is one way to solve inherent sharing issues but that is not always the right solution for every scenario. Fortunately, the fine folks here at Plative have a wealth of knowledge & tools to help solve this & other pickles!

 

If you would like to learn more or how – please reach out & ask for Andy

Written by
andy

Andrew Vays

Director of Engineering

Let's Get Started