---
schema_version: "1"
id: 28c51c984f051356a0d93f1a45dff93913cd90be344586b9bc6c6a8e19e4d627
title: Add Flow Merge Fields with Data 360 Objects to a Field Generation Prompt Template
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/prompt_builder_add_flows_with_data_cloud_field_gen.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_flows_with_data_cloud_field_gen.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: dd2912fcebb02c5452d5ac1f577a4daaaea6530f90a3551f38d68a1c166afc44
description: Build a flow that uses unified Data 360 object data to get a 360-degree view of an account, and then add a flow merge field to your prompt template.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Add Flow Merge Fields with Data 360 Objects to a Field Generation Prompt Template

Build a flow that uses unified Data 360 object data to get a 360-degree view of an account, and then add a flow merge field to your prompt template.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions with the Einstein for Platform, or Einstein or Agentforce for Sales or Service add-on, or Agentforce Foundations</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d210031e63">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d210031e63 ">To create and manage prompt templates in Prompt Builder:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d210031e63 ">
              <p>Prompt Template Manager permission set</p>
              <ul>
                <li>Manage Prompt Templates</li>

                <li>Execute Prompt Templates</li>

              </ul>
              <p>OR</p>
              <p style="margin-bottom:0;">Customize Application permission set</p>
            </td>

          </tr>
        </tbody>
      </table>

In this example, we create a flow that uses the standard Salesforce CRM Account object to look up data in the Account and Unified Account Data 360 objects. Unified objects consolidate data from multiple data sources. To learn more about data consolidation, see [Unify Source Profiles](https://help.salesforce.com/s/articleView?id=data.c360_a_identity_resolution.htm&type=5&language=en_US). This example uses the standard data bundles for the Salesforce CRM connector. Your Data 360 setup, objects, and fields can differ.

Before creating the field generation prompt template, create a prompt template flow that gets account data from Data 360. For this example, you create the Get Account Activity from Data Cloud prompt template flow. In Flow Builder, the flow looks like this.

![Flow builder view](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/prompt_builder_add_flows_with_data_cloud_field_gen.png)

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 **Field Generation 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 Object, select **Account**.
4. Add a Get Records element. This Get Records element retrieves the account information.
    1. For Label, enter Get Account Info.
    2. For Data Source, select **Salesforce Object**.
    3. For Object, select **Account**.
    4. For Condition Requirements, select **None—Get All Account Records**.
    5. For How Many Records to Store, click **Only the first record**.
5. Add another Get Records element and configure it. This Get Records element gets the Data Cloud account object that corresponds to the Salesforce CRM account object.
    1. For Label, enter Get Account from Data Cloud.
    2. For Data Source, select **Data Cloud Object**.
    3. For Data Space, select the data space that you want to use, for example, **default**.
    4. For Object, select your account data model object (DMO), for example, **Account**.
    5. For Condition Requirements, select **All Conditions Are Met (AND)**.
    6. For Field, select the field that represents the account ID, for example, **ssot\_Id\_\_c**.
    7. For Operator, select **Equals**.
    8. For Value, select **{!Get\_Account\_Info.Id}**.
    9. 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 account that’s linked to your Data Cloud account object.
    1. For Label, enter Get Unified Account.
    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 account DMO, for example, **Unified Account 0001**.
    5. For Condition Requirements, select **All Conditions Are Met (AND)**.
    6. For Field, select the field that represents the account name, for example, **ssot\_Name\_\_c**.
    7. For Operator, select **Equals**.
    8. For Value, select **{!Get\_Account\_from\_Data\_Cloud.ssot\_\_Name\_\_c}**.
    9. For How Many Records to Store, click **Only the first record**.
7. Add the Create Prompt Instructions element.
    1. For Label, enter Add Account Summary.
    2. For Prompt Instructions, enter: `Account details: Account Name is {!Get_Unified_Account.ssot__Name__c};Account Description is {!Get_Unified_Account.ssot__Description__c};Account Type is {!Get_Unified_Account.ssot__AccountTypeId__c};Account Last Modified Date is {!Get_Unified_Account.ssot__LastModifiedDate__c}.`
8. Save your work, and click **Activate**.

Now you can insert the prompt template flow into the field generation prompt template “Summarize open cases for an account” from the [Field Generation Example Templates](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_field_generation_example_templates.htm&release=264.0.0&type=5 "These example prompt templates cover typical use cases for field generation."). For a step-by-step guide about how to add a flow merge field to a field generation prompt template, see [Add Flows Without Data 360 Objects to a Field Generation Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_flow_without_data_cloud_field_gen.htm&release=264.0.0&type=5 "Create and preview an example field generation prompt template that uses a flow without Data Cloud objects.").