How I Solved It with Brandon Walton and Karri Webster

One Problem, Four Solutions: Use Prompt Builder and AI to Revive Sales Opportunities | How I Solved It

By

Welcome to a special edition episode of “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. But in this episode, we’ll show you how not one, not two, not three, but FOUR Awesome Admins solved the business challenge.

In this blog post, watch how two of my past “How I Solved It” stars, Karri Webster and Brandon Walton, each tackle the same business challenge, sharing their unique solutions and guiding us through their processes to solve the business problem using Prompt Builder and Salesforce AI. To see the other two solutions to the same business problem, using Flow, see this additional blog post.

Solutions covered in this post:

How Brandon Walton solved it using Salesforce AI
How Karri Webster solved it using Prompt Builder


Key business problem

Mochi, Inc. is looking for a streamlined solution for our sales team to manage and revive neglected sales opportunities.

The objective is to enable our salespeople to effectively re-engage with customers, advance the sales process, and offer additional products and/or services, all with personalized communication, and allow for quick and efficient updates to these sales opportunities.

Solution 1: How Brandon Walton solved it using Salesforce AI

How I designed the solution

My approach is based on leveraging Salesforce out-of-the-box functionality and new artificial intelligence (AI) features.

Keeping user adoption top of mind, my objective is to make thoughtful, incremental improvements over time that enhance the user experience without overcomplicating the UI.

I want to focus on only showing records that are relevant to Mochi, Inc. users, and empowering them with the Salesforce tools that will increase their productivity to quickly and efficiently progress and update their Sales opportunities.

How I solved it

My solution to Mochi, Inc.’s challenges includes a combination of Salesforce's traditionally powerful tools and Salesforce AI-powered features.

Configure an opportunity list view to identify neglected opportunities

Using List Views, I was able to perform detailed gap analyses on opportunity data. These tools helped identify where crucial information was missing, ensuring the sales team had a full and accurate story behind each lead or opportunity.

Creating a New List View for neglected opportunities.

The list view I identified for Mochi, Inc. assists its sales team to easily identify neglected opportunities.

The list is named ‘My Neglected Opportunities’ and shared with all users.

The filters I used in My Neglected Opportunities are:

  • Filter by Owner: My Opportunities
  • Last Activity is less than LAST MONTH*
  • (OR) Last Modified Date is less than LAST MONTH
  • (OR) Last Stage Change Date is less than LAST MONTH
  • (AND) Opportunity Stage not equal to Closed Won OR Closed Lost

Opportunity list view for 'My Neglected Opportunities'.

This gives me a list of open opportunities assigned to the current user, without a related activity captured within the last month, and without any updates within the last month. While the Last Stage Change Date may be considered redundant, by adding it to the filter, I’m able to change the relative time duration values as determined by sales leadership.

Enable Einstein AI features

With the data foundation set, I turned to Einstein to take things a step further.

I used Einstein Activity Capture, integrated with both Gmail and Outlook, and Conversation Insights to help salespeople keep track of meaningful interactions with customers and offer actionable takeaways from meetings and emails. These features help ensure no conversation or opportunity is overlooked.

Einstein Activity Capture Setup page.

Next, I deployed Einstein for Sales - Sales Emails, which ensures that sales emails are professionally drafted by Einstein AI. This helps improve the quality of communication and consistency across the sales team.

Einstein for Sales Setup page.

Since Sales Emails were enabled with email prompt instructions, I can leverage Einstein GenAI to create a personalized reignite engagement prompt template for sales users. Using prebuilt AI prompts to generate sales emails saves time and effort.

An active AI email prompt template for re-engaging customers.

Salesforce comes with some great prompts available right out of the box.

With a prebuilt prompt, approved by the admin team, Mochi, Inc. sales reps can use generative AI to quickly produce professional emails to re-engage with contacts associated with their neglected opportunities.

Drafting an email using Einstein AI.

Leverage Einstein Next Best Action

Now that AI is helping to get customers re-engaged, I wanted to give reps the ability to give away a compelling gift to move their opportunities forward.

I created a Recommendation and Next Best Action so that reps can extend the right offer to the right customers at the right time.

Creating a new Salesforce Recommendation to Issue Mochi Credits to a customer.

After creating the Recommendation, I created a new strategy in Einstein Next Best Action using Strategy Builder. I named it ‘Re-Engagement Offer’.

Managing strategies from the Next Best Action Setup page, under Process Automation in Setup.

The team knows that free Mochi credits close deals. Since we only have a single recommendation at this time, the current recommendation strategy is very simple: reps can offer free Mochi credits every 90 days. Everyone loves Mochi credits!

