Dynamic solution for challenges in Salesforce Sandbox environment data refreshes

salesforce sandbox

At DemandBlue, we provide On Demand Services for Salesforce development, customization, integrations, enhancements, and support to clients across various industries. In one of our recent projects, we came across a situation involving Salesforce Sandbox environment, where we were able to provide a solid resolution for our client. What I realized is that this is the kind of situation that any Salesforce development team working in Sandbox can encounter.  I am sharing this knowledge with you in the hope that somebody somewhere finds it useful, and if that happens that would make my day!

Challenges in Salesforce Sandbox:

The client came to us to resolve a data refresh issue they were facing in Salesforce Sandbox environment.  The client uses Sandbox environment (Org) for their production and this included multiple environments for the developer, QA, UAT, etc. They had to refresh the Sandbox often. When they refresh it, test data from Org gets erased. It takes 2-3 business days for them to export the data from production and import those data into Sandbox manually. As the frequency of refresh is often, the client wanted to generate test data for the objects after refreshing the Sandbox, so that they can start development immediately.

In order to populate the data automatically, client’s Salesforce developers had developed an apex class with predefined methods to populate the data for all predefined objects. The values were given statically in the methods. The values inserted through these methods would be assigned to respective objects.

The client realized that this workaround solution not only was temporary but also required a lot of manual intervention. They wanted to automate this process, to save time and release resources to focus on their development activities.

Our Solutions:

It was at this point they reached out to us for a permanent automated process.  Our team assessed their existing environment and analyzed their requirements. Subsequently, we came up with a couple of solutions.  One was to work with their existing code, which would retain most of their effort, but would be a complex process that may not be the best available solution.  On the other hand, we suggested configuring the custom settings, which would meet all their requirements.

How we convinced the client:

The client was reluctant at first to go for option 2, so we demonstrated to the client how our solution would work.  The solution was to configure custom settings in Salesforce Sandbox with the order of upload of CSV files for objects to be inserted and the primary key of the objects. We created an apex class, which would read the custom settings. When Sandbox is refreshed, Apex class will process the CSV file and insert the data into respective objects as per the custom settings.

For example, if we consider an Account object, the custom settings will contain object name, object API name, sequence of insertion and CSV file name. Apex class reads custom settings, process its CSV file, and insert it into Account object.

As per this approach, the client need not change any code. If any new object is to be added, they have to configure the custom settings and upload respective CSV file to a static resource in the production system. When Sandbox is refreshed, it will automatically populate the data of this object along with other objects.

Once the client understood that our proposed solution was dynamic, they readily agreed and gave the go-ahead for the project.

DemandBlue’s On Demand Services

DemandBlue is dedicated to transforming customer experiences by seamlessly transforming your Salesforce Sandbox environment. Our On Demand service team has experienced professionals focused on customer experiences, operational efficiency, and technology transformation to turn ideas into impact for your Organization. To find out more about how DemandBlue can help you transform your Salesforce Sandbox environment, Talk to our Team!

Authors: Indhu Ravi & Pavithra R, DemandBlue CoE

Recent Post

Salesforce DX Setup

Salesforce DX Setup – Everything You need to Know

Salesforce DX Setup - Since inception, one of Salesforce’s core philosophies and the Big Idea has been to make building easy. Software should not be complex to install, set up,

Salesforce Einstein Features

4 New Salesforce Einstein Features – What it means for Service Cloud users

Salesforce Einstein Key Features - Salesforce’s recent announcement of Einstein Artificial Intelligence capabilities have quickly made headlines and for all the right reasons. With the role of customer service agents

Salesforce Development Services

DemandBlue ranked among Top Salesforce Development Services Companies by Goodfirms

We feel privileged to announce that DemandBlue is now ranked among Top Salesforce development Services companies by GoodFirms, a leading research, and review company. (more…)

Salesforce Marketing Cloud Journey Builder

The importance of Customer Journey Mapping and Salesforce Marketing Cloud Solutions

Salesforce Marketing Cloud Journey Builder - Customer experience is the next big marketing race and for good reasons! Companies have started to recognize the importance of delivering superior customer experiences

Pardot Engagement Studio

3 Rules that Trigger the right Actions – Pardot Engagement Studio Best Practices!

Engagement Studio is the next-generation lead nurturing tool of Pardot that enables you to effectively track and manage customer journeys throughout the campaign lifecycle. It allows you to map the

Salesforce Datorama Marketing Cloud Connector

Maximizing Marketing value through Salesforce Datorama Marketing Intelligence and Analytics Tools

Salesforce Datorama - With about 7000 marketing technology solutions disrupting the marketing platform, it has been a constant challenge for marketers to get a 360 degree view of their campaign

Salesforce Email Studio

Salesforce Email Studio – Top compelling reasons why you need it

Salesforce Email Studio is among Salesforce’s Marketing Cloud tools designed to deliver the right message to the right audience at the right time, run email marketing campaigns from start to

Salesforce Journey Builder

Latest Trends you may have missed about Salesforce Journey Builder and GA 360

Salesforce Journey Builder - In November 2017, Salesforce announced a strategic partnership with Google that brought together two of the world’s leading tech giants. And with deep insights from joint

Salesforce Customization Consultant

Salesforce Customization Consultant – Choosing the right partner

Salesforce Customization Consultant - Salesforce is the World’s #1 CRM with leading brands across hundreds of verticals leveraging the platform to transform employee and customer experiences. (more…)

Salesforce Marketing Cloud Interaction Studio

Drive Omnichannel Customer experiences with Salesforce Interaction Studio

Discover how leading brands leverage the power of Marketing Cloud Interaction Studio to drive real-time customer experiences - fostering valuable brand engagement at the right time and just the way

Leave a Reply

Your email address will not be published. Required fields are marked *