Step-by-Step Guide to Flex Prompt Template
“Flex” is one of the prompt templates available in Prompt Builder in Salesforce. The other three types are:
Field Generation: Generate values for record fields. For example, create a product description based on the product model.
Record Summary: Summarize record data for a comprehensive view of a record. For example, summarize feedback to gauge customer sentiment and identify key takeaways.
Sales Emails: Generate personalized customer emails based on customer data.
Use the Flex prompt template for any business purposes not covered by the other templates. Craft a Flex prompt template that utilizes AI to generate content for your unique business cases.
Business Use Case
Imagine a bustling sales team at a tech company, SIAA Tech, which specializes in providing cutting-edge Salesforce software solutions to businesses. The sales reps at SIAA Tech are always on the lookout for new leads and potential clients. However, one of the time-consuming tasks they face is gathering detailed information about each lead to understand their business, needs, and potential fit for SIAA’s solutions. This information is crucial for qualifying and prioritizing leads.
This process involves searching for the company website, reading through various pages, and compiling relevant information to create a comprehensive overview that includes:
Company Legal Name
Ownership Structure
Country of Origin & Headquarters location
Company's Industry
The product or services they provide
Number of employees
Annual Turnover
CEO Name
The most likely relationship of this company with Salesforce
Latest news about the company
Recognizing this challenge, the sales operations team wants to implement a more efficient solution.
In this guide, we will help SIAA Tech sales reps automatically generate the company’s overview using Agentforce with Custom Agent Action and Prompt Builder. What used to take 20-30 minutes to gather will now be available in just a few seconds. Productivity and efficiency at its best.
We will use the “Flex” prompt template to generate a detailed overview based on the website URL captured on the lead record. This will save sales reps a significant amount of time and help them qualify and prioritize leads more effectively.
And here is how the end result will look once we set this up.
Take a look at the following guide to see how easy it is to build a feature like this. It won’t take more than 15-20 minutes for you to configure and test this out. This guide covers how to:
Sign Up for Einstein Generative AI Trial Org
Create Flex Prompt Template
Create a Custom Agent Action
Assign Custom Action to Einstein Copilot Agent
Test Custom Action
In the overall flow of Agentforce, the following diagram highlights the key components that we will cover in this guide.
Other Use Cases for Flex Prompt Template
Generate a Follow-up Text Message for a Customer Case
Generate a Newsletter
Draft an Email from an Organization’s Opportunities
Please refer to the Flex Example Templates link below to get the sample prompt for these use cases.
Agentforce Advisory, Training & Implementation Services
If you’d like help going deeper with Agentforce beyond this guide, I offer the following:
Self-Paced Training – #Mastering Agentforce
A structured, hands-on course covering Agentforce concepts, Prompt Templates, Agents, Actions, and real-world implementation patterns.
Live Online & Onsite Agentforce Training
Instructor-led training for Salesforce teams, partners, and customer organizations, tailored to real use cases and practical scenarios.
Agentforce Advisory & Implementation Services
Strategic advisory and hands-on implementation support to help you design, build, and scale Agentforce solutions with confidence.
For training, advisory, or implementation discussions, please reach out via the Contact page, where you can submit a form or schedule a conversation.
References & Useful URLs
Salesforce help article - Create a Flex Prompt Template
Salesforce help article - Flex Example Templates
Found this useful? Say so! Drop your thoughts in the comments 👇