Preparing and Inserting Event Data in Salesforce
Salesforce Event Data can be imported efficiently using Data Loader when your CSV is prepared correctly. This guide explains every required field and shows you how to avoid common import errors.
Migrating activity data is an important step in any Salesforce migration project. Events contain valuable customer interaction history, including meetings, appointments, and scheduled activities between users and customers.
When migrating Events into Salesforce, proper preparation is required to ensure that dates, relationships, attendees, and related records are correctly mapped.
This guide explains how to prepare Event data, insert Events using Salesforce Data Loader, and handle multiple contacts or related records using Event Relations.
Table of Contents
Understanding Salesforce Activities
In Salesforce, activities encompass all customer interactions like calls, meetings, and to-do items. Tasks are to-do items, while events are scheduled happenings.
Events can be related to leads/contacts (Who ID) and non-human records like accounts/opportunities (What ID).
With shared activities enabled, up to 50 contacts or one lead can be related to an event.
What Counts as an Activity
- Activities = all customer interactions (calls, meetings, to-do items)
- Tasks = to-do items
- Events = scheduled happenings
- Can relate to leads/contacts (Who ID) and accounts/opportunities (What ID)
- With shared activities enabled: up to 50 contacts or 1 lead per event
Tasks vs. Events: Key Differences
Before migrating activity data, it is important to understand how Tasks and Events differ.
Prep Event Relations
Events
Require Start Date/Time and End Date/Time
All-day events use Activity Date instead
Tasks
Require a Status value
Flagged overdue if past due date and still open
Event Field Requirements for Salesforce Data Inserts
For an Event record to insert successfully, one of these combinations must be provided:
Date/Time Requirements
Your event data must meet one of these combinations:
Your event data must meet one of these combinations:
Start Date/Time+End Date/Time— Salesforce calculates durationStart Date/Time+Duration— Salesforce calculates the end date/timeIs All Day Event= True +Activity Date— used for all-day events
Option 1: Start Date/Time + End Date/Time
Salesforce calculates the event duration automatically.
Example:
Start Date/Time: 07/25/2026 10:00 AM
End Date/Time: 07/25/2026 11:00 AM
Option 2: Start Date/Time + Duration
Salesforce calculates the End Date/Time.
Example:
Start Date/Time: 07/25/2026 10:00 AM
Duration: 60 minutes
Option 3: All-Day Events
For all-day events::
Is All Day Event = True
Activity Date = 07/25/2026
Start Date/Time, End Date/Time, and Duration should remain blank.
Essential Salesforce Event Fields
Before loading Events through Data Loader, prepare the required fields.
Subject
The Subject field is the event title.
You can create this by:
- Copying the event description
- Limiting the value to 255 characters
Example:
Customer Discovery Call
Event Owner
The Event Owner determines who owns the calendar event.
This can be:
- Salesforce User ID
- Public Calendar ID
Important:
- Events cannot be owned by queues.
Who ID and What ID
Who ID and What ID are polymorphic fields (they can reference multiple object types).
You have two common approaches:
Option 1: Use VLOOKUP in Excel
Use Excel formulas to match legacy IDs with Salesforce IDs.
Example:
Legacy Contact ID → Salesforce Contact ID
Option 2: Store Legacy IDs in Custom Fields
Instead of immediately converting IDs:
- Import legacy IDs into custom fields.
- Use them later for relationship mapping.
This approach is useful when performing complex migrations.
Understanding Event Relations
When Shared Activities are enabled, Salesforce allows multiple contacts to relate to one Event.
An Event can have:
- Up to 50 contacts
- One lead
To add additional related records after creating Events, use the: Event Relation object
Event Relations can represent:
Related Records vs. Invitees
Related Records
These interact with:
- Is Who
- Is What
Examples:
- Contact attendee
- Account relationship
Invitees
Invitees do not populate:
- Is Who
- Is What
They only represent meeting participants.
Adding Multiple Attendees Using Event Relations
When inserting Event Relations:
Add a column:
Is ParentSet the value:
Truefor all related records.
If the relationship is a “What” record:
Example:
Account
Add:
Is What = True
This populates the Event’s:
What ID
An event can only have one What ID .
If your file has multiple “what” relations for a single event, only the first will be set — the rest will fail.
What ID Limitation
Salesforce Events only support:
One What ID per Event
Example:
An event cannot simultaneously have:
- Account A
- Opportunity B
- Case C
as multiple What relationships.
If multiple What records exist:
- The first one may populate What ID.
- Additional What relationships will fail.
Troubleshooting Common Errors
Common Insert Errors
Field Integrity Exception
Occurs when What ID is populated with a lead record in Who ID. Fix: blank out the What ID
Bad Value for a Restricted Picklist Field
Add the missing values from your file to the picklist field in Salesforce.
Activity Date / Start Date Mismatch
If you get an “activity date and start date/time must match” error and they appear to match in your file — this usually happens with all-day events.
- Filter for all-day events
- Blank out
Start Date/Time,End Date/Time, andDuration - Confirm
Activity Dateis populated
Walkthrough: How to Insert Event Data in Salesforce
Here’s the full walkthrough for how to insert event data in Salesforce using Data Loader, from Excel prep to verification.
Prep in Excel
- Open your workbook → go to the “Sample Events Prep” tab
- Format
Created Date,Start Date/Time,End Date/Time - Verify
Activity Dateformatting - Filter
Is All Day Event= True → confirmActivity Dateis populated and other date fields are blank - Sort by
Who ID→ confirmWhat IDis blank where a lead ID is present
Create CSV & Load
- Save your prepped data as a CSV
- Open Data Loader → Insert → select “Event” object
- Select your CSV file
- Check field mappings → run the load
Review Results
- Expect success (the only error should be the header row with original API field names)
- Copy the success file → new tab named “Event Successes”
- Grab an inserted event
ID→ check it in Salesforce:yourdomain.salesforce.com/event_id - Verify
Name,Related To,Start Date/Time,End Date/Time
Prep Event Relations
- Go to the “Event Relations” tab
- Use the Event IDs from your “Event Successes” tab
- Check the loaded event record in Salesforce for
Name,Related To, and attendees
Load Salesforce Event Relations CSV
- Data Loader → Insert → select “Event Relation” object
- Select your prepared CSV file
- Confirm mappings → choose output folder → run the load
Verify Results
Related To is populated (e.g., with an Account); contact attendees are visible; the Meeting Digest shows the correct attendee count, including the organizer.
You’re now ready to insert event data in Salesforce confidently using Data Loader.
One Response