---
schema_version: "1"
id: 2919f8d5c184d67025b0f378498507072b9214dac432d74aa53a5a9061eb1171
title: Add Prompt Instructions Element
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_ref_elements_add_prompt.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_add_prompt.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 6861fde5d8e128dd0fbf9bc5e122a4be9b7888f3cdc1c26cbecd70fd6ae1724b
description: Provide data in the form of prompt instructions that are merged into a prompt template in Prompt Builder. This element is available only in template-triggered prompt flows.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Add Prompt Instructions Element

Provide data in the form of prompt instructions that are merged into a prompt template in Prompt Builder. This element is available only in template-triggered prompt flows.

### 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;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">This feature requires the Einstein for Sales, Einstein for Service, or Einstein Platform add-on. To purchase, contact your Salesforce account executive.</td></tr></tbody></table>

Template-triggered prompt flows aren’t compatible with prompt templates created in Winter ’24.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:29.49852507374631%">
          <col style="width:70.50147492625369%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d195290e80">Field</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d195290e83">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Field" class="slds-cell-wrap" style="vertical-align:top;" headers="d195290e80 "><strong class="uicontrol">Prompt Instructions</strong></td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d195290e83 ">
              <p>The text and flow resources that the flow evaluates at run time. The text and
                resource values are stored in the $Output global variable.</p>
              <p style="margin-bottom:0;">In the flow, the first
                Add Prompt Instructions element adds text and flow resources to the $Output global
                variable. Each subsequent Add Prompt Instructions element appends text and flow
                resources to the $Output global variable.</p>
            </td>

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

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_example.png)

Example The first Add Prompt Instructions element adds the text Hello!. The next Add Prompt instructions element appends the {!contact} record variable resource. When the flow finishes, the $Output global variable contains the text, Hello! Mary, where Mary is the value that {!contact} references. The same text is merged into the associated prompt template in Prompt Builder.

## Handle Missing Data in Prompt Instructions

Consider logic or actions that return no data in prompt instructions. Consider these options:

- Incorporate an alternative or default value.
- Add instructions that don’t use the data.
- Clear the prompt instructions, so nothing is passed outside the flow.
- Include prompt instructions that address the missing data.

For example, your prompt instructions depend on accounts that meet filter criteria, but the flow finds no accounts. We recommend using logic to handle the missing data. The Decision element can check for data, and the Add Prompt Instructions element can send contextual instructions that no data is available.

## Get Record IDs

When you insert a resource that references the Get Records element in the Add Prompt Instructions element, the $Output global variable stores only the record IDs. For example, the Get Records element retrieves a collection of accounts. Its flow resource {!Get\_Accounts} is inserted into the Add Prompt Instructions. The $Output global variable stores only the account IDs.

#### See Also

- [Template-Triggered Prompt Flows](https://help.salesforce.com/s/articleView?id=platform.flow_concepts_trigger_prompt_template_capability.htm&release=264.0.0&type=5 "Provide data to prompt templates in Prompt Builder with template-triggered prompt flows.")