Strategy Builder page, with Special Offer limited to only 1 offer every 90 days.

Once the Strategy is saved, I can add the Next Best Action to the opportunity from the Lightning page, using the Einstein Next Best Action component.

Adding Einstein Next Best Action to an opportunity Lighting page layout by dragging the component onto the page and selecting the Action Strategy.

Once I’ve saved the Lightning page, the option for a sales rep to offer Mochi Trial Credits can be seen right from the opportunity page.

Next Best Action to give free Account Credits on an opportunity.

And that’s how I solved it!

Brandon’s business results

The key outcome of this approach has been future-proofing Mochi, Inc.’s Salesforce environment. By enabling key Salesforce AI features and ensuring the team fully leverages the core capabilities of the platform, they are positioned at the forefront of Salesforce’s AI innovation.

Rather than just solving present challenges, we've taken an initial step toward their AI-driven future. The Mochi, Inc. team now has the tools to continue scaling and evolving their customer relationships, all within the robust framework of Salesforce's Einstein Platform.

As new AI features and capabilities emerge, the team will be ready to seamlessly integrate these into their workflow, ensuring they remain competitive in an ever-changing marketplace.

Solution 2: How Karri Webster solved it using Prompt Builder

How I designed the solution

When designing a solution for Mochi, Inc., I:

  1. Refined the requirements.
  2. Thought through all the possible ideas.
  3. Played matchmaker.

I used the Gherkin Method to help organize the requirements. The Gherkin Method is a simple “Given, When, Then” statement.

Given I’m a sales team member,
When an opportunity is neglected,
Then... that’s where my checklist comes into play for all the things that need to happen.

Once I refined my requirements, I thought through all the different ideas. I first thought about what’s already available in Salesforce, whether natively or something I had built previously that just needed some enhancements. I also considered how users currently use the application so that my solution can match their current preferences and user experience. Finally, I thought about some of the new, shiny things that Salesforce has released. Selfishly, I wanted an opportunity to practice with a new feature!

How I solved it

I created a “Follow-Up” button from the utility bar that allows the sales team to send personalized emails with product recommendations. It also logs the email so that I can see the communication thread over the lifecycle of the opportunity.

When thinking through how I wanted to design this solution, my biggest piece I was trying to solve was the personalized product recommendations. I knew just enough about Prompt Builder to know that it was a viable option to look at. From there, I got to work and started building.

Step 1: Enable and assign permissions

My solution involved using prompt templates and Prompt Builder, which both require Einstein to be enabled. If you have an org with Einstein licenses, you can enable Einstein by taking the following steps.

  1. Click the gear icon and select Setup. The Setup page opens in a new tab.
  2. In the Quick Find box, enter einstein setup, then click Einstein Setup.
  3. Turn on Einstein by clicking the toggle. It may already be on if you’ve completed the Quick Start: Einstein Copilot Project.

Step 2: Understand the data model

Before I get into the nitty-gritty of how I solved it, I need to briefly go over the data model. (Thanks to GenAI for these object descriptions.)

  • Account: Represents a company or organization; can also represent a person
  • Contact: Individuals associated with an account
  • Opportunity: Sales or deals in progress, linked to account and optionally, contact
  • Opportunity Contact Role: Defines the role a contact has in an opportunity
  • Opportunity Product: Products or services associated with an opportunity
  • Price Book: List of products and their pricing
  • Price Book Entry: Specific entries in a price book, linked to opportunity products
  • Activity: Tasks and events to track meetings, calls, follow-ups, and other sales-related activities

Additionally, in my solution, I’m assuming that a “Primary Contact Role” must be associated with an opportunity.

With this data model, sales users can associate opportunity products with opportunities. This will allow GenAI to examine details from the relationships and determine recommendations. Worth noting: The more information available in the records, the better. For example, I made sure to include product descriptions on price book records.

Step 3: Create a template-triggered prompt flow to ground the prompt template with data

Part of my solution involved sending a personalized email with product recommendations. To do this, I needed a prompt template. While Prompt Builder allows me to pull in record data and related record data using merge fields into my prompt, I needed something heftier for the product recommendations. A great tool to do this is Flow!

This is where a template-triggered prompt flow comes in. This new flow type is invoked from a prompt template. The Add Prompt Instructions action is the key to sending data to the associated prompt template.

This flow provides input from the Opportunity object, invoked from the prompt template. It retrieves the associated products so that it can later be used to make recommendations inside of a prompt. Note: If no opportunity products are associated with an opportunity, this flow has logic to include information about a portal where Mochi, Inc. has a full list of Products/Services, in place of the product recommendations.

Template-triggered prompt flow.

