Update Salesforce opportunity
This tool allows Glean agents to update specific fields on any Salesforce Opportunity that the user has access to. It integrates with your organization’s unique Salesforce schema, supporting both standard and custom fields.
Limitations
- As with other Salesforce actions, the exact parameter set and behavior can change over time. Confirm behavior in your own environment and review the action schema in the agent builder before relying on this action for large-scale or fully automated opportunity updates.
- You can add this action to auto mode agents.
- Each update in a batch requires separate user confirmation. There is no bulk confirm option.
- Users must specify text instructions in the step if new information must be appended to existing data rather than replacing it.
- Only fields the user has view and edit permissions for in Salesforce are visible and updatable.
Prerequisites
-
Your Salesforce org must be connected as a connector in Glean.
-
An admin must enable the Salesforce tools and complete Salesforce tools setup including OAuth configuration.
-
Users must authenticate for Salesforce actions on first use and have permission to update Opportunity records.
Supported parameters
The only required parameter is the Opportunity ID. Beyond that, this action accepts any Opportunity field that is marked as updatable in the metadata of your Salesforce org, including custom fields. The available fields are retrieved dynamically from Salesforce at runtime, so the exact set depends on the schema of your organization and the field-level permissions of the user.
At least one field besides Opportunity ID must be provided for the update.
Common standard fields include:
| Parameter | Type | Description |
|---|---|---|
| Opportunity ID | String | Required. Salesforce ID of the opportunity record to update. |
| Name | String | Name of the opportunity. |
| Stage name | String | Current stage of the opportunity (for example, Prospecting, Negotiation, Closed Won). |
| Close date | Date | Expected or actual close date for the opportunity. |
| Amount | Number | Monetary amount associated with the opportunity. |
| Forecast category | String | Forecast category (for example, Pipeline, Best Case, Commit). |
| Next step | String | Planned next action or step for this opportunity. |
| Description | String | Additional details or notes about the opportunity. |
| Probability | Number | Probability (as a percentage) of winning the opportunity. |
| Lead source | String | Source from which the opportunity originated. |
To see the full list of updatable fields for your org, open the agent builder and use the dropdown to select fields from the Salesforce schema of your org.
Set up in Agent Builder
- In Agent Builder, select the Salesforce update tool by navigating to Select Step → Tools → By connector → Salesforce → Update Salesforce Opportunity.
- Configure which Opportunity fields to update by selecting fields from your organization's Salesforce schema using the dropdown.
- For each field, decide if the value will be filled by AI, chosen from a set, set as a fixed value, or provided by the user at runtime.
- Add instructions to guide how particular fields should be filled out.
- Save and deploy the agent.
Usage example
You need to update an existing opportunity after a customer call, moving it to the next pipeline stage and adjusting the expected close date.
Instruction to an agent:
"Find the Acme Corp Enterprise License opportunity in Salesforce and update the stage to Negotiation, move the close date to June 30, 2026, and set the next step to Send revised proposal."
Resulting behavior:
-
Calls Search Salesforce with SOQL to find the Opportunity named "Acme Corp Enterprise License".
-
Retrieves the Opportunity ID (for example,
006xx000001234567). -
Displays the current values for the selected fields alongside the proposed updates for review.
-
After user confirmation, calls Update opportunity with:
-
Opportunity IDset to006xx000001234567(required). -
Stage nameset to "Negotiation". -
Close dateset to "2026-06-30". -
Next stepset to "Send revised proposal".
-
-
All other fields (Amount, Probability, Lead Source, and others) remain unchanged.
-
Confirms the opportunity was updated successfully and provides a direct link to the updated record in Salesforce.
Workflow tip: Always search for the opportunity first to get the Opportunity ID before updating. Combine this action with Search opportunities or Search Salesforce with SOQL to identify the correct record, and use Get opportunity to verify current field values before making changes.
Troubleshooting
FAQs
See also
- Update Salesforce opportunities in Glean — end-user guide for updating opportunities using natural language.
- Salesforce tools setup — admin guide for enabling the Salesforce tools and configuring authentication.
- Create opportunity — tool reference for creating new opportunities.
- Search opportunities — tool reference for finding opportunities by name, account, stage, or other criteria.