Loading
Agentforce and Einstein Generative AI
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Agentforce Platform | Summarize Record

          Agentforce Platform | Summarize Record

          Generates a summary of a record. The output depends on the record type and the prompt templates the user has access to.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise, Performance, Unlimited, and Developer Editions with Foundations, or Agentforce 1 or Einstein 1 Editions
          User Permissions Needed  
          See Common User Access for Standard Agent Actions.

          Action Details

          API Name SummarizeRecord
          Reference Action Type Standard Action
          Reference Action

          Summarize Record

          (summarizeRecord)

          Does this action execute one or more prompt templates? Yes

          Summarize Record and Prompt Templates

          This agent action calls the Summarize Record standard invocable action, which uses prompt templates of type Record Summary to generate record summaries. The specific prompt template executed varies based on the object type of the record to be summarized and the prompt templates the user has access to.

          The Summarize Record standard invocable action identifies active prompt templates of type Record Summary and filters out prompt templates that aren’t included in the user’s licenses and permissions.

          If a template matches the object type of the record to be summarized, the template is executed. Salesforce provides default templates for certain objects, such as accounts. These templates generate an enhanced, object-specific summary instead of a generic summary. If multiple matching templates exist, custom (database) templates are prioritized over Salesforce-provided (file-based) templates.

          If no matching templates are found, the Summarize Record standard invocable action dynamically identifies key record fields and related data and then generates a prompt that summarizes the record. This generic summary can be used to create record summaries for custom and standard objects. It uses standard and custom fields to generate the summary.

          Note
          Note Sales Summaries and Sales Email are included in the Single Record Summary and General CRM subagents, respectively. Summaries of accounts, contacts, leads, and opportunities are available with the Agentforce Employee Agent through the Summarize Record action, with the Sales Summaries User permission set.

          Considerations

          • Only records that are searchable and User Interface API-enabled can be summarized. Data Cloud and other data sources aren’t supported.
          • Users can summarize one record, not multiple records.
          • Users can’t filter summaries based on specific criteria. For example, users can’t summarize only the activities for an opportunity or only the case history for an account.
          • Users can’t refine a previously generated summary.
          • The summary doesn’t include news related to the account or company.
          • You can clone the Salesforce-provided prompt templates in Prompt Builder and customize the default templates so they’re tailored to your organization’s needs.

          Best Practices for Structuring Prompts in Summarize Record Actions

          Prompts set expectations for how a large language model (LLM) summarizes data in a record. Review best practices for structuring Summarize Record prompts to guide the model with the right context, format, and tone so that your summaries are clear, consistent, and useful across summarization, analysis, classification, or insight generation use cases.

          • Define the model's role with a clear persona: Start your prompt by assigning the model a relevant role or perspective (for example, “You are a Salesforce CRM analyst”). This helps the model understand the context and respond accordingly.
          • Separate instructions from data: Structure the prompt into two distinct sections, one for instructions and one for the record data. Use clear tags like ### Instructions and ### Data to avoid confusion and help the model focus on the right parts.
          • Be specific about what the model should focus on: Clearly indicate the fields, themes, or patterns you want the model to identify such as deal value, stage, key stakeholders, blockers, or next steps. Vague prompts can lead to incomplete or overly generic responses.
          • Include formatting and tone guidance: Mention how the output should be structured—as bullet points, numbered lists, or in a specific tone. Consistent formatting helps maintain readability across outputs.
          • Add a sample output: If possible, include a short example summary in the prompt to demonstrate the desired tone, structure, and level of detail. This helps guide the model's response more effectively.
          • Keep it concise: Avoid long or overly complex prompts. Large prompts and responses may hit token limits, which can cause incomplete outputs or latency. Focus on clarity and brevity.

          The following example shows how to apply the best practices in a complete, well-structured prompt for the Summarize Record action.

          Let’s assume you’re an experienced Salesforce CRM analyst who specializes in analyzing sales opportunities and creating concise summaries.

          Example
          Example
          -----instructions-----
          Please analyze this Salesforce opportunity record and create a summary focusing on key deal details.
          
          Focus on:
          - Amount
          - Stage
          - Account Name
          - Close Date
          - Next Step
          - Key Stakeholders
          
          Format the output as follows:
          - Start with a one-line executive summary
          - Use bullet points for deal details
          - Bold the deal value and stage
          - Include a 'Next Steps' section at the bottom
          
          Example output:
          ACME Corp Deal – $500K opportunity in Negotiation stage, led by John Smith.
          - Deal Value: $500,000
          - Current Stage: **Negotiation**
          - Key Contact: John Smith (Decision Maker)
          Next Steps: Contract review scheduled for 5/15
          
          Keep the full summary to 3–4 sentences total.
          
          -----data-----
          {
              "accountName": "ACME Corp",
              "opportunityName": "Q3 Expansion Opportunity",
              "amount": 500000,
              "stage": "Negotiation/Review",
              "closeDate": "2024-05-15",
              "nextStep": "Contract Review",
              "keyStakeholders": [
                {
                  "name": "John Smith",
                  "role": "Decision Maker"
                },
                {
                  "name": "Priya Das",
                  "role": "Legal"
                }
              ]
            }
          
           
          Loading
          Salesforce Help | Article