1. Setting up the Start element

Since the object triggering this flow is known, I selected Automatic Inputs for my Input Type. For the Prompt Template Type, I selected Field Generation Template Capability.

Details of the Start element for the template-triggered prompt flow.

2. Get opportunity products

To get the opportunity products (otherwise known as OpportunityLineItems), I queried all OpportunityLineItems and filtered them out to make sure the Opportunity ID matched the Related Entity ID. I stored all records that matched the criteria and made sure to include both names and descriptions from the opportunity products records.

Note: If you’re just starting out with flows, there’s no element called a “Query” element. Trailblazers use the Get element to make queries (asking the system to get some information with specific criteria) during the flow.

Details for Get Records to identify the neglected opportunities.

Continuation of Get Records for neglected opportunities; identifies the fields to store in the variable.

3. Does the opportunity have related opportunity products?

Next, I used a Decision element to see if the Get Products collection had any values in it. Based off the results, the flow could add the appropriate Prompt Instructions.

Decision element.

Add prompt instructions

4 & 5: Yes – Loop through and add to Prompt Instructions

In the case where there are opportunity products in the collection, we’ll loop through for each opportunity product and add its name and description information to the Prompt Instructions. This information will be key in creating the product recommendations.

Details of Loop Product Line Items element.

Prompt Instructions if there are records in the collection.

5. No – Add to Prompt Instructions

If there are no records in our collection of opportunity product records, this path will be taken. The Prompt Instructions are added for the scenario where no opportunity products were found that are related to the opportunity.

Prompt Instructions if there are no records in the collection.

Step 4: Create a prompt template to provide the product recommendations

As part of the process of re-engaging customers on neglected opportunities, the Mochi, Inc. sales rep would recommend products. Rather than have the sales reps come up with recommendations themselves, I’ll create these recommendations using AI!

To generate emails from a template, I created an Email prompt template using Prompt Builder. Inside of the prompt template, I included not only my own contact information using a merge field but also the information using the template-triggered prompt flow. The flow retrieves information about related opportunity products which helps determine the recommendations.

I included clear instructions for the prompt: to include emoji bullets that were aligned with the theme of the event (so fun!). If this is something you’re doing yourself, play around with different instructions to see what works best. Don’t forget to add your template-triggered prompt flow in there, too. If you don’t see your prompt flow as an option, make sure that you’ve saved/activated it.

My instructions:

You are a sales team member for Mochi, Inc. You had a discovery call scheduled, but the customer was unable to attend. In the meantime, you fell a bit behind and didn’t follow up as quickly as you normally would. Without making excuses, acknowledge the time since the last contact. Using sales best practices and a friendly tone, write an email to re-engage with them.

Strictly follow these instructions:

  • Start out with something fun and uplifting; don’t worry about using their name in the introduction.
  • Propose these products and include the descriptions as something to take a look at {!$Flow:TTPF_Retrieve_Products.Prompt}.
  • The signature should include your name, {!$Input:Sender.Name}, {!$Input:Sender.Phone}, {!$Input:Sender.Email}.
  • Include phone and email in signature.
  • Ensure the subject line is aligned with others that would have a high click rate.
  • Add an impelling call-to-action without sounding pushy.
  • Don't include the Opportunity name in the Product Recommendation; only include the Product Name with a fun description.
  • If the Consultation is included, add that as the first recommendation.
  • If you’re recommending product rentals, include the word "Rental" after the product.
  • Get the important stuff out first, then make sure the remaining items are in bullet points, super easy and quick to read. Make sure the bullets are fun emojis that go with the theme of the Recommendation and have tight line spacing.
  • If the recommendation is Mochi Cupcake, just put Chocolate Mochi Cakes or Vanilla Mochi Cakes.
  • Group the recommendations together in a way that makes sense.
  • Know that Mochi Cakes are not something you rent. They are cupcakes to serve at an event. Mochi is part of the company name; it has nothing to do with how the cupcakes taste or are flavored.
  • If using the word “Mochi”, make sure it’s recognized as a proper noun.

Step 5: Don’t forget to include a fault path subflow

The fault path subflow is a reusable resource that can be placed in any flow that requires user interaction that will be invoked if there’s an issue executing certain actions in your flow. It’s a small but mighty tool that can save a tremendous amount of time in development and troubleshooting.

Fault path flow.

In order for the fault path subflow to work properly, I created a Text variable called faultMessage that’s available for input and output. This is where the flow error will be passed into from the flow that has the error.

The faultMessage variable.

I used a Roll Back element to roll back any changes to records made during the flow.

Finally, I used a Screen element to display the error message.

