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 Data Graphs to a Sales Email Prompt Template

          Add Data Graphs to a Sales Email Prompt Template

          Create and preview an example sales email prompt template that uses data graphs.

          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

          This topic walks through the steps to create and preview a sales email prompt template. It uses a data graph to generate an email that introduces the new account owner to the contact.

          1. To create a data graph, start by establishing a data stream using the Contact object. See Create a Salesforce CRM Data Stream.
          2. After the data stream is deployed, map the Contact object to an Individual DMO. See Map Data Model Objects.
          3. Create a data graph to work with your Sales Email template.
            1. From the App Launcher, search for and select Data Graphs.
            2. Click New, and click Start from Scratch.
            3. Choose a near real-time data graph or a real-time data graph.
            4. For Data Graph Name, enter Contact Overview.
            5. For the primary data model object, select Individual and select or enter a value for the remaining property fields.
            6. Click Next.
            7. Build a data graph that gets account information. See Create a Data Graph.
          4. When the data graph is active, let’s use an example prompt template that uses merge fields and your new data graph to incorporate account data into an introduction email. In Prompt Builder, create a prompt template.
            1. In the Prompt Template Type dropdown, select Sales Email.
            2. For the Prompt Template Name, enter Introduction Email.
            3. For the Recipient, select Contact.
            4. Click Next, and you’re redirected to the Prompt Template Workspace.
          5. In the Example Prompt Template Library, find the sales email prompt template “Draft an Introduction Email to the Account Contact.” Copy and paste this template into the Prompt Template Workspace.
          6. Save your work.
          7. Before you run this template in Prompt Builder, in the Prompt section, use the Resources field to replace the placeholders with real merge fields. Then, add a reference to the Contact Overview data graph that you created.
            1. In the Prompt section, delete the placeholder <Get_Detailed_Account_Data_DataGraph.
            2. Click the Resources search bar, select Account and select Data Graphs.
            3. To add the data graph to your template, select Contact Overview.
          8. Run the prompt template and see the LLM-generated email draft.
            1. Click the Preview Settings button.
            2. Under Inputs, search for and select a contact name in the Contact search bar.
            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. Review the response.
           
          Loading
          Salesforce Help | Article