Activity
An Activity in Salesforce is a Task or an Event tracked against another record.
Definition
An Activity in Salesforce is a Task or an Event tracked against another record. Tasks are to-dos with a due date (a callback, a follow-up email, a contract review). Events are calendar items with a start and end time (a discovery call, a customer demo, an onsite meeting). Both attach to a Lead or Contact through the WhoId field and to an Account, Opportunity, Case, or custom object through the WhatId field. Together they form the historical record of what your team did with each customer.
Activity is one of those Salesforce concepts that does not behave the way the documentation suggests. There is no Activity object you can query directly; you query Task and Event. There are two read-only views called OpenActivities and ActivityHistory that surface Tasks and Events together on a parent record, and they are how the Activity Timeline on Lightning records gets built. When somebody on your team says "the Activity object," what they usually mean is "the polymorphic Activity behavior that spans Task, Event, Email logging, and Logged Calls." That distinction matters once you start writing reports or triggers, because both halves of the abstraction have separate metadata, separate field history, and separate permissions.
Why Activity behaves differently than every other object in Salesforce
Task vs Event
Task and Event share most of their structure. Both have WhoId (Lead or Contact lookup) and WhatId (polymorphic to most major objects). Both have Subject, ActivityDate, Description, Priority, Status, OwnerId, and a handful of system fields. Tasks add Type, CallType, CallDurationInSeconds, CallDisposition, and IsClosed. Events add StartDateTime, EndDateTime, Location, IsAllDayEvent, IsRecurrence, and a handful of calendar-related fields. The polymorphic lookups (WhoId, WhatId) are why activity reporting in Salesforce is reliably annoying: you write the report once for Contact-related Activities, once for Account-related Activities, once for Opportunity-related Activities, and the union view (ActivityHistory) does not support every report type. Modern Lightning Reports cover the basics; complex cross-related-record reports often need a custom report type or an Apex-driven dataset.
WhoId and WhatId
WhoId and WhatId are the two fields that decide whether an Activity is findable. WhoId points to one Lead or one Contact. WhatId points to one of about a dozen possible parent objects: Account, Opportunity, Case, Campaign, Contract, plus any custom object with Allow Activities enabled. An Activity with both fields populated shows up on the Activity Timeline of both records. An Activity with only WhoId shows up on the Contact (or Lead) and on the WhoId's primary Account (if applicable). An Activity with neither field populated is orphaned: it exists in your Salesforce org, it counts against rep productivity reports, and it shows up nowhere in the timeline. Train reps to always populate at least one of the two, and ideally both.
Email logging and EmailMessage
Email logging is one of the larger Activity-adjacent features that is not actually a Task or an Event. Lightning email integration (Outlook, Gmail, the native Lightning email tool) logs sent and received emails as EmailMessage records, with related ActivityHistory pointers so the email appears on the timeline. EmailMessage has its own object, its own field set, and its own permission model. Reports built against the Task object miss email logging entirely unless you add the EmailMessage object explicitly. Most "why does my Activity dashboard show no emails" questions trace back to this gap.
Activities on custom objects
Activities on custom objects require an explicit Allow Activities toggle at object definition time. The toggle is on by default for most standard objects (Account, Contact, Opportunity, Case, Lead) but off by default for custom objects. Once enabled, the setting cannot be turned off; the only path to disable Activities on a custom object is to file a case with Salesforce Support, and they often decline if any records exist. Plan this at schema-design time, because retrofitting Activities onto a custom object that has been running for a year tends to leave a partial timeline (Activities exist on parent records that have the relationship, but not on records that pre-dated the toggle).
Activity reporting
Activity reporting tends to be the highest-volume reporting category in any sales-heavy Salesforce org. Reps log dozens of Activities per day; managers report on activity volume, win-rate-by-touch, and time-to-first-Activity. The standard report types (Tasks and Events, Tasks and Events with Custom Objects) cover most use cases but break down once you want to combine email-logging counts with manual Task counts. Build a custom report type that joins Activity with EmailMessage if your org cares about a total-touches number. Without it, the rep who logs everything as email looks lazier than the rep who logs everything as Task, regardless of who actually drove the deal.
Einstein Activity Capture
Einstein Activity Capture is the modern email-and-calendar sync product that replaces the legacy Salesforce for Outlook and the deprecated Lightning Sync. EAC syncs Outlook or Gmail email and calendar activity to Salesforce automatically, surfacing it on the Activity Timeline without forcing reps to log anything manually. The catch: EAC-captured Activities live in a separate data layer (Einstein Activities, accessible through the API but not as Task records by default). Reports built against the Task object miss EAC data unless the org has enabled the EAC sync-to-Activity option, which itself has constraints around storage, retention, and sharing. Most teams enabling EAC discover the reporting gap a quarter in and either turn on the sync-back option or build dashboards on the Einstein Activity object directly.
Field history tracking
Field history tracking on Task and Event is off by default. Most orgs assume it is on and discover the gap when they audit a Closed/Lost deal and find no record of when a follow-up Task was reassigned, marked Closed, or had its Description rewritten. Turn on field history tracking explicitly if compliance, sales coaching, or post-mortem analysis matters to your team. The data-storage cost is small relative to the value of being able to answer "what happened with this Activity" six months after the fact.
How to log an Activity
Logging an Activity in Salesforce usually means creating a Task or an Event from a related record (Contact, Account, Opportunity, Case) or from the global create button. The create flow itself is short; the choices you make about WhoId and WhatId at create time determine whether the Activity shows up where reps and managers expect to find it.
- Open the record the Activity belongs to
Most Activities are easier to log from the related record (Contact, Account, Opportunity, Case) than from the global Tasks or Events tab, because starting from the related record auto-populates WhoId or WhatId.
- Click New Task or New Event
Use the Activity composer on the record page. The composer has tabs for Task, Event, Log a Call, and Email; pick the tab that matches what actually happened.
- Set the Subject
Subject is the report headline. Write it like a summary, not like an email greeting. "Demo with VP Eng on roadmap" reads better than "Demo" or "Tuesday call."
- Confirm WhoId and WhatId
Both fields auto-populate from the source record, but verify they are correct, especially when logging an Activity that touched multiple Contacts at the same Account. Pick the most relevant Contact for WhoId.
- Set Status, Priority, and Date
Status drives whether the Activity counts as Open or Closed. Priority drives Activity-based dashboards. ActivityDate (Task) or StartDateTime/EndDateTime (Event) drives every time-based report.
- Save
Click Save. The Activity attaches to the parent records and shows up in their Activity Timeline. If your org uses Einstein Activity Capture, server-side sync may fire here.
Required. The headline that shows up in every Activity report and timeline view.
Required for Task. For Event, StartDateTime and EndDateTime are required instead.
- Activities created with no WhoId and no WhatId are orphaned. They show up in reports run on the Task or Event object directly but never appear on any related record's timeline.
- EmailMessage is not Task. Reports built off the Task object miss every email logged through Lightning email integration. Add EmailMessage to the report type or build a custom report type if total-touches matters.
- Allow Activities on custom objects is a one-way toggle. Plan it at object-definition time, because retrofitting it later leaves partial timelines that confuse reps.
- Task and Event field history is off by default. Turn it on explicitly if you ever need to audit who changed Status, Subject, or Description on an Activity.
Trust & references
Cross-checked against the following references.
- ActivitiesSalesforce Help
- Einstein Activity CaptureSalesforce Help
Straight from the source - Salesforce's reference material on Activity.
- Task (Object Reference)Salesforce Developers
- Event (Object Reference)Salesforce Developers
About the Author
Dipojjal Chakrabarti is a B2C Solution Architect with 29 Salesforce certifications and over 13 years in the Salesforce ecosystem. He runs salesforcedictionary.com to help admins, developers, architects, and cert/interview candidates sharpen their fundamentals. More about Dipojjal.
Test your knowledge
Q1. What best describes the purpose of Activity in Salesforce?
Q2. Which Salesforce Cloud is Activity most closely associated with?
Q3. What happens when Activity data is not maintained properly in Salesforce?
Discussion
Loading discussion…