Assign Record Summary Prompt Template to AI Agent in Salesforce Agentforce

In Salesforce Agentforce, a default Record Summary Prompt Template is already available, which helps the AI Agent summarize record information, such as account details, case information, or Opportunity data.

However, sometimes you may want to add custom functionality, for example, displaying only key details such as Account Priority, Last Interaction Date, and Open Opportunities.
To do this, you can create your own custom Record Summary Prompt Template.

But since a Record Summary Prompt Template can only be used by an AI Agent, you must assign your custom template to the Agent.

In this article, we will learn how to assign the Record Summary Prompt Template to the AI Agent in Salesforce Agentforce.

Record Summary Prompt Template in Salesforce Agentforce

In the Field Generation Prompt Template, we saw that it automatically generates information and fills it into a Long Text Area field in Salesforce.

This can happen either when a user clicks the Generate button on the record page or automatically when the field generation prompt template is invoked through a Flow.

This feature helps users save time by allowing the AI agent to create or update detailed field content, such as summaries, descriptions, or case notes, based on the record data.

The Sales Email Prompt Template generates email content based on the details we provide, such as customer information or deal stage.

Both the field generation and sales email prompt templates can be invoked directly from a field or a button on the record page.

However, the record summary prompt template works differently. It can only be invoked through an agent action in Salesforce Agentforce.

This means the AI agent uses this template when performing actions such as summarizing a record, not directly from a field or button.

Assign Record Summary Prompt Template to AI Agent in Salesforce Agentforce

In the steps below, I will explain how to assign the custom Record Summary Prompt Template you created to AI Agents, allowing the Agents to use your template to summarize record information according to your defined instructions.

Create a Custom Action For Using Prompt Template in Agentforce

Go to Setup. In the Quick Find, search for Agentforce Assets. Click on New Agent Action.

Create Record Summary Prompt Template Action in Salesforce Agentforce

Fill in the details below:

  • Referenced Action Type: Previously, we selected Apex; now, as we are creating actions using prompt templates, we need to choose a prompt template.
  • Referenced Action: Here, select the label you provided in the record summary prompt template that we created.
  • Then, the Agent Action Label and API Name will automatically populate.

Then click the Next button to proceed.

Assign Record Summary Prompt Template to AI Agent in Salesforce Agentforce

Here, we need to provide instructions to the agent. In Agent Action Instruction, I have provided instructions to the agent so that whenever the agent gets such a prompt, it will be easy for the agent to understand that this action will solve the exact same requirement.

The Loading Text will display while the agent is generating the response.

Agent Action Configuration in Salesforce Agentfforce

Again, we have an input field and an output field. Here, too, we must provide the instructions. Then click the Finish button.

Add Input Output Instructions for AI Agent in Salesforce Agentforce

In this way, we can create an action using a prompt template in Salesforce Agentforce.

Assign Action to AI Agent in Salesforce Agentforce

Now, let’s assign the created custom action to an agent. For that, navigate to the Setup -> In Quick Find, search for the Agentforce Agents -> Select the Agent for which you want to assign a custom action.

Here, I have selected ‘Order Agent,’ which is an Agentforce Employee Agent. -> Then click on the Open in Builder button to add an action.

Agentforce Agents in Salesforce

After that, select the Topic to which you want to add the custom action. If you want to create a New Topic for your action, you can create it. However, to create a new topic, you first need to deactivate the agent, and then you can make changes to your agent.

Create New Topic in Salesforce Agentforce

Here, I will add the record summary prompt template action that we created to the Summarize Account Details topic.

Then, in the instruction, you need to provide the agent with the necessary information so that they can follow the rules to generate the response.

Add Topic's Instruction in Salesforce Agentforce

Then click This Topic’s Actions tab, click the New button, and select the Add from Asset Library option to choose the action that we created.

Add Record Summary Prompt Template to AI agent in Salesforce

Then, select the action you want to assign to this agent. You can also select multiple actions, including both standard and custom options. Then click the Finish button.

Here, we have created an Account Record Summary action, which was generated from the Record Summary Prompt template in Salesforce Agentforce.

Assign Custom Prompt Template Action to AI Agents in Salesforce

You can see that the action has been assigned to our agent, which means that his agent should now summarize the account record info when any Salesforce user raises a request.

Record Summary Prompt Template Agent Response in Salesforce

In this way, we can assign a record summary prompt template to an AI agent in Salesforce Agentforce.

Conclusion

I hope you have got an idea about how to assign the Record Summary Prompt Template to the AI Agent in Salesforce Agentforce. In this article, I have explained the Record Summary Prompt Template, creating a Custom Action for using the Prompt Template in Agentforce, and assigning an Action to an AI Agent in Salesforce Agentforce.

You may like to read:

Salesforce AgentForce Live Webinar

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.