Tracking interactions with customers and staying organized is essential for any business. Salesforce Activities make this process easier by helping teams manage their schedules, log key actions, and maintain a clear overview of their tasks. Whether you’re logging calls, sending emails, or organizing events, activities can provide the foundation for managing day-to-day operations in Salesforce. While activities are a core part of Salesforce, their architecture is quite intricate and dates back to the platform’s early days.
There are many quirks to be aware of, and when starting to customize and automate using activities, things start to get really mysterious!
This article will explore everything you need to know about activities, including:
- Their components
- Common use cases
- The underlying architecture
- Relationships between key objects
What Are Activities in Salesforce?
Activities in Salesforce are tools to help track and organize customer interactions and planned tasks. They make it easier for users to manage their time, log actions, and keep an overview of their relationships with leads, contacts, accounts, and more.
Activities can be one of the following:
- Call Logging
- Task (“To do”)
- Event

The Backend Architecture of Activities
The idea is to have a ‘unified management’ of tasks and events combined into a single, more flexible method that can track all types of activities, regardless of their nature, and make it easier to report on and analyze all interactions related to a record.
While it might seem logical to customize tasks and events directly by adding fields, Salesforce’s architecture doesn’t permit this – we’ll dive deeper into that later.
Activities Primary Objects: Tasks and Events
- Events: Scheduled calendar events, such as meetings or conferences, with a defined start and end time.
- Tasks: All other types. The primary purpose is to represent to-dos or action items that need to be completed, such as following up with a lead or closing a case. However, as mentioned above, tasks are used to log calls and document sent emails.
On top of that, both tasks and events share a common layer, the Activity object, which allows for customizations that apply to both types of records – more on that in the object breakdown below.
Polymorphic Relationships
Activities in Salesforce have a polymorphic relationship with other objects, meaning a task or event can relate to different types of records without needing separate lookup fields for each one. This is achieved through the WhatId and WhoId fields.
- WhatId: Links to standard or custom objects (e.g. account, opportunity, case). For example, a task linked to an opportunity might track follow-ups for a deal in progress.
- WhoId: Links to people-related objects (e.g. contact, lead). For instance, an event tied to a contact could represent a scheduled meeting with a key client.
This flexibility is unique to activities and simplifies relationship management across various objects.
Let’s break down some of the unique features of activities per object – task, event, and activity.
Task
A task is a record of a specific action to be completed. Its primary attributes include:
- Subject: Describes the purpose of the task.
- Due Date: Specifies when the task must be completed.
- Status: Indicates the current progress (e.g. not started, completed).
- Priority: Identifies the urgency of the task (e.g. high, normal, low).
As mentioned, task is used for various purposes:
- Task Management: Create tasks for internal action items, reminders, or follow-ups.
- Call Logs: Tracking details of phone conversations, including notes on the discussion, call duration, and outcomes.
- Email: Task records are automatically created when logging an email sent from Salesforce. They store data about the email, such as subject, recipients, and timestamps.
The icon displayed on the Activity Timeline is controlled by the TaskSubType field. A Fast Field Updates (Before Save) with “A record is created” as a triggering event is the only type of Flow that can change this field! Once it’s inserted, it’s permanent.
Task: EmailMessage Relationship
Email sending from Salesforce (via the Email Composer or automations like Send Email action in flows) creates a task record for tracking purposes.
When Email-to-Case (for case-related emails) or Enhanced Email are enabled, Salesforce handles emails differently compared to the legacy setup. The EmailMessage object acts as the email’s source of truth – a detailed and uneditable record, while the task serves as a summary record for tracking the email’s overall activity within Salesforce.
Here are the key differences:
Attribute | Task | EmailMessage |
---|---|---|
Email Metadata Capture | Stored as text in the Description field | Dedicated field for emails – “FromAddress”, “ToAddress”, “MessageIdentifier”, “Incoming”, etc. |
Body | Stored in two dedicated fields – “TextBody” (for text) and “HtmlBody” (rich text) | |
Subject | Dedicated field – “Subject” | |
Has Attachment | Dedicated field – “HasAttachment” | |
Email Status Tracking | No tracking – all tasks are “Completed” | Status field – 1 (Read), 2 (Replied), 3 (Sent), 4 (Forwarded), 5 (Draft) |
Relationship to Parent Object | WhoId/WhatId | “ParentId” for case (Email-to-Case) “RelatedTo” for other objects |
Threading | No threading | Email-to-Case threading |

