Skip to main content
Featured group

Commons Project: Data Generation

Open Source Commons project focused on empowering admins to create meaningful test datasets, including tools and documentation to support this goal.

Hi everyone! Long time, no see... I hope you're all doing well. :) 

I just got back into Snowfakery after a long hiatus and wanted to check if a certain fictitious scenario was possible. 

Let's say I have an object called SalesforceRoles__c which has a bunch of different fields relating to different Salesforce roles (let's say Solution Architect, Technical Architect, Business Analyst, and Developer). I have all sorts of formulas and random_choice elements set up to randomize these fields/choices dynamically and Snowfakery is generating these perfectly. I then want to create between 1-4 friend records based on which types of fields were filled in on the SalesforceRoles__c record. So, if the Business Analyst fields were filled in, I want to create a friend record of type SalesforceRoleInterest__c with Business Analyst-specific fields filled in. If the Solution Architect info was filled in, I want to create another friend record where the Solution Architect-specific fields are filled in, etc. So, each time the recipe runs for that SalesforceRoles__c object, it can generate 1-4 friend records.

I've tried using macros for each combination of fields and then trying various types of "if" criteria to include different macros or the whole friend -> object -> macro with fields combination if certain fields are set to true on the first object.

I was hoping I could do something like this. Or maybe there's some special Python I can include?:

- friends

if ${{SFRole.BusinessAnalyst__c == 'true'}}

- object: SalesforceRoleInterest__c

fields:

# fields for BA filled in

if ${{SFRole.SolutionArchitect__ == 'true'}}

- object: SalesforceRoleInterest__c

fields:

# fields for Solution Architect filled in

Fuller Example:

- object: SalesforceRoles__c

nickname: SFRole

fields:

BusinessAnalyst__c:

random_choice:

True

False

BusinessAnalystInterests__c:

if:

- choice:

when: ${{BusinessAnalyst__c=='True'}}

pick:

${{fake.CatchPhrase}}

SolutionArchitect__c:

random_choice:

True

False

SolutionArchitectInterests__c:

if:

- choice:

when: ${{SolutionArchitect__c=='True'}}

pick:

${{fake.CatchPhrase}}

friends:

- object: SalesforceRoleInterest__c

fields:

# fields for BA filled in

- object: SalesforceRoleInterest__c

fields:

# fields for Solution Architect filled in

0/9000

Virtual Community Innovation: Wrapping up the first virtual sprint of the year!

 

"Can I just say, this has sparked a passion in me and I’m going to attend EVERY sprint going forward" - Virtual Sprinter

 

WOW, what a MASSIVE start to 2024! We were thrilled to gather our Nonprofit and Education community virtually for two days of brainstorming, creating impactful solutions, and fun networking to build community solutions for common challenges affecting Nonprofits and Schools.

 

120+ attendees from 15 countries came together virtually, bringing their skills and passion to the table. From Japan to Australia, to India, the global dedication to this event was truly remarkable! Thank you to all who stayed up late, woke up early, and spent time away from your day job and family to spend time sharing your skills.

 

Ready to dive in? Read the full recap here: https://sfdo-community-sprints.github.io/docs/sprints/2024-02-0607-Sprint

 

Projects included in the recap:

@Commons Project: Data Generation

@CumulusCI (CCI)

@Commons Project: DLRS

@Commons Project: Grassroots Mobile

@Commons Project: Memberships

@Commons Project: NP SF How-to Series

@Commons Project: Salesforce Indicators

@Commons: Sprinty's Community Resources

@Commons Project: Sticky Selectron

@Commons Project: Summit Events App

@Commons Project: Transfer Equivalency

 

WOO! @Cori O'Brien @Kristiane Kindle

FYI @Nonprofit and Education MindShare @Salesforce.org MVPs

#SFDOsprint

2 comments
  1. Feb 22, 2024, 5:11 PM

    @Prachit Kanwar if you look in the group sidebar of this sprint you can see the list of upcoming events, both planned and some that are on the horizon but not confirmed yet.

     

    You can see "Global Virtual Sprint (Time zone TBD), September 11th & 12th, 2024" but dates may be subject to change, so no reg yet but keep an eye out for more! :)

0/9000

I am trying to generate demo data for Program Management Module using Snowfakery and cumulusCI. I am struggling to do it as there is no proper guide or tutorial to do it.  I have create the project as mentioned in Trailhead Module Data Management with CumulusCI.  I am also following the instruction mentioned in  https://github.com/SFDO-Community-Sprints/DataGenerationToolkit/blob/main/docs/PMMSampleinstruction.md

 

it is still confusing. Can someone please guide me to clear simple steps of generating data for PMM Using Snowfakery and cumulusCI

 

Thanks

#PMM #CumulusCI #Snowfakery

8 answers
  1. Feb 12, 2024, 6:16 AM

    FYI for anyone else who wants to import the sample data from the PMM module release:

     

    1. Install VS Code
    2. Install Salesforce extensions (expanded) in VS Code
    3. Install CCI
    4. Log into your org and ensure that your user profile has access to all Account record types
    5. Run the commands in VS Code terminal as follows

    cci org connect <YOUR ORG NICKNAME>

    cci org default <YOUR ORG NICKNAME>

    cci task run load_dataset

0/9000

