# Prompt template types: field generation and flex

*Agentforce Specialist Study Guide · Prompt Engineering · Last updated November 6, 2026 · https://www.certifyforce.com/study-guide/agentforce-specialist/prompt-engineering/prompt-template-types-field-generation-and-flex*

Choose template types by their intended inputs and user experience: field generation for a reviewed writable-field draft, flex for defined object or free-text inputs without a predefined entry point. Distinguish custom-resource visibility from preview record limitations.

- Certification: Salesforce Agentforce Specialist
- Exam section: Prompt Engineering
- Study guide: https://www.certifyforce.com/study-guide/agentforce-specialist

**Official exam objective:**

> Identify the considerations for using a prompt template type such as field generation and flex types.

## What the exam expects

- Pick a prompt template type (sales email, field generation, record summary or flex) from the requirement's output, inputs and entry point.
- State the field generation considerations: one object and one writable text field chosen at creation, an Einstein button on a Dynamic Forms record page set up in Lightning App Builder, and a draft the user reviews before saving.
- State the flex considerations: no predefined entry point, up to five inputs you define (objects or free text), and invocation from Flow, Apex, the REST API or an agent.
- Match each requirement to its intended template experience without treating the usual surface as the only possible programmatic caller.
- Key terms: **template type** (the kind of template chosen at creation, defining its intended inputs and experience); **field generation** (fills one record field from a button on the record page); **flex** (general-purpose type with inputs you define); **input/resource** (a record or free-text value the template receives); **Dynamic Forms** (record pages built from individual field components).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Field generation input | One defined object input; related records may supply grounding; use flex for separate object inputs | [Field Generation Merge Fields](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_merge_fields_field_gen.htm&language=en_US&type=5); [Grounding flow](https://trailhead.salesforce.com/content/learn/modules/prompt-builder-basics/build-a-field-generation-prompt-template) |
| Field generation targets | Writable text, text area, text area (long), text area (rich); not read-only fields | [Add a Field Generation Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_field_gen_to_lightning_record_page.htm&language=en_US&type=5) |
| Field generation placement | Lightning App Builder, Dynamic Forms field, Einstein Generative AI section of field properties | [Add a Field Generation Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_field_gen_to_lightning_record_page.htm&language=en_US&type=5) |
| Native field workflow | Review or optionally revise in Einstein; Use adds to field; edit if needed, then Save | [Field Generation in Action](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_templates_in_action_field_gen.htm&language=en_US&type=5) |
| Knowledge rich text areas | Field generation unsupported on __kav rich text areas; use flex, Flow or Apex | [Prompt Builder Limitations](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_limitations.htm&language=en_US&type=5) |
| Flex inputs | Maximum 5 | [Prompt Builder Limits](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_limits.htm&language=en_US&type=5) |
| Flex input setup | Each input has a unique Name and API Name; can be marked required | [Create a Flex Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_create_flex_prompt_template.htm&language=en_US&type=5) |
| Free-text input | Flex only, up to 127,000 characters | [Add Free Text Inputs](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_free_text_input_flex.htm&language=en_US&type=5) |
| Flex callers | Apex, Flow, REST API or Agentforce; no predefined entry point | [Create a Flex Prompt Template with Einstein AI](https://trailhead.salesforce.com/content/learn/projects/quick-start-create-prompt-builder-flex-template/build-a-flex-prompt-template) |
| Flex invocation | Custom UI or REST API with an invocable action; enablement depends on the use case | [Flex Prompt Templates in Action](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_templates_in_action_flex.htm&language=en_US&type=5) |
| Record summary | Used by the Summarize Record standard invocable action and agent action | [Prompt Template Types](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_standard_template_types.htm&language=en_US&type=5) |

## Check yourself

- Why can a just-created custom field be absent even before you evaluate its template fit?
- When you need a newly created custom resource immediately, what is the documented action?
- Why can an existing object's records be unavailable in the preview selector when its Name is encrypted?

## Sources

- [Prompt Template Types](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_standard_template_types.htm&language=en_US&type=5)
- [Prompt Builder](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_about.htm&type=5)
- [Create a Field Generation Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_create_field_gen_prompt_template.htm&language=en_US&type=5)
- [Add Record Merge Fields to a Field Generation Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_merge_fields_field_gen.htm&language=en_US&type=5)
- [Add a Field Generation Prompt Template to a Lightning Record Page](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_field_gen_to_lightning_record_page.htm&language=en_US&type=5)
- [Field Generation Prompt Templates in Action](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_templates_in_action_field_gen.htm&language=en_US&type=5)
- [Create a Flex Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_create_flex_prompt_template.htm&language=en_US&type=5)
- [Create a Flex Prompt Template with Einstein AI](https://trailhead.salesforce.com/content/learn/projects/quick-start-create-prompt-builder-flex-template/build-a-flex-prompt-template)
- [Add Free Text Inputs to a Flex Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_add_free_text_input_flex.htm&language=en_US&type=5)
- [Flex Prompt Templates in Action](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_templates_in_action_flex.htm&language=en_US&type=5)
- [Prompt Builder Limits](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_limits.htm&language=en_US&type=5)
- [Prompt Builder Limitations](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_limitations.htm&language=en_US&type=5)
- [Maximizing Generative AI with Effective Prompts](https://trailhead.salesforce.com/content/learn/modules/prompt-builder-basics/get-to-know-prompt-builder)
- [Get to Know Prompt Builder](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_get_to_know.htm&language=en_US&type=5)
- [Prompt Builder Key Concepts](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_key_concepts.htm&language=en_US&type=5)
- [Add an Individual Retriever to a Prompt Template](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_retriever_individual.htm&language=en_US&type=5)
- [Integrate Prompt Templates with Salesforce Features](https://help.salesforce.com/s/articleView?id=ai.prompt_builder_integrate.htm&language=en_US&type=5)
- [Invoke Prompt Templates from Flow, Apex, or the REST API](https://developer.salesforce.com/blogs/2024/04/invoke-prompt-templates-from-flow-apex-or-the-rest-api)
- [Build a Field Generation Prompt Template](https://trailhead.salesforce.com/content/learn/modules/prompt-builder-basics/build-a-field-generation-prompt-template)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit and reading progress are included in the full study guide. The separate practice exams option includes the reviewed question bank and timed mock exams. The bundle includes both where available. See [current options and prices](https://www.certifyforce.com/pricing).
