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 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

Lightning Web Components

Lightning Web Components – Build Lightning fast Salesforce Apps

Salesforce launched Lightning Web Components as part of Spring ’19 pre-release to enable a quicker and easier way to program applications on the Salesforce Lightning platform. It engages modern Javascript

Salesforce Einstein AI

Take Customer Experience a notch up with Salesforce Einstein AI

Salesforce Einstein AI is the next-gen Artificial Intelligence platform available within your Salesforce CRM data. It analyses your existing data, gives you smart predictions, actionable customer insights, and recommendations. Salesforce

Salesforce Spring ’19 Release Features

Top 10 Salesforce Spring ’19 Release Features

The Salesforce Spring '19 Release is here, and you’ll now be able to explore the exciting new features and upgrades of the newest release. Here is a quick overview of

Salesforce Google adwords Integration

5 Reasons why you Shouldn’t Ignore Salesforce Google AdWords Integration

Salesforce Google AdWords integration - Marketers set aside a sizeable amount of their total marketing budgets to Google AdWords. However, there have been huge challenges with integrating Salesforce data with

Salesforce Events 2019

Your Ultimate guide to Salesforce Events 2019

As a Salesforce professional, participating in Salesforce events is an amazing way to explore new opportunities in the Salesforce landscape and discover new ways to increase your proficiency in the

DemandBlue Salesforce Consultant

Read this before you choose your Salesforce Consultant

So, you’ve decided on Salesforce, the world’s #1 CRM as your preferred Cloud computing platform, which is a great choice! Salesforce is one of most comprehensive CRM solutions that has

Salesforce Retail

Salesforce Retail – Top 9 Holiday Survival Checklist

Salesforce Retail - The 10th Annual celebration of the Singles day celebrated on November 11 in China marked the world’s biggest online shopping extravaganza with Alibaba alone making a record

Salesforce Financial Services Cloud

8 New Features of Salesforce Financial Services Cloud

Salesforce has recently launched new features in Financial Services cloud to drive customer engagement across wealth management, banking, and insurance. Salesforce designed Financial Cloud Software to revolutionize customer experiences and

Leave a Reply

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