Skip to main content

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:

ParameterTypeDescription
Opportunity IDStringRequired. Salesforce ID of the opportunity record to update.
NameStringName of the opportunity.
Stage nameStringCurrent stage of the opportunity (for example, Prospecting, Negotiation, Closed Won).
Close dateDateExpected or actual close date for the opportunity.
AmountNumberMonetary amount associated with the opportunity.
Forecast categoryStringForecast category (for example, Pipeline, Best Case, Commit).
Next stepStringPlanned next action or step for this opportunity.
DescriptionStringAdditional details or notes about the opportunity.
ProbabilityNumberProbability (as a percentage) of winning the opportunity.
Lead sourceStringSource 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

  1. In Agent Builder, select the Salesforce update tool by navigating to Select Step → Tools → By connector → Salesforce → Update Salesforce Opportunity.
  2. Configure which Opportunity fields to update by selecting fields from your organization's Salesforce schema using the dropdown.
  3. 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.
  4. Add instructions to guide how particular fields should be filled out.
  5. 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 ID set to 006xx000001234567 (required).

    • Stage name set to "Negotiation".

    • Close date set to "2026-06-30".

    • Next step set 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