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
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.
- To create a data graph, start by establishing a data stream using the Contact object. See Create a Salesforce CRM Data Stream.
- After the data stream is deployed, map the Contact object to an Individual DMO. See Map Data Model Objects.
-
Create a data graph to work with your Sales Email template.
- From the App Launcher, search for and select Data Graphs.
- Click New, and click Start from Scratch.
- Choose a near real-time data graph or a real-time data graph.
- For Data Graph Name, enter Contact Overview.
- For the primary data model object, select Individual and select or enter a value for the remaining property fields.
- Click Next.
- Build a data graph that gets account information. See Create a Data Graph.
-
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.
- In the Prompt Template Type dropdown, select Sales Email.
- For the Prompt Template Name, enter Introduction Email.
- For the Recipient, select Contact.
- Click Next, and you’re redirected to the Prompt Template Workspace.
- 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.
- Save your work.
-
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.
- In the Prompt section, delete the placeholder <Get_Detailed_Account_Data_DataGraph.
- Click the Resources search bar, select Account and select Data Graphs.
- To add the data graph to your template, select Contact Overview.
-
Run the prompt template and see the LLM-generated email draft.
- Click the Preview Settings button.
- Under Inputs, search for and select a contact name in the Contact search bar.
- 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.
- Click Save & Preview. Review the response.
Did this article solve your issue?
Let us know so we can improve!