EmailMessage records are displayed when users access email-related activities. It has the ActivityId field, which links it to the corresponding task, that includes WhatId and sometimes WhoId.
Event
Events represent time-bound activities, often associated with meetings or scheduled calls. Key fields include:
- Start Date/Time and End Date/Time: Define the event’s duration.
- Location: Specifies where the event will take place.
Events starts to get messy when you start using a series of events (“Repeated”):
- Multiple events are created as defined on the recurrence fields.
- There’s a combination of classic-only fields and Lightning-only, mostly (but not all) marked with “2” (e.g. IsRecurrence2 and RecurrenceActivityId2).
- Lightning Experience event series has no series ID, so it’s not possible to locate other occurrences in the series.
- You cannot edit a single event in a series through API (Flows/Apex/REST). When you change an event in a series through the UI, you’re given the option to change all events in the entire series or only the current event.

- The recurrence pattern is stored in the Recurrence2PatternText field, and works in reference rules or RRULES.
- Example: Every two weeks on Monday and Friday for 10 occurrences would be RRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=MO,FR;COUNT=10
- Group Event Type Field: When an event has more than one invitee, an event record is created for each contact. To hide unnecessary duplicates of the same event, records with “3” (label: IsRecurrence2 Series Pattern) are not accessible through the UI or API. The weird thing is that they are accessible through flows. It’s important to know as you might encounter duplicates within a Flow for activities that you cannot see on the related lists, so watch out for those!

Activity
Activity is a parent object that acts as the connector for both tasks and events. It enables a unified view of tasks and events to the user. For example, if a user creates a custom field on the Activity object, it becomes accessible across both task and event records. This ensures consistency in tracking and simplifies customization efforts for administrators (or at least that might have been the idea).

Special Related Lists: Open Activities and Activity History
Salesforce provides two related lists to organize and display activities – Open Activities and Activity History. Both are backed by a read-only object that cannot be queried (accessible through the UI only).
- Open Activities (OpenActivity): Displays future events and open tasks related to an object. Useful for tracking actionable items.
- Activity History (ActivityHistory): Displays completed tasks and past events. Useful for reviewing previous interactions.
Activity Settings: What You Can Control Through the Setup Menu
Salesforce provides several options within the Setup menu to configure and customize activities. These settings allow administrators to tailor the functionality of tasks and events to suit the specific needs of their organization.
Here are the key settings available:
- Enable Shared Activities: Allows you to relate a task or event to multiple contacts, enhancing flexibility when dealing with group interactions (for example, an event with multiple contacts as attendees).
- Enable Recurring Tasks: Administrators can enable or disable recurring tasks, allowing users to schedule repeated actions like weekly follow-ups or monthly reviews.
- Roll-Up Activities to a Parent Record: This option enables roll-ups of related activities from child objects (e.g. opportunities) to parent objects (e.g. accounts).
- Enable Email Tracking: See if emails were opened straight from the Activity Timeline.

Activity Archiving: When, What, and Implications
Salesforce has a built-in mechanism for archiving older activities (tasks and events) to boost performance for activity reporting and SOQL queries.
When Are Activities Archived?
- Tasks: Closed tasks due more than 365 days ago or created more than 365 days ago if they have no due date.
- Events: Events that ended more than 365 days ago.
Exceptions to Archiving
- Recurring tasks or events in a series are not archived.
- Archived activities are not deleted but can be manually deleted.
- Modifying an archived activity such that it no longer meets the archival criteria removes its archived status.
What Does Archived Activity Mean?
- Archived activities are excluded from activity reports and flows.
- In SOQL queries, archived records act like deleted ones and have “IsArchived” set to “TRUE”.

- Archived records still consume data storage.
- Attached files for archived activities are not accessible in Lightning Experience unless the activity is modified to no longer meet archival criteria or is accessed in Salesforce Classic.
- Archived activities are not copied when creating or refreshing a sandbox.
Additional Information
- You can extend the archiving time limit to up to ten years by submitting a case to Salesforce Support.
- Archived activities can still be viewed and interacted with in certain locations like the Activity Timeline or Activity History related list, and in exported data.
Summary
Activities in Salesforce form the backbone of customer interaction tracking and task management. From understanding the nuances of tasks and events to leveraging related lists and polymorphic relationships, mastering activities empowers users to manage their time effectively and maintain a clear view of customer interactions.
By fully understanding Salesforce’s robust activity architecture, organizations can improve collaboration, enhance productivity, and deliver better automations that rely on these objects. Whether you’re new to Salesforce or have been using it for years, taking the time to learn about Activities can help simplify your workflows and meet your business goals more effectively.