You’re probably already familiar with insert and update operations. Insert always creates new records whereas update makes changes to existing records that you already know their Salesforce record id.
But what if you don’t know the Salesforce record id of the records you want to update?
Learn about the Power of Upsert and External IDs in this presentation based on my blog post series:
https://douglascayers.wordpress.com/2016/02/07/salesforce-power-of-upsert-and-external-ids-part-1/
https://douglascayers.wordpress.com/2016/02/07/salesforce-power-of-upsert-and-external-ids-part-2/
7. #MWD16
Health Systems ACO & Population
Management
Behavioral Health
Ancillary Providers & Healthcare Service Providers
8. External Data Integration
• Scenario
▫ When Salesforce is not the “System of Record”
• Concerns
▫ How to prevent creating duplicates in Salesforce?
▫ How to create parent records then link child records?
#MWD16
ERP OMS EMR HCM
16. Did he say ‘upsert’??
• Insert
▫ Always creates new records
• Update
▫ Makes changes to records you know their Salesforce ID
• Upsert
▫ Inserts or Updates based on existence of the record
▫ Matches on External ID field
#MWD16
19. First, you need External IDs
• Supported Custom Field Data Types
▫ Auto Number, Number, Text, Email
• Determine Record Identifiers from External Systems
▫ Order Numbers, Patient IDs, Employee IDs, …
• Super Power: Field becomes Searchable and Indexed
▫ SOQL performance!
#MWD16
20. Upsert Benefits
• Simplifies insert/update operations!
• Do not have to know Salesforce IDs!
• Do not have to export and match on
existing records!
• Helps prevent duplicates!
• Fewer API calls needed!
• Can set lookup fields too!
#MWD16
21. Live Demo Time
• Create External ID
• Salesforce Data Import Wizard
• MuleSoft dataloader.io
• Salesforce Data Loader
• Workbench
• Apex Code
#MWD16
22. Best Practices
• Mark External IDs as Unique
• Use Compound Values for Uniqueness
#MWD16
“Hospital-100 Patient-123” “Hospital-200 Patient-123”
23. Use Case: Populating Sandboxes
• Create Salesforce Migration ID field in production
▫ Unique, Case-Sensitive, External ID
• Create Sandbox or Deploy New Fields
• Export Data from Production
• Import Data to Sandbox
▫ Upsert matching on Salesforce Migration ID
▫ Map exported ID field to Salesforce Migration ID
#MWD16
24. Use Case: Multiple Source Systems
• Invest in Master Data Management
▫ MDM Strategy Dreamforce Video
• Upsert Salesforce by MDM External ID
▫ Store related system ids as other fields
• Benefits
▫ Mashups with Canvas apps
▫ Deep linking to related systems
▫ More context on layouts & reports
#MWD16
25. ETL: Advanced Data Loading
• Upsert with Talend and Populating Sandboxes
• MuleSoft Salesforce Connector
• Upsert with Jitterbit
• Upsert with Informatica and User Guide
• IBM DataStage and IBM Cast Iron
• Dell Boomi Salesforce Connector
• V12 Connect by Virsys12 & Trinisys
#MWD16
26. Further Reading
• My Blog Posts: Part 1 and Part 2
• Data Import: Cleaning Up Your Import File
• Red Argyle: VLOOKUP Explained
• Salesforce University: Integrating with SOAP API
• Apex Developer Guide: Upserting Records
• Jeff Douglas: Using External IDs in Salesforce
• Jitendra Zaa: All About Upsert and External ID
#MWD16