Screen element with faultMessage.

Step 6: Define the “Neglected Opportunity”

In our case, we define a neglected opportunity as:

  • An opportunity with overdue tasks
  • Has a subject line, either Discovery Call OR Discovery Calls, and
  • The status is not equal to “On Hold” or “Completed”

Developing a solid understanding of the logic behind neglected opportunities was essential for successfully completing the final step of the process.

Step 7: Bring it all together with a screen flow—time to re-engage!

Re-engage Discovery Call screen flow.

The screen flow is quite lengthy, so I’ll highlight the key points. For a detailed step-by-step guide, click here. Note: I’ve provided users access to this screen flow through the utility bar. If you create a similar solution, you can place the flow wherever it best suits your users' needs.

In order to get the prompt to show up in my screen flow, I used a Prompt Instructions Action element. The Action includes the prompt that I created earlier.

Prompt Response Action element.

I needed to feed some resources to the prompt: Recipient, RelatedObject, and Sender. Each value was assigned in the previous Assignment element.

Remember the template-triggered prompt flow we created earlier? Once the screen flow makes it to the prompt, the template-triggered prompt flow gets to work and retrieves the product information and additional instructions to add inside the prompt. Call me crazy, but I think this is pretty awesome!

The prompt generated a response that includes an email subject and body. I then parsed those out using two formulas.

This formula extracts the subject line.

MID(
{!actionPromptResponse.promptResponse},
FIND('"subject":"', {!actionPromptResponse.promptResponse}) + LEN('"subject":"'),
FIND('","body"', {!actionPromptResponse.promptResponse}) - (FIND('"subject":"', {!actionPromptResponse.promptResponse}) + LEN('"subject":"'))
)

This formula extracts the body of the email and formats it in a way that will work inside the flow.

SUBSTITUTE(
SUBSTITUTE(
MID(
{!actionPromptResponse.promptResponse},
FIND('"body":"', {!actionPromptResponse.promptResponse}) + LEN('"body":"'),
FIND('"}', {!actionPromptResponse.promptResponse}, FIND('"body":"', {!actionPromptResponse.promptResponse})) - 
(FIND('"body":"', {!actionPromptResponse.promptResponse}) + LEN('"body":"'))
),
'\\r\\n',
BR()
),
'\\n',
BR()
)

*If you use these formulas, make sure you replace Prompt_Template_Email.promptResponse with the name of your prompt response.

Screen element where users can update the email subject and body.

I was able to use the two formulas in text components in a Screen element. This allowed the prompt response subject line {!emailSubjectFormula} and email body {!emailBodyFormatted} to be available for users to view and edit.

Finally, I created an acknowledgement statement that is required in order for a user to send an email. The Send Email button is conditionally visible based on the acknowledgement statement.

Once the user has selected the Send Email button, a Send Email action is invoked. The Subject and Body in the Send Email action come from the user’s input—not the formulas. This way, the edited version of the email subject and body are sent.

First of three images collectively sharing details of a Send Email Action Element.

Second of three images collectively sharing details of a Send Email Action Element.

Last of three images collectively sharing details of a Send Email Action Element.

This solution gives users the ability to dive into opportunities and the related products and generate personalized product recommendations. It also gives them the ability to add their own flair or update as they see fit.

Karri’s business results

With my solution in place, Mochi, Inc.'s sales team has a way to re-engage with neglected opportunities in a personalized way. They can view opportunities that need attention from the utility bar and act on them right away with personalized recommendations.

Check out this personalized email that my solution created.

Example of email generated from solution.

Do try this at home

Brandon’s tips

Encourage your users to work with List Views! The ability to work with lists in Salesforce is paramount for admins and power users alike. As an admin, being able to show your users how to manage their lists effectively is an excellent way to drive user adoption of the platform.

Get familiar with Sales Setup! There are incredibly powerful new features being released and updated regularly to help you get the most from the platform, before exploring third-party solutions or requiring complex integrations.

The Sales Cloud Go menu provides easy-to-follow cards designed to assist you with implementing new features and tracking your progress.

Using the Sales Setup page to stay current on everything Salesforce has to offer for sales success.

Karri’s tips

The secret to this solution lies in the Template Triggered Prompt Flow (Prompt Flows). Do you have a scenario where instructions need to adapt dynamically based on whether a record has specific relationships? Prompt Flows could be the solution you’re looking for! They enable you to include customized instructions in your prompts based on real-time data and dynamic outcomes. Trailblazers, the sky is truly the limit—I’m excited to see the innovative ways you’ll use this feature!

Resources

Want to see more good stuff? Subscribe to our channel!

SUBSCRIBE TODAY