You are here:
Add Data Sources to Enrich Field Update Suggestions in Agentforce Pipeline Management
Agentforce Pipeline Management can use notes, emails, or calls to inform the agent’s field update suggestions. You can customize and expand the data sources that your agent uses. For example, use other opportunity fields or different sources, such as content from other objects.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Performance, Unlimited, and Developer Editions with the Agentforce for Sales or Agentforce for an Industry add-on, or included in Agentforce 1 Sales or an Industry Edition. Requires each user to have the Agentforce for Sales or Agentforce for an Industry add-on to access the actions. |
| User Permissions Needed | |
|---|---|
| To edit prompt templates: | Prompt Template Manager Permission Set AND Manage Prompt Template AND Execute Prompt Template |
| To map prompt templates to Opportunity fields: | Edit access on the Opportunity object |
| To create, edit, and manage flows: | Manage Flow |
Add Opportunity Fields as Data Sources
To use other opportunity fields to inform the agent’s field update suggestions, edit the Field Generation prompt template instructions.
Before you begin, make sure that the agent has permission to access the opportunity field that you’re adding as a data source.
- From Setup, in the Quick Find box, enter and then select Prompt Builder.
-
Select the Field Generation prompt template that you want to use the opportunity field as
a data source for.
For example, to use data from a custom opportunity field when generating field update suggestions for Next Step, select the Recommend Next Step for Opportunity prompt template.If you’re using your own prompt template, copy over the instructions from the Recommend Next Step for Opportunity prompt template. Then, adjust the instructions to reference the fields and data sources that you want. Don’t change or remove instructions about the output. The output must be in the specified JSON structure to align with the user interface. Changing the structure or snippets can result in data showing incorrectly or not at all.
-
On the prompt template, find the instructions about data sources.
- Click Insert Resource.
- Select the opportunity field that you want to add.
- To make sure that you get the results you want, test your prompt template thoroughly. Then, when you’re ready, activate it.
Add Data Sources to the Get Opportunity Grounding Data Flow
Use data from other Salesforce objects or external objects to inform the agent’s opportunity field update suggestions.
Your data source must have an ID field that you can reference as a variable. Before you begin, confirm that the agent has permission to access the data source that you want to use.
- From Setup, in the Quick Find box, enter and select Flows.
- Select the Get Opportunity Grounding Data flow.
-
Above the Add Grounding Data to Prompt Instructions element, add a new Get Records element to retrieve information
from your data source.
For example, to use data from tasks, create an element called Get Tasks.
-
Assign variables to the fields that you want to use.
- Under How to Store Record Data, select Choose fields and assign variables (advanced).
- Under Where to Store Field Values, select In separate variables.
-
Store the record’s ID field in a variable.
For example, to use data from tasks, store the Activity ID field in a variable called LatestTaskId.
-
Store other relevant fields in variables.
For example, to use data from tasks, store the Description field in a variable called LatestTaskDescription and the Subject field in a variable called LatestTaskSubject.
- Go to the Add Grounding Data to Prompt Instructions element. Add instructions to retrieve the ID and the other fields that you’re using from the data source.
- Save and activate the flow.
-
Go to the prompt template that you’re using to generate field update suggestions.
For example, the Recommend Next Step for Opportunity prompt template or your own custom prompt template.
- Make sure that your prompt template has instructions to call the Get Opportunity Grounding Data flow as a data source.
- Add an instruction to extract the ID for your data source. For example, “You must strictly extract the latestTaskId for tasks.”
- To make sure that you get the results you want, test your prompt template thoroughly. Then, when you’re ready, activate it.

