Step-by-Step Guide to Calling Prompt Template from Flow

In today’s fast-paced business world, automation and artificial intelligence (AI) are no longer luxuries - they’re essential. Salesforce continues to empower organizations with cutting-edge tools like Agentforce, Prompt Templates, and Flows. These tools, when used together, unlock the true potential of Generative AI, enabling businesses to automate complex tasks seamlessly.

One powerful combination is calling a Prompt Template from a Flow. This allows you to infuse AI-driven insights directly into your business processes, enhancing efficiency and productivity.

Here’s how it works:

  1. Prompt Templates define specific AI tasks. For example, you can instruct the AI to analyze a contact’s job title and determine their management level.

  2. Flows serve as the engine that triggers and processes these AI instructions automatically, based on predefined events or conditions.

A Simple Analogy

Think of a Prompt Template as a “chef” who knows how to make specific dishes (e.g., determining management level). Flows are the “waitstaff” who deliver the ingredients (job title) to the chef and return the finished dish (management level). Together, they provide seamless service to your business!

Benefits of Calling Prompt Template from Flow

  • Saves Time: Automates repetitive tasks, reducing manual input and saving time for sales representatives.

  • Improves Accuracy: With AI at the helm, you can trust that outputs like “Management Level” are consistent and error-free.

  • Enhances Productivity: Teams can prioritize their work better when critical fields are populated instantly.

  • Scalable Across Use Cases: This functionality isn’t just for Sales. It can be applied in Support, Marketing, and HR processes too.

Business Use Case: Identify the Seniority of a Contact

Imagine your sales team needing to prioritize outreach based on a contact’s seniority. Manually analyzing job titles to determine a “Management Level” is time-consuming and prone to errors. With a Flow calling a Prompt Template, this process becomes seamless.

For example:

  1. A contact is added or updated in Salesforce.

  2. The Flow triggers the Prompt Template to analyze the job title.

  3. The AI analyzes the job title and determines 'Management Level' of the contact and returns it to the Flow.

  4. The Flow updates the value in the record.


This automation ensures that sales representatives can focus on high-priority contacts, improving the efficiency of their outreach and leading to more successful outcomes.

Step-by-Step Guide: Calling Prompt Template from Flow

In this guide, we will walk through how to call a prompt template from a record-triggered flow to automatically generate & populate values in a field on the record.

This process is simple and should take 15-20 minutes to configure and test. Here’s what the guide covers:

  1. Sign Up & Set Up Agentforce Trial Org

  2. Create a Custom Field on Contact object to store the 'Management Level' of the contact

  3. Create a Prompt Template to analyze job titles and determine management levels

  4. Build a Record-Triggered Flow that calls the Prompt Template

  5. Test the Flow and Prompt Template to ensure functionality


In the overall flow of Agentforce, the following diagram highlights the key components that we will cover in this guide.



Other Real-World Business Use Cases

The combination of Prompt Templates and Flows offers versatility across the business operations, and here are some other scenarios where this powerful duo can drive significant impact:

  • Customer Support Case Prioritization: Use AI to analyze case descriptions and automatically assign a priority level, helping agents focus on the most urgent issues.

  • Marketing Campaign Segmentation: Categorize leads or contacts into groups based on AI analysis of their roles or industries for tailored campaigns.

  • Recruitment Automation: Classify job applications by experience or skill levels to speed up candidate shortlisting.

  • Opportunity Qualification: Analyze opportunity descriptions to identify and flag high-value deals for focused attention.

Conclusion

Calling Prompt Template from Flow is more than a feature - it’s a transformative way to leverage AI and automation in Salesforce. By combining the intelligent decision-making of Generative AI with the power of Flows, you can streamline processes, enhance productivity, and ensure consistency across your organization.


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.


Liked something here? Share your feedback in the comments below 👇