Start Generating Fake Data with Snowfakery

How to Connect Your Org to Snowfakery

Snowfakery is a free and open source tool used to generate and insert fake data into Salesforce (and more!).

In this post I’m going to show you how to get started as quickly as possible using existing “recipes” or instructions for what data you want to create. Something like… I want a pinch of Accounts in Michigan, a heaping tablespoon of Contacts with ages ranging from 18 to 24, and 2 cups of Opportunities closed won.

Snowfakery?

We aren’t going to write our own recipes to get started today. The documentation on how to create Snowfakery recipes (and this excellent training video from 2021) will help you with recipe creation, but there are plenty of existing recipes to utilize. Let’s go!

Pre-requisites:

Yeah, that’s a lot. I don’t think you need to know much about these tools to follow this tutorial, but please let me know if I’m assuming some knowledge.

Watch the video and/or read the instructions below.

Open the Repository in VS Code

The first thing you want to do is clone this repo and open it in VS Code. There is probably a better way to do this, but here’s what I did:

  • Go here to the Snowfakery repository.
  • Click the green Code button then select Open with Github Desktop.
  • Click on the Repository menu across the top and select Open in Visual Studio Code.

Next Steps

  • Click on the Terminal menu across the stop and select New Terminal.
  • Connect to the org in which you want to insert data by typing in cci org connect <org name> so if you want your org to be “246testData” then you type cci org connect 246testData
  • Then a screen will pop up where you log into your org.
  • Next paste in cci task run snowfakery --recipe examples/salesforce/Account.recipe.yml --org 246testData (replace that with your own org name)
  • And hit enter. This will run the sample code for inserting accounts!

Use Your Own Recipe

After you learn to create your own recipe, replace one of the sample recipes with your own:

In VS Code, open the Explorer which looks like two pieces of paper. Expand items in the list until you find Examples, then Salesforce and in there are all the sample .yml files! You can use any of these, change them or manipulate them. You could save your own file in here too.

Celebrate

Generating fake data for your sandboxes or customers can really help your users understand what they are seeing. That’s a huge win.

And personally, maybe you don’t consider yourself a developer yet, but if you’ve gotten this far, you are well on your way!

Keep growing with Visual Studio Code and CumulusCI. Try this post.

Snowfakery is Community Driven

Community members are involved in:

  • creating/updating sample Snowfakery recipes
  • spreading the word about Snowfakery through presentations, blog posts, podcasts, SF community events
  • reporting/fixing bugs, suggestiong/contributing enhancements to the Snowfakery tool itself

For anyone interested in getting involved in the Data Generation Toolikit project:

Published by

JessieRymph

Jessie joined Salesforce.org in 2018 to give introductory webinars to nonprofit customers. She now is a Senior Solution Developer supporting nonprofits and education customers at Salesforce. All opinions expressed on this blog are her own or those of the contributors. She's spent 17 years more or less in CRMs and databases, but didn't meet Salesforce until 2011. Jessie co-led the Seattle Salesforce Nonprofit User Group in 2015-2016. She wrote a sh*tty first draft of a novel and hopes to turn it into a screenplay!

Leave a Reply