Loading
Upcoming Mandatory Changes to Public Key Infrastructure (PKI)Read More
Salesforce Enforces New Security Requirements in Summer 2026Read More
Agentforce and Einstein Generative AI
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Add Flow Merge Fields Without Data 360 Objects to a Sales Email Prompt Template

          Add Flow Merge Fields Without Data 360 Objects to a Sales Email Prompt Template

          Create and preview an example sales email prompt template that uses a flow.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise, Performance, and Unlimited Editions with the Einstein for Platform, or Einstein or Agentforce for Sales or Service add-on, or Agentforce Foundations
          User Permissions Needed
          To create and manage prompt templates in Prompt Builder:

          Prompt Template Manager permission set

          • Manage Prompt Templates
          • Execute Prompt Templates

          OR

          Customize Application permission set

          Say you’re a Salesforce admin and your sales team requests an easier way to send emails to contacts about nearby Marketing events.

          Create an email prompt template that launches a flow to get Marketing events in the same city and state as each contact. Use a flow to get a list of events and their locations for the LLM.

          1. To create the Get Marketing Events flow from Flow Builder, see Example of Sales Email Template-Triggered Prompt Flow.
          2. When the flow is ready, let’s use an example prompt template that uses merge fields and your new flow to generate an email about nearby Marketing events for a selected contact.
            In Prompt Builder, create a prompt template.
            1. In the Prompt Template Type dropdown, select Sales Email.
            2. For the Prompt Template Name, enter Nearby Events Marketing Email.
            3. For the Recipient Type, select Contact. Remember that to insert a flow into a prompt template, the flow’s Recipient Type has to be the same data type as the prompt template’s flow resource.
            4. Leave the Description blank.
            5. Click Next, and you’re redirected to the Prompt Template Workspace.
          3. In the Example Prompt Template Library, find the sales email prompt template “Draft an email for a contact about regional marketing events.” Copy and paste this template into the Prompt Template Workspace.
          4. Before you can run this template in Prompt Builder, use the Resource field in the Prompt section to replace the placeholders with real merge fields. Then, add a reference to the real Marketing Events Summary flow that you created.
            1. In the Prompt Template Workspace, delete the <Get_Events_Near_Contact__Prompt__Flow> placeholder.
            2. Click the Resource search bar and select Flows.
            3. To add this flow to your template, select Get Marketing Events.
          5. Run the prompt template and see the LLM-generated email draft.
            1. Click the Preview Settings button.
            2. Under Inputs, search for a contact name in the Recipient search bar and select it. This selection defines the recipient of the LLM-generated email draft.
            3. In the Configure Response and Display sections, verify that Generate Response, Display Prompt, and Display Resolution are selected or deselected based on what you want to test.
            4. Click Save & Preview, and review the response.
           
          Loading
          Salesforce Help | Article