---
schema_version: "1"
id: 81114179b55ba38d1964285fa5d9b01a7c386ce2b2cb510c40cf141de804d3d0
title: Add Free Text Inputs to a Flex 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_free_text_input_flex.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_free_text_input_flex.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 3edb45d19ac33605dd7d77e3124ad0200fd2d8baba77ca799a12eff1333662cf
description: Create a flex prompt template that includes free text inputs.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Add Free Text Inputs to a Flex Prompt Template

Create a flex prompt template that includes free text inputs.

### 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="d144425e63">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d144425e63 ">To create and manage prompt templates in Prompt Builder:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d144425e63 ">
              <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>

Free text inputs are a non-record type of input field consisting solely of text. You can include free text input fields in your flex prompt templates in the same way that you include merge fields or other resources from the resource picker. This functionality allows you to handle scenarios where you want your prompt template to receive free text as an input. For example, customers submitting questions in a form field, reading a file and sending the contents to the prompt, or handling any situation where you want to send arbitrary text to a flex prompt template in Prompt Builder.

Imagine you’re a prompt admin and you want to design a prompt that answers a customer’s question about a specific product on your website. A flex prompt template that handles free text input is an elegant solution for this common situation elegantly. You can even use the opportunity to remind your customer about a current promotion you’re running.

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

Note User input functionality is available only in flex templates and supports up to 127,000 characters.

To get started, create a prompt template.

1. In the Prompt Template Type dropdown, select **Flex**.
2. For the Prompt Template Name, enter Product Question Response and Promotion.
3. In the Define Sources section, define three sources.
    1. For the first row, enter Product in the Name field. Select **Object** as the Source Type. For the Object field, select Product. This row represents the product your customer is asking about.
    2. For the second row, enter User Question in the Name field. Select **Free Text** as the Source Type. This row represents the text input your customer provides, in the form of a question.
    3. For the third row, enter Promotion in the Name field. Select **Object** as the Source Type. For the Object field, select Product Service Campaign. This row represents the promotion you'll tell your customer about.
4. Click **Next**.
    
    You’re redirected to the Prompt Template Workspace.
5. Write a prompt template from scratch, or copy and paste an example template.
    1. If you want to base your prompt template on the template used in this example, copy and paste the example template text provided at the bottom of the page, and then edit it.
    2. Before you can run the template in Prompt Builder, in the Prompt section, click **Insert Resource** to use the search bar to replace the placeholders with real merge fields. The search field appears the first time you click this option.
    3. When the template is resolved into a prompt, the merge fields are replaced with real data and shown in the Resolved Prompt section.
6. In the Preview Settings panel, select a product for the Product field, enter a sample question in the User Question field, and select a promotion for the Promotion field.
7. Click **Save & Preview** to see the LLM-generated response.

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

Example

Text from example:

```

    A customer on our site is asking the following question about {!$Input:Product.Name}. Do your best to answer the customer's question.
    '''
    {!$Input:User_Question}
    '''
    In addition to answering their question, be sure to mention {!$Input:Promotion.ProductServiceCampaignName} to the customer.
   
```