Developing Salesforce Data Migrations and Integrations [Book Review]

Share this article...

Here’s my review of “Developing Data Migrations and Integrations with Salesforce”, a book I recommend to any Salesforce Architect (functional or technical) – or, in fact, for anyone planning a migration or building integration on the Salesforce platform.

David Masri, a Salesforce Data Strategy and Architecture Lead, shares all that he has learned in this enjoyable book. I have to commend him here for not adding a throwaway title to the rapidly growing inventory of Salesforce books. Not only is the topic increasingly important, but the content itself is also extremely useful – let’s see how.

“Validity”

Salesforce Platform Migrations and Integrations

The topic of migrations and integrations with the Salesforce platform is a far from saturated space, so I wasn’t sure what to expect here. What I often see is the breadth, depth and quality of entry-level pieces leaves audiences wanting more.

Sure, other general migration and integration books are out there and there’s no doubt they will be useful for those activities on the Salesforce platform. David adds a very Salesforce-specific perspective that is practical, and not just theoretical.

He defines what good migrations and integrations are in a way that opens our eyes to a rigorous, disciplined approach vs. falling into the mistake of misinterpreting the ease of building on Salesforce with the lack of preparation. He also defines a series of best practices that are true nuggets for real-world use. He provides relevant screenshots, diagrams, and tables. Most importantly, David writes well. He takes a very technical topic and presents it conversationally, which makes it considerably easier to consume the material.

My Personal Highlights

Attributes of Successful Migrations

Chapter 4 focuses on the attributes of effective, successful migrations. The six documented attributes are the following:

  1. Well planned
  2. Automated (redoable)
  3. Controlled
  4. Reversible
  5. Repairable
  6. Testable

This is extremely useful to use as a series of validations or checkpoints in either of those processes. Some examples in Data Migration (Chapter 4) include the migration being well planned, automated, and repairable. These may seem obvious when written out, but they are so often missed, and David goes into detail on each one.

For example, on being well prepared: “’well-planned’ is by far the most important attribute. Failure to meet any of the other five attributes can be mitigated by planning, but nothing can mitigate for a bad plan—or worse, no plan.

Repairability

Repairability, according, to David, is “the ability to fix data in a very targeted way after a mistake has been found.” Regarding repairability, David adds, “Often, defects are found weeks or months after going live, when users have made lots of changes to data. They may have even made changes to the data we are trying to fix. In such cases, we don’t have the option of rolling back the migration and redoing it; we must fix the data. But if we have the original dataset and can tie it to Salesforce (so we know the current values), we can repair the data. Sure, we may have to modify our transformation rules to reflect user updates in Salesforce, but it’s still repairable.”

Self-repairing Integrations

The chapter on integration (Chapter 5) explores the attribute of ‘self-repairing’:

“The integration code should not rely on the state of our staging database or data in Salesforce to run properly. The first thing the job should do upon restart is to check on and fix or reset the state (of everything it needs to) and then proceed as normal. If the job fails again, it is safe to assume there was an environmental change that caused the error, and the developer (such as you or me) should be contacted to look into it.”

Salesforce Integration Best Practices

Chapter 6 was chock full of important best practices. Those that resonated with me the most were:

  • Understand the Source Data, Ask Questions to Understand Intent, Analyze Data to Know the Reality (Best Practice #5)
  • Don’t Hard-code Salesforce Ids; They Change with Environments (#10)
  • Store Cross-referenced Data in Salesforce (#11)
  • Load Your Data in the Order of the Object Hierarchy (#12)
  • Don’t Forget about Owners and Record Types (#15)
  • Turn off Duplicate Management (#22)
  • Fix Code, Not Data (#24)
  • Real Users Must Perform UAT on the Data Migration and You Must Get Sign-off before Going Live (#32)

Data Synchronization Patterns

David walks through data synchronization patterns (Chapter 9) and shares clear and explanatory diagrams, like the one below:

The Basic Upsert-No Delete pattern flow.

 

The Wipe and Load pattern flow.

The Basic Upsert-With Targeted Delete pattern flow.

Summary

As I mentioned in my opening, I recommend this book to any Salesforce Architect (functional or technical) – or, in fact, for anyone planning a migration or building integration on the Salesforce platform.

David’s book is currently available from many sources, including online from  Amazon, Barnes & Noble & Apress.

Leave a Reply