Showing results for 
Search instead for 
Did you mean: 

Scenario Example to replicate PeopleImport with DTV Import Upsert

Frequent Contributor

Revised 3/23/2023 with appendix notes at the end on how to update after adding campaign members.

If you're looking to replicate PeopleImport with the new DTV, here's an outline of how I've made this work using Import / Upsert.

In the steps outlined below, I'm only creating new leads when an existing contact or lead is not found, as trying to find a matching account and creating a new company record was beyond the data I had to find existing accounts.   Additionally, if the contact or lead exists and it matches on the first Campaign Member step, then any field updates to the existing contact or leads will be skipped.  So, if you need to make updates to existing records after contacts or leads have been added campaign members, you'll need to remove the campaign matching steps.  Please see notes at the end of this post regarding how to modify this scenario to handle this. 

1. Step 1 Data Mapping
- Add Salesforce Objects in this order: Campaign Member, Contact, Lead
- Update Mappings and Constants for each object:

Campaign Member
Map Fields
: Replicate input fields for name and email as needed to match input file to both contact and leads.


- Campaign Id <insert salesforce record id> (update if empty)
- Status <select preferred status> (use always update or update if empty as preferred)


Map Fields
: Select fields needed, and chose the appropriate update actions.
Constants: no constants are needed if you're not creating new records.

Map Fields: Select fields needed, and chose the appropriate update actions. I generally used Update if Empty to make sure new records are updated with the value from the input file.

Constants: Add Lead Constants as needed with Update if Empty.  In my example, I set the Owner Id and Lead Source Detail fields.


2. Step 2 Import: Record Selection Criteria
- Campaign Member: Campaign Id = <insert salesforce record id> 


- Contact and Lead critiera - add critiera as needed.
- Select fields to display for each object as needed.

3. Step 3 Import: Match Records
- Build your match steps for each object.  For existing Campaign Members, create your contact matching steps first and then replicate these to match leads.  Then replicate the contact and lead matching steps for contacts and leads, and select Create Child Object Campaign Member.




- Under Final/Matching Conditions, select Create New Lead, and chose fields to Limit Duplicates.


- In the Global Task/Campaign Settings, select Assign to Campaign.


4. Preview Matches and review records to import.
In my campaign member records, I also have a custom field for Member Info that contains notes from the source file like comments or the contact's phone, email, title and company.  To get these notes in the campaign records for the new leads that were created, I just rerun the scenario after the records were created.  And presumably all your list contacts will match the campaign members, and this Member Info field will be updated based on the first match step.

Appendex - How to update contact and lead fields after campaign members have been added.

If you need to update contact or lead records after the campaign members have been added.   You'll have to remove the create child object for Campaign Members under Contacts and Lead Matching steps before removing the Campaign Object mapping.

1. Go to Step 3 of 4, and click on Contact and uncheck Create child object.  Then click on Lead and repeat.


2. Go back to Step 1 of 4, and remove the Campaign Member mapping by clicking the X 


3. Go back to Step 3 of 4, and click on Final Matching Conditions, and check Final Step options.  In this scenario, I had to change it from Create New Contact, back to Create New Lead.

4. Click Preview.  If this works as expected, you will see all records matched with ### Records to Update | 0 Records to Insert at the bottom of the results page.

Good luck, and please post any questions or feedback this this post.