Data Loader · Activities

Events are the meeting history clients care about most, and Salesforce is picky about them: one of three date patterns, an owner that isn’t a queue, one What, and every extra attendee in a second load. Here is the whole job, both loads.

3 date patternspick one per row
50 contactsper Event with Shared Activities
1 Whatper Event, no exceptions
11‑minute videoThe full walkthrough
On this page
  1. The problem
  2. Rule 1 · Dates
  3. Rule 2 · Fields
  4. Rule 3 · EventRelation
  5. The two loads
  6. Common errors
  7. Gotchas and FAQ
Watch on YouTube ↗
The problem

Events are history with strings attached.

An Event needs valid dates, an owner that isn’t a queue, and the right Who and What. Attendees beyond the first go in a second load, on EventRelation.

Meetings and appointments are the activity history clients care about most. Tasks are to-dos with a Status. Events are things on a calendar, so Salesforce is fussy about their dates. With Shared Activities on, one Event can relate to up to 50 Contacts or one Lead, plus one What record (an Account, Opportunity and so on).

Comparison of Salesforce Tasks and Events: Tasks need a Status, Events need start and end date/times or an all-day Activity Date
Tasks need a Status. Events need dates.

Prefer to read? Everything in the video is written out below.

Rule 1

Pick one date pattern per row.

Every Event row needs exactly one of these three.

PatternYou provideSalesforce works out
Start + EndStartDateTime, EndDateTimeDuration
Start + DurationStartDateTime, DurationInMinutesEnd
All dayIsAllDayEvent = TRUE, ActivityDateLeave Start, End and Duration blank
A migrated Salesforce Event record showing its start and end date/times and related contact
A migrated Event: dates, owner, Who and What all in place.
Rule 2

Fill the fields that matter.

Subject, owner, and the two polymorphic lookups.

FieldWhat goes in it
SubjectThe title, 255 characters max. Trim the old description if there’s no subject
OwnerIdA User ID or a public calendar ID. Events can’t be owned by queues
WhoIdThe new org’s Contact or Lead ID
WhatIdThe new org’s Account, Opportunity or other record ID. Blank when WhoId is a Lead

To get the new IDs, VLOOKUP the legacy IDs against your success files, or load the legacy IDs into External ID fields and match on those.

Rule 3

Extra attendees go on EventRelation.

The Event load carries one Who. Everyone else is a second insert on EventRelation, once you have the new Event IDs.

ColumnValue
EventIdThe new Event ID from the success file
RelationIdThe Contact, Lead or What record
IsParentTRUE for related records (they show on Name and Related To)
IsWhatTRUE when RelationId is the Account, Opportunity etc.

One What per Event. If the file has two What relations for the same Event, the first sets WhatId and the rest fail. Pick one. Invitees are different: they’re meeting participants and don’t touch Who or What.

The load

Insert Events, then EventRelations.

Two inserts, a success file in between.

  1. Prep in Excel: format the date/time columns, filter IsAllDayEvent = TRUE and check those rows have an ActivityDate and nothing else, sort by WhoId and blank WhatId on Lead rows.
  2. Save as CSV. Data Loader → Insert → Event, check the mapping (API-name headers help) and run it.
  3. Paste the success file into an “Event Successes” tab. Open an Event by ID and check name, Related To and the dates.
  4. Build the EventRelation file from those new Event IDs. Data Loader → Insert → Event Relation, map and run.
  5. Open the Event again: Related To is filled, the contacts show as attendees, and the meeting digest counts them, organizer included.
Errors

The three you’ll probably hit.

ErrorFix
FIELD_INTEGRITY_EXCEPTIONThe row has a Lead in WhoId and something in WhatId. Blank the WhatId
Bad value for restricted picklist fieldAdd the missing values to the picklist (Type, Show As…) or map them to existing ones
Activity date and start date/time must matchAlmost always an all-day Event. Blank Start, End and Duration, keep ActivityDate

More in the Data Loader error codes post.

Gotchas

The questions people ask.

Can a queue own an Event?
No. Use a User or a public calendar ID.
How many people can be on one Event?
With Shared Activities on: up to 50 Contacts or one Lead, plus one What record.
Why load EventRelation separately?
The Event row only holds one Who. Everyone else needs the new Event ID, which you only get from the first load’s success file.
Can I set Created Date to the original date?
Yes, on insert, if you have the Set Audit Fields upon Record Creation permission.
What should load first?
Users, Accounts, Contacts, Leads and Opportunities. Events need all their Who, What and Owner IDs to exist already.
Data Migration Masterclass

Activities come last for a reason.

The Masterclass walks through the full migration in load order, so by the time you reach Events and Tasks every Who, What and Owner they point at already exists.

Know someone migrating years of meeting history?

Share on LinkedIn
Doing this for a whole org, not just one object?

One CSV is a tutorial. Forty objects, 15 years of history and a go-live date is a project. That’s the part I do for a living.

See how I run migrations →