Get Started with Prompt Builder
With Prompt Builder, simplify your users’ daily tasks by integrating generative AI, powered by prompt templates, into workflows. Create and Manage prompt templates that incorporate your CRM data from merge fields that reference record fields, flows, related lists, and Apex. Enable generative experiences on record pages or build Agentforce actions to generate summaries, descriptions, and other field values.
On this page you can learn how to call a prompt template programmatically, batch process large numbers of prompt templates, and move prompt templates between orgs using metadata API.
Examples and other resources:
- YouTube: Prompt Builder in Action
- Developer Blog: Invoke Prompt Templates from Flow, Apex, or the REST API
Integrate third-party web applications with prompt templates using Connect REST API.
- Connect REST API Developer Guide: Prompt Template Generations Resource
- Connect REST API Developer Guide: Prompt Template Generations Input (Request Body)
- Connect REST API Developer Guide: Prompt Template Generations (Response Body)
Use Connect in Apex to call a prompt template from Apex code.
- Apex Developer Guide: Resolve a Prompt Template
- Apex Reference Guide: EinsteinLLM Class
Use actions to call a prompt template from anywhere on the Salesforce Platform.
- Actions Developer Guide: Generate Prompt Response Invocable Action
Asynchronously generate large quantities of responses for prompt templates using Prompt Template Batch Processing in Flow or Apex.
- Apex Developer Guide: Prompt Template Batch Processing in Apex
- Salesforce Help: Flow Core Action: Prompt Template Actions
Use Metadata API to move prompt templates between sandbox and production orgs during the development process.
- Metadata API Developer Guide: GenAiPromptTemplate
- Metadata API Developer Guide: GenAiPromptTemplateActv
- Trailhead: Prompt Builder Basics
- Salesforce Help: Prompt Builder