Loading

Add Multiple Contacts to Salesforce Tasks in Bulk with Data Loader and the TaskRelation Object

Udgivelsesdato: Oct 12, 2026
Beskrivelse

In Salesforce, the "Allow users to relate multiple contacts to events and tasks" setting (also known as Shared Activities) lets you link a single task to up to 50 contacts. To associate multiple contacts with many task records in bulk, use Salesforce Data Loader to insert records into the TaskRelation object, not the Task object itself.

Løsning

This article answers the question: how do you add multiple contacts to existing Salesforce tasks in bulk using Data Loader? Insert one TaskRelation record for each task and contact combination.

Before You Begin

Warning: Always back up your data before performing any data operation. See Export Backup Data from Salesforce for more details. Run a test with a small subset of records first, then open the records in Salesforce to verify the results are correct.

Note: The task records must already exist in the org to follow this process. If the task records do not exist yet, refer to Import Tasks or Events (Activity History) into existing records and create the tasks with Data Loader. Leave the WhoID (Name) field blank during the initial task creation.

Create the CSV File for TaskRelation

Create a separate CSV file with the columns TaskID, IsWhat, and RelationID.

  • TaskID: The ID of the task to associate with multiple contacts.
  • IsWhat: Set this to FALSE because the relation is a WhoID relation.
  • RelationID: The ID of the contact to associate.

Populate one row for each task and contact combination. For example, if a task is associated with 2 contacts, that task appears in 2 rows.

TASKIDISWHATRELATIONID
00Txxxxxxxxx2EfFALSE003Axxxxxxxxx0Ab
00Txxxxxxxxx2EfFALSE003Axxxxxxxxx1cD

Upload the CSV File with Data Loader

After you save the CSV file, use Data Loader to upload it to the TaskRelation object.

  1. Open Data Loader and choose the Insert operation.
  2. Select "Show All Salesforce Objects" and select the "TaskRelation" object.
  3. Choose the CSV file you created and map the three fields TaskID, IsWhat, and RelationID correctly.
  4. Click Finish.
Yderligere ressourcer
Vidensartikelnummer

000382432

 
Indlæser
Salesforce Help | Article