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

What Salesforce Tableau Integration Means for Customers?

Salesforce Tableau Integration - Salesforce is known for its acquisitions, always with a strategy to deliver comprehensive CRM features and world-class experiences to its stakeholders. However, its recent purchase of

Salesforce Einstein Chatbot

Salesforce Einstein Chatbots – (Almost) Everything You Need to Know!

Salesforce Einstein Chatbots - With the rise of the internet and online chat, the way people prefer to communicate with businesses has changed. The new consumer mandate is speed -

Salesforce gamification

Salesforce Gamification – Read this before you implement it!

Salesforce Gamification - If you are reading this blog, it’s most likely that you’ve heard about gamification and how it spreads like a wildfire among thought leaders and developers, how

Salesforce State of the Connected Customer Report

Key Takeaways from the Salesforce State of the Connected Customer Report 2019

Salesforce State of the Connected Customer Report 2019 - Customer expectations has hit an all-time high! With over 25 years since the popularization of the Internet and 12 years after

Salesforce Blockchain

Demystifying Salesforce Blockchain

Salesforce is always a company that is looking ahead to the next big in technology, whether it is mobile, social, IoT or Artificial Intelligence. The world’s leading CRM Company recently

Salesforce Marketing Cloud Benefits

3 Key Marketing Challenges and how you can overcome them with Salesforce Marketing Cloud Benefits

Salesforce Marketing Cloud Benefits - In the digital age, customers are invariably inundated with marketing messages everywhere. Digital Marketing experts estimate that most Americans are exposed to about 4,000 to

Salesforce DX Benefits

Build Collaboratively, Deliver Continuously and Innovate Faster with Salesforce DX Benefits

Salesforce DX Benefits - Salesforce Developer Experience (DX) is a brand new way to develop and manage apps on the Lightning Platform across the entire life cycle. It combines the

Salesforce Distributed Marketing

Salesforce Distributed Marketing – Enabling the last mile connect!

Salesforce Distributed Marketing - When you utter the name of a brand and people are able to instantly recognize, it’s not just because they know the specific name or they

Salesforce Summer '19 Release features

Top 10 Features in Salesforce Summer ’19 Release

Salesforce releases over a whopping 150 new features three times a year during its seasonal releases: Spring, Summer, and Winter. And one of the most awaited Salesforce Summer ’19 Release

Salesforce Development Partner

Top Considerations in Choosing the Right Salesforce Development Partner

Salesforce is the world’s leading and one of the most powerful CRM platforms that can redefine your digital journey, foster stronger brand loyalty and engagement, enhance Customer Experiences (CX) and

Leave a Reply

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