logo
logo
Sign in

WhoId and WhatId Is a Field or Related Object of Activity or Task?

avatar
SalesDirector.ai, Inc
WhoId and WhatId Is a Field or Related Object of Activity or Task?

This is somewhat of a technical post around Salesforce Activity Objects and their Relationships.

First there are 2 primary “native” Salesforce activity objects. Task and Events.

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).

Visit Us for More Information:- https://www.salesdirector.ai/blog/2021/05/10/whoid-whatid-in-salesforce-activity-objects/

collect
0
avatar
SalesDirector.ai, Inc
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more