This is somewhat of a technical post around Salesforce Activity Objects and their Relationships.
These can be queried individually OR via a “View” called ActivityHistory. These Activities can be reported against in Reports both Classic and Lightning.
Its important to understand while similar they are a bit different. Events are typically Meetings (with a start/end date) (these we sync with your Calendar), and Tasks are typically Emails, but can be many other things like Calls, ToDos, Notes, etc…
On a Task or an Event there are 2 “relationship” fields. These tie the Task or Event to a Account, Opportunity, Contact or Lead.
WhoId and WhatId.
Both are “polymorphic” fields, meaning they can be related to different objects, defined by the ID itself.
WhatId is a single relationship to a ACCOUNT or OPPORTUNITY. This activity can only be associated with ONE Account OR Opportunity Record.
WhoId is a one to many relationship between this activity to one or more CONTACTS or LEADS.
When SalesDirector.ai writes the activity back to Salesforce we try to find the “best” Opportunity to match the activity to, meaning we set the WhoID to the Opportunity. If SalesDirector.ai is unable to find the “best” opportunity (or there is a tie in opportunity relevancy) the system will automatically choose the Account and use that as the WhoId.
SalesDirector.ai will automatically find the participants of the Email or Meeting and either create Contacts (if possible) OR find the existing Contacts or Leads and use those IDs for the WhoId(s).
Note: If you do associate a task/event to a Account WhatId, and then you MOVE the Contact to a different Account, the original activity will still be associated with the OLD Account, even though the WhoId Contacts are now associated with the NEW Account.
Here is the “ER diagram” on Tasks/Events:
Have questions? The SalesDirector.ai team is very knowledgeable on these topics, contact your Customer Success Rep or email@example.com for more information.