Blog

Quickly Create Fake Salesforce Data with ChatGPT

Hey Salesforce Admins – Maybe you know this already, but just in case… it’s really easy to use ChatGPT to generate high quality fake data.

Example 1 – Super Simple Dataset

Let’s generate fake contacts to import with the Data Import Wizard. I can type the names of my fields directly into the ChatGPT prompt. I can also tailor the record details to match my actual contacts, and make it fun at the same time (Sample data is probably the best way for a Salesforce admin to be silly!)

Here’s what my first prompt looks like:

Create a sample csv data set of 25 records. Here are the column headers: Name Favorite 80s movie Favorite 90s movie Hobby Age Current Member. Populate the hobby column with obscure hobbies. Make the ages 18-75, but mostly in their 30s. Make current members mostly true, but a few false.

Make sure you specify that the results are in csv format! Here is what it generated.

Continue reading Quickly Create Fake Salesforce Data with ChatGPT

Unsubscribe Link 4.0 Ready for Testing!

Are you interested in giving your email recipients the option to unsubscribe from all email that you send out through Salesforce? Please test out the latest version of the Unsubscribe App.

Install this package in your sandbox or a Trailhead playground.

Follow the instructions here and add comments to the google doc.

Goodbye Site.com and Hello Experience Site!

Instead of being built on an old Site.com site, you now use an Experience Site to expose the flow to the email recipient.

Continue reading Unsubscribe Link 4.0 Ready for Testing!

Google is About to Require One-Click Unsubscribe

As of February 2024, Google wants bulk senders to allow users to unsubscribe with only one click! That means no more page that says “Are you sure you want to unsubscribe?” You can read more here about how your company organization can get marked as spam if you do not follow this requirement!

If you have already installed the Unsubscribe Link app, I will walk you through how you can update it to meet this requirement. It’s actually easy, I promise. It’s an unmanaged package so I am not able to push changes to you.

Here’s how to update your Unsubscribe Link App:

  1. Go to Setup.
  2. Search for Flows.
  3. Open the flow called Unsubscribe Link.
  4. Click on the blue element Screen: Are you sure
  1. Click the trashcan icon that pops up.
  2. Click on the white dot on the element Decision: Was a record found and drag that to the element Create Records: Create Unsubscribe Record. The text “Yes, Record Found” should pop up.
  3. Click Save As in the top right corner.
  4. In your description you could add that this version includes one-click unsubscribe. Save.
  5. Activate in the top right.

New or having trouble?

If you have not yet installed it, I am currently having trouble modifying the existing app to get it working package because of change in permissions for site guest users for flow. I am trying to install in a dev org and failing to get it work for a site guest user. I am working on a new solution that is based on an Experience Site instead of a Site and that changes how flows are run for users.

If you have an insight on why it is not working currently, contact me via the group below.

Join the Unsubscribe Link Support Group in Trailblazer Community

Ask all your questions and give feedback here. FYI, this project is something I am doing on the side and is not part of my job. If you are interested in helping me maintain and upgrade the app, I would love that! If you have successfully installed the app, you could join the group to answer other people’s questions. Thank you so much!

Thank you

A huge thank you to Brian King who alerted me to this requirement from Google! I am very grateful!

Import Data with VS Code

This post isn’t fully baked, but here are some instructions on how to import data with VisualStudio Code! I used this because I was importing data to objects that did not have API yet – new products that were not released to the public yet. This is not a common scenario. But there may be other valuable use cases.

  1. Make an External ID field on your object and check boxes for unique and external id. Let’s call it External ID aka External_ID__c.
    • Give your system administrator access to that field.
  2. Prep your spreadsheet.
    • Each row header needs to be the API name of the field. Absolutely exactly correct or it won’t work. You don’t match fields in this process.
    • Export as CSV.
Continue reading Import Data with VS Code

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!

Continue reading Start Generating Fake Data with Snowfakery

Log Email on Send in Flow Now Easy

I wrote a post almost a year ago instructing you how to log an email to the contact or lead from your flow. Now that’s a built in option in the Send Email Action in Flow in Summer ’23.

I’m cooking up some new posts including a new version of the Unsubscribe Link app that I’ll release any day now.

Use ChatGPT to Respond to Emails in Salesforce

Don’t know what to write to a customer or a major donor? Not sure how to be kind and encourage someone to try a little harder next time? ChatGPT can do that for you. And now you can use it right inside Salesforce to respond to your emails.

My colleague Brian Ricter wrote an apex class connecting Flow with ChatGPT. It takes a string, sends that as the prompt to ChatGPT and returns the response. You can use this apex action in a flow to do anything you want with ChatGPT!

I’ve utilized Brian’s apex action in a screen flow that helps you respond to a contact’s most recent email. And I’ve packaged it up for you to install easily.

In this demo, our company sells pet rocks. We’ve received a kind email from our customer Bob. Let’s use ChatGPT to respond to Bob in a friendly way and in a flirty way.
Continue reading Use ChatGPT to Respond to Emails in Salesforce

How to Modify a SOQL Query with Two Objects

A SOQL query pulls certain records and fields into Apex Code. This post explains a SOQL query that includes Contacts and their related Opportunities from the Year End Tax Receipt app, but I aim to help you understand SOQL in general.

For those of you that want to modify the Year End Tax Receipt for your specific donors:

  • Follow along with this post to modify which records will be displayed in the table of gifts last year. We’ll look at an example of only included gifts marked tax deductible.
  • Look at the original post to learn how to modify which columns appear in the gift table.

Understand the SOQL

Here’s my SOQL query. This is how I get the records and fields that I’m going to do something with later on in the code.

1 [SELECT LastName, id,Gifts_Last_Year__c, 

2 (SELECT Id, CloseDate, Amount FROM Opportunities 
                                                                                  
3 WHERE CALENDAR_YEAR(CloseDate) =:year 

4 AND IsWon = True 

5 ORDER BY CloseDate) 

6 FROM Contact WHERE npo02__OppAmountLastYear__c > 0 

7 WITH SECURITY_ENFORCED]          
    
Continue reading How to Modify a SOQL Query with Two Objects

Flow Loops Just Got Simpler

Actually, I don’t know when this change happened, but I just noticed that Flow loops now only have four steps instead of five. The two assignments can now be consolidated into one.

You still have to add the record to a collection, but you can use the same assignment element.

Example 1: Update the record currently in the loop.

  1. Use a Get Records element to create a collection of records to loop through.
  2. Add a loop element
  3. Add ONE assignment element
    • Update field values for record currently in the loop.
    • Create a new record collection variable to hold the records you want to update.
    • Use the same assignment element to add the record currently in the loop to the new collection.
  4. Add an Update Records element to update the records in your new collection.

Follow my blog to keep up to date on Flow and Salesforce


Example 2: Create new records.

  1. Use a Get Records element to create a collection of records to loop through.
  2. Add a loop element
  3. Add ONE assignment element
    • Create a new record variable (not collection) to hold the values of the new record you want to create.
    • Assign field values to your new record variable.
    • Create a new record collection variable to hold your records that you want to create.
    • Use the same assignment element to add the record currently in the loop to the new collection.
    • Close the loop.
  4. Add a Create Records element to create the records in your new collection.

Previously step 3 involved two assignment elements!

Watch this recording on Flow loops.

This is how you would combine steps 3 and 4 into one assignment!