Field Generation Prompt Template in Salesforce Agentforce

As a support user, you have a query regarding any object record, and to resolve that query, you have to go through all the fields of that record to analyze it.

It would be better if there were a field that summarizes all the important information. By looking at that field, we can get a quick overview without reviewing all the account details.

To generate the summary of record, the Field Generation Prompt Template makes this task easier for you.

In this tutorial, we will learn about the field generation prompt template in Salesforce Agentforce.

Prompt Template in Salesforce Agentforce

A prompt template in Agentforce is like a pre-built message or instruction given to the AI agent in Agentforce. We can create this prompt template using the prompt builder in Salesforce.

Instead of writing the same message repeatedly, we can create a template once and use it many times. It helps us save time and stay consistent.

The prompt template builds a trusted generative AI that is bound to one or more objects to generate summaries or content.

To better understand, let me give you one example: The account object has multiple fields, and you need some important information about the account record. Now, it would be difficult to go through all the records, find related contacts, and open cases for that particular account.

Now, what if we had a summary field where we could get all this important information? It would save our time and efforts.

For that, we have a field generation prompt template in Salesforce Agentforce, which displays this information in the fields.

Field Generation Prompt Template in Salesforce Agentforce

A field generation template populates values in an object’s field. It can be used on a record page, which means it is bound to a specific field, such as the account summary field.

You can place your summary field on the record page and bind it to this field generation prompt template.

Then, whatever response comes from this template will be stored in that particular field. It can also be called via Einstein Copilot, action flow, REST API, and Apex.

Create Field Generation Prompt Template in Salesforce

In the following step, I will explain how to create a field generation prompt template in Salesforce Agentforce.

In the first step, to display an account’s summary, we need to create a custom field on the account object. So this field will store the content and summarize the different contacts this account has.

This will help the agent have a quick overview of the account by reviewing this field. For that reason, I have created a custom field called account summary, which is a type of long text area.

Field Generation Template in Agentforce

Now, let’s create the field generation prompt template:

  • Click on the Gear icon and select Setup.
  • In Quick Find, search for the Prompt Builder and click on it.
  • This screen is very similar to our Einstein Copilot action screen.
  • To create a new prompt, click the New Prompt Template button.