salesforce - the power of upsert and external ids

28
#MWD16

Upload: doug-ayers

Post on 16-Jan-2017

888 views

Category:

Technology


6 download

TRANSCRIPT

Page 1: Salesforce - The Power of Upsert and External IDs

#MWD16

Page 2: Salesforce - The Power of Upsert and External IDs

#MWD16

Midwest Dreamin’ Platinum Sponsors

Page 3: Salesforce - The Power of Upsert and External IDs

#MWD16

Midwest Dreamin’ Gold Sponsors

Page 4: Salesforce - The Power of Upsert and External IDs

The Power of Upsert and External IDsSalesforce Data Integration Techniques

#MWD16

Page 5: Salesforce - The Power of Upsert and External IDs

Doug AyersSenior Developer/[email protected]/douglascayers

#MWD16

Page 6: Salesforce - The Power of Upsert and External IDs

Your Bridge Between Technology & Need

An award-winning Silver Consulting Partner focused on healthcare innovation

Page 7: Salesforce - The Power of Upsert and External IDs

#MWD16

Health Systems ACO & Population Management

Behavioral Health

Ancillary Providers & Healthcare Service Providers

Page 8: Salesforce - The Power of Upsert and External IDs

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

Page 9: Salesforce - The Power of Upsert and External IDs

#MWD16

Traditional Approach

ExportRecords

VLOOKUP to Match

Insert Non-MatchesUpdate Matches

1

2

3

Page 10: Salesforce - The Power of Upsert and External IDs

#MWD16

Traditional Approach

ExportParentRecords

VLOOKUP to Match

1

2

ExportExistingRecords

VLOOKUP to Match

Insert orUpdate3

4

5

Page 11: Salesforce - The Power of Upsert and External IDs

#MWD16

Traditional Approach

1

2

3

4

5

6

7

Page 12: Salesforce - The Power of Upsert and External IDs

#MWD16

How you feel juggling all the files…

Page 13: Salesforce - The Power of Upsert and External IDs

#MWD16

How you feelwhen it goes wrong…

Page 14: Salesforce - The Power of Upsert and External IDs

#MWD16

TediousError Prone

Doesn’t Scale

Traditional Approach

Page 15: Salesforce - The Power of Upsert and External IDs
Page 16: Salesforce - The Power of Upsert and External IDs

#MWD16

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

Page 17: Salesforce - The Power of Upsert and External IDs

#MWD16

Page 18: Salesforce - The Power of Upsert and External IDs

#MWD16

First, you need External IDs

Page 19: Salesforce - The Power of Upsert and External IDs

#MWD16

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!

Page 20: Salesforce - The Power of Upsert and External IDs

#MWD16

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!

Page 22: Salesforce - The Power of Upsert and External IDs

#MWD16

Best Practices• Mark External IDs as Unique

• Use Compound Values for Uniqueness“Hospital-100 Patient-123” “Hospital-200 Patient-123”

Page 23: Salesforce - The Power of Upsert and External IDs

#MWD16

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

Page 24: Salesforce - The Power of Upsert and External IDs

#MWD16

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

Page 25: Salesforce - The Power of Upsert and External IDs

#MWD16

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

Page 26: Salesforce - The Power of Upsert and External IDs

#MWD16

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

Page 27: Salesforce - The Power of Upsert and External IDs

QuestionsDoug [email protected]/douglascayers

The Power of Upsert and External IDs

Page 28: Salesforce - The Power of Upsert and External IDs

#MWD16