Sharing this video with a wider audience!  Snowfakery: Magic test data generator, with @Samantha Shain, as presented this past summer to Fort Worth Nonprofit User Group.

https://youtu.be/y4PNfEFlsWo

 

Fill your testing sandboxes with great data in minutes! Snowfakery is a tool for generating fake data that has relations between tables. Every row is faked data, but also unique and random, like a snowflake.  

0/9000

hi! I just got started with Snowfakery and wrote up a tutorial on how I did it pretty quickly once I had all the tools installed. Blog post here! Thanks to @Aaron Crosman @Z X @Eileen Kapp and @Cori O'Brien for your help!

2 comments
0/9000

We’re kicking off a new year with the annual Commons contributor survey.

 

This anonymous survey is intended to give you space to share your feedback and experience in the Salesforce.org Commons program over the past year (2022). This community is yours — your feedback is critical to ensure the spaces we create work for you. Your responses help us understand the impact the Commons has on you and the community, what’s working well and what needs improvement, and how we can continue to support and engage with contributors like you.

We’re kicking off a new year with the annual Commons contributor survey. This anonymous survey is intended to give you space to share your feedback and experience in the Salesforce.

If you’ve participated in the Commons by attending a Community Sprint, attending a Mini-Sprint, or volunteering your time on a project team in the past year in the past year (2022), please take 5-10 minutes to complete the survey by Friday, January 21st.

 

Thank you for the time, energy, and skills you’ve contributed to the Commons and community-led projects whether this was your first year or your 10th. You continue to inspire me every day, and I’m looking forward to engaging in 2023.

Are you an action leader looking for new ways to apply your Salesforce skills? Would you benefit from an innovative space catered to solving common challenges for Nonprofits and the Education community? Here’s your chance... 

 

Registration is NOW LIVE for the November 2022 Community Sprint Event!   

 

We are calling all Salesforce.org Customers, Partners, and employees to gather IN-PERSON in San Francisco for two days of brainstorming, community activation, and thought leadership! At the event, you’ll contribute your Salesforce User, Admin, Developer, and other professional skills to community-led projects looking to make using Salesforce easier for others. 

You do not need to be a developer or highly technical to attend. Everyone is welcome and encouraged to participate!

 

Register today!   

 

Are you an action leader looking for new ways to apply your Salesforce skills?

 

@Nonprofit Hub

@Nonprofit and Education MindShare

@Salesforce.org System Administrators

@Salesforce Administrators & Developers

@Salesforce.org MVPs

11 comments
  1. Oct 21, 2022, 6:37 PM

    We've been to Baltimore, but not DC itself. We used to host our events in hotel ballrooms, so always tended to host in cities more accessible to our Nonprofit community, cost wise, and ones that were generally within driving distance from other large cities. 

     

    Since we've come back post-covid we host in Salesforce office spaces where they have enough space to hold about 100 Sprinters which are generally the towers in bigger cities. It's very possible we could come to DC in the future if there is a space we can use.

     

    For virtual, during covid we held 100% virtual events, but for the upcoming November Sprint in SFO, we're piloting our first hybrid experience. Sign up before Thursday if you're interested in participating with us on Nov 2nd and 3rd :)

0/9000

I was doing a bit of research today on the Eventbrite integration (which I think is deprecated!) and came across this blog post - I think that Idealist did a good job showing varying complexity with pros and cons. An integration works a lot like a mini data migration, and while I always *knew* that on some level, this helped me see it more clearly. I thought others in this group might agree!

5 comments
  1. Sep 18, 2022, 8:22 AM

    Oh dear, I'm searching for stuff on the new Amazon Event Relay Integration using Amazon EventBridge and I find this older post about Eventbrite and Eventbridge (which is a piece of software to integrate Eventbrite and Salesforce) and I got really confused... Anyway... Beaufort 12 has a great Eventbrite sync tool now https://www.beaufort12.com/eventbrite which I have tested and it's really good (but nothing to do with Eventbrite is fabulous because of their terrible data model). And in case you like me looking for the AWS stuff, this post is not it. 

0/9000

How would I fill multiple values in a multi-select picklist? Or better yet, randomly fill with any number of the available values (including none)?

 

Simple single-select example that seems to work:

                Days_of_the_Week__c: 

                  random_choice:

                    - Monday

                    - Wednesday

                    - Friday

                    - NULL

3 answers
  1. Sep 16, 2022, 3:08 PM

    Yup, since my list had only 5 weekday values in it, that was tedious but manageable, and seems to have worked.

0/9000

Is there a way with Snowfakery (& CCI) to generate a data set related to each pre-existing record of an object? A concept like this would seem valuable if we want to make data that covers all test conditions. For example, lets say I have a Program__c object with pre-existing data in it for a couple dozen Programs and want to ensure I generate at least ten (fake/test) Grant__c records related to each one of those. Or I have 35 values in picklist Race__c and want data for all of them.

 

I'm looking in the documentation at "Incorporating Information from Salesforce", which has some examples of concepts like querying for a random related record to fill a lookup, but I don't see how I might ensure I've generated data for all possible lookup values. Maybe something with "SOQLDataset.iterate"? Though I don't know where to find more details about how that feature works related to Snowfakery. (I realize generating enough random records would eventually work, but a more focused solution may be more desirable.)

10 answers
0/9000