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 with Data 360 Objects to a Sales Email Prompt Template

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

          Create and preview an example sales email prompt template that uses a flow with Data 360 objects.

          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.

          Your sales team wants to use Data 360 data to get information about each contact’s location. By using Data 360 data, you can use information that was consolidated across multiple data sources. This information can be more up to date than the contact record alone. To learn more about data consolidation, see Unify Source Profiles. This example uses the standard data bundles for the Salesforce CRM connector. Your Data 360 setup, objects, and fields can differ.

          You create an email prompt template that launches a prompt template flow to get Marketing events in the same city and state as your contact. You use a flow to get a list of events and their locations for the LLM. In Flow Builder, the flow looks like this.

          Flow builder view
          1. Turn on Einstein.
            1. From Setup, in the Quick Find box, enter Einstein Setup, and then click Einstein Setup.
            2. Turn on Einstein.
          2. Create the flow.
            1. From Setup, in the Quick Find box, enter Flows, and then click Flows.
            2. Click New Flow.
            3. From Flow Builder, select Template-Triggered Prompt Flow, and then click Create.
          3. Configure the flow.
            1. For Prompt Template Type Capability, select Sales Email Template Capability.
              A capability makes it possible to pass data between the flow and the prompt template. When you create a prompt template in Prompt Builder, you select its prompt template type.
            2. For Recipient, select Contact.
          4. Add a Get Records element. This Get Records element retrieves contact information.
            1. For Label, enter Get Contact Info.
            2. For Data Source, select Salesforce Object.
            3. For Object, select Contact.
            4. For Condition Requirements, select None—Get All Contact Records.
            5. For How Many Records to Store, click Only the first record.
          5. Add another Get Records element. This Get Records element finds the unified individual data from Data Cloud that matches the contact information.
            1. For Label, enter Get Unified Individual.
            2. For Data Source, select Data Cloud Object.
            3. For Data Space, select the data space you want to use, for example default.
            4. For Object, select your unified individual data model object (DMO), for example Unified Individual 0000.
            5. For Condition Requirements, select All Conditions Are Met (AND).
            6. For Field, select the field that represents the contact’s first name, for example ssot_FirstName__c.
            7. For Operator, select Equals.
            8. For Value, select {!Get_Contact_Info.FirstName}.
            9. Click Add Condition.
            10. For Field, select the field that represents the contact’s last name, for example ssot_LastName__c.
            11. For Operator, select Equals.
            12. For Value, select {!Get_Contact_Info.LastName}.
            13. Click Add Condition.
            14. For Field, select the field that represents the contact’s birth date, for example ssot_BirthDate__c.
            15. For Operator, select Equals.
            16. For Value, select {!Get_Contact_Info.Birthdate}.
            17. For How Many Records to Store, click Only the first record.
          6. Add a third Get Records element. This Get Records element retrieves the unified individual’s contact information.
            1. For Label, enter Get Unified Individual Contact Address.
            2. For Data Source, select Data Cloud Object.
            3. For Data Space, select the same data space as before.
            4. For Object, select your unified individual contact point address DMO, for example Unified Indv Contact Point Address 0000.
            5. For Condition Requirements, select All Conditions Are Met (AND).
            6. For Field, select ssot_Id__c.
            7. For Operator, select Equals.
            8. For Value, select {!Get_Unified_Individual.ssot__Id__c}.
            9. For How Many Records to Store, click Only the first record.
          7. Finally, add a fourth Get Records element to get event data.
            1. For Label, enter Get Events.
            2. For Object, select Event.
            3. For Condition Requirements, select All Conditions Are Met (AND).
            4. For Field, select IsArchived.
            5. For Operator, select Equals.
            6. For Value, select $GlobalConstant.False.
            7. Click Add Condition.
            8. For Field, select Location.
            9. For Operator, select Contains.
            10. For Value, select {!Get_Unified_Individual_Contact_Address.ssot__CityId__c}.
            11. Click Add Condition.
            12. For Field, select Location.
            13. For Operator, select Contains.
            14. For Value, select {!Get_Unified_Individual_Contact_Address.ssot__StateProvinceId__c}.
            15. For How Many Records to Store, click All Records.
          8. Add the Decision element.
            1. For Label, enter Any Events?
            2. On New Outcome, for Label, enter Yes.
            3. For Condition Requirements to Execute Outcome, select All Conditions Are Met (AND).
            4. For Resource, select Events from Get_Events.
            5. For Operator, select Is Null.
            6. For Value, select $GlobalConstant.False.
            7. Click Default Outcome.
            8. For Label, delete the text, and enter No.
          9. For the No outcome path, add the Create Prompt Instructions element.
            1. For Label, enter No Events.
            2. For Prompt Instructions, enter No upcoming Marketing events near you.
          10. For the Yes outcome path, add the Loop element.
            1. For Label, enter Add Events.
            2. For Collection Variable, select Events from Get Events.
          11. On the For Each path, add the Prompt Instructions element.
            1. For Label, enter Add Event Details to Prompt Template.
            2. For Prompt Instructions, enter: Event details: {!Add_Events.Subject}, {!Add_Events.Description}, {!Add_Events.Location}, Start Time: {!Add_Events.StartDateTime}.
          12. Click Save.
          13. For Flow Label, enter Marketing Events Summary.
          14. Save your changes, and click Activate.

          Now, you can insert the prompt template flow into the sales email prompt template “Draft an email for a contact about regional marketing events” from the Example Prompt Template Library. For a step-by-step guide to adding a prompt template flow to a sales email prompt template, see Add Flows Without Data 360 Objects to a Sales Email Prompt Template.

           
          Loading
          Salesforce Help | Article