Welcome to another post in the “How I Solved It” series. In this series, we do a deep dive into a specific business problem and share how one #AwesomeAdmin chose to solve it. Once you learn how they solved their specific problem, you’ll be inspired to try their solution yourself! Watch how Stacy O’Leary gives users a fast and easy way to update Salesforce when a contact moves to a new company.
Key business problem
As a Salesforce Admin, one of the most important jobs you have is to make sure your org’s data is accurate and clean. Doing this minimizes the amount of time your users spend hunting for information or calling people who aren’t really prospects, and can even reduce frustration in your prospects and customers. As admins, however, we don’t always know if data is accurate, which is why we sometimes need help from our users.
When a contact in Salesforce changes jobs, we want to capture that information accurately in Salesforce, without losing any data. We also want to make sure we don’t have any misaligned data. A Contact record can have a lot of things tied to it: emails logged, campaign membership, form fills, etc. Deleting the Contact isn’t right—there might be relevant old case records or emails that we want to keep a record of, tied to the right person. Changing the Account lookup on the Contact to the new Account isn’t right either, because all that old data still needs to be tied to the old Account and the old Contact record.
We need to preserve the old information while also creating a new record for future use (especially if the contact is a potential prospect at their new company).
How I solved it
I solved this by creating a screen flow that’s launched by a custom action on the Contact page. Let’s take a look at our contact, Sarah Murphy. Our company’s top-selling account executive (AE) calls Sarah to talk about a new product launch. Sarah informs our AE that she’s left ABC Corp and now works at XYZ Corp. The AE thanks Sarah for letting her know and writes down her new contact information. At this point, the AE knows that the information in Salesforce is now incorrect, but nobody else (including the admin) knows. So, what do we do now?
This is where our “Move to New Company” flow enters the picture. Our AE can simply navigate to Sarah’s contact record in Salesforce and click Move to New Company.
The AE can easily enter the new contact information for Sarah.
And, they can click the link to navigate to the new contact record, and log their call.
The AE doesn’t have to do anything to update the old record—it’s all handled via the flow.
Do try this at home
Let’s take a look at how to build this easy flow with just five elements.
1. Start with a screen flow.
2. Add a Get Records element to get the original Contact record.
3. Create the first screen element your users will see. This is the main screen the user will interact with, so consider adding instructions for the user or any additional required fields that the user needs to fill out. Because we’re creating a new Contact record, we want to set New Account, First Name, Last Name, and New Email fields to be required. Title and phone are optional in this example.
4. Add a Create Records element to create the new Contact. You’ll notice that, in addition to the fields we asked the user for on the prior screen, we’re also populating Lead Source and Status. Status is being set to a default value, and Lead Source is being set to the same as the old Contact.
5. Add an Update Records element to archive the old Contact record (since we don’t want to delete it).
The old record still needs to exist for record keeping, but we don’t want to use it going forward. With this in mind, we make sure to mark this person as opted out of email and calls, and set their Status to ‘No Longer At Company.’ Some companies use a Disqualified Status and a Disqualified Reason. If your org operates like this, be sure to set the proper values here.
6. Create the second screen element the user will see—the link to the new record. This node should include any final directions and have a link to the new Contact. In an earlier step, we used a Create Contact node, and a variable was automatically created for the new Contact record. We can use this to create a hyperlink to our new Contact. The hyperlink itself should consist of a forward slash immediately followed by the ID of the new Contact that was just created: /{!Create_New_Contact}. This way, your hyperlink will always work, even when you migrate this flow from your sandbox to production.
7. Save and activate your flow.
8. Navigate to the Contact object in Setup, and go to Buttons, Links, and Actions.
9. Click New Action and create an action for this flow. Click Save.
10. Add the button to the page layout or to your dynamic actions (depending on how your org is set up).
11. OPTIONAL: Add a rich text component to the Lightning page that clearly explains when the old Contact should no longer be used. A single rich text component with a component visibility filter is all you need to set this up to only show when the status of the contact is ‘No Longer At Company.’
Business results
Now, no data is lost. Our AE is easily able to both update an old record and create a new record in a single step, and we provide clear and easy-to-understand directions for the end user.
Plus, you can easily tailor this flow to your particular business needs. If you have additional fields on the old Contact that need to be modified, or data copied from the old Contact to the new Contact, you can manage that all within this flow—without adding any extra work for your users.
I hope you find my solution helpful! If you’re just getting started learning about flows, this is a great one to practice with. And it goes without saying, but sandbox, sandbox, sandbox!
Welcome to another “How I Solved It.” In this series, we do a deep dive into a specific business problem and share how one Awesome Admin chose to solve it. Once you learn how they solved their specific problem, you’ll be inspired to try their solution yourself! Watch how Dee Ervin searched unsearchable field data […]
Welcome to another “How I Solved It.” In this series, we do a deep dive into a specific business problem and share how one Awesome Admin chose to solve it. Once you learn how they solved their specific problem, you’ll be inspired to try their solution yourself! Watch how Deanne Walters uses Flow to create […]
Welcome to another “How I Solved It.” In this series, we do a deep dive into a specific business problem and share how one Awesome Admin chose to solve it. Once you learn how they solved their specific problem, you’ll be inspired to try their solution yourself! Watch how Erick Mahle improved user navigation within […]