# Prompt template types: field generation and flex

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

What each prompt template type is bound to, with the considerations the exam tests for field generation (one object, one writable text field, a reviewed Einstein draft on a Dynamic Forms record page) and flex (up to five inputs you define, any caller), and how to pick the type from a requirement.

- 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.
- Recognise when two requirements need two templates because the type is fixed and bound to its entry point.
- Key terms: **template type** (the kind of template chosen at creation, which fixes its inputs and entry point); **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 objects | Supports only one object; use flex for several | [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) |
| 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) |
| Field generation at run time | User reviews the draft, clicks Use, edits and saves | [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 in a flow | A flow can fill a field with it automatically, with no human review | [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 does a requirement with several separately defined object inputs call for flex rather than field generation?
- When does generated text reach a field without anyone reviewing it?
- How many inputs can a flex template define?
- Which field types can a field generation template populate?

## 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_intro.htm&language=en_US&type=5)
- [Build a Field Generation Prompt Template](https://trailhead.salesforce.com/content/learn/modules/prompt-builder-basics/build-a-field-generation-prompt-template)
- [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)
- [Give Users Access to a Prompt Template](https://help.salesforce.com/s/articleView?language=en_US&id=ai.prompt_builder_give_users_access.htm&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)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 8 linked practice questions, and unlimited timed mock exams are included with the Agentforce Specialist pack (USD $19): https://www.certifyforce.com/practice-exams
