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.
  • By default, each update in a batch requires separate user confirmation, with no bulk confirm option. Eligible Agent executions configured to run without confirmation are an exception. See Background and scheduled execution.
  • 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.

Background and scheduled execution​

In Agent Builder, configuring this update to run without user confirmation requires admin permission, which is off by default. Turning on this permission makes the tool eligible for no-confirmation runs but does not create, schedule, or publish an Agent.

  1. In the Salesforce tool's setup in the Admin console, open the Agents settings and set Run without user confirmation to Yes for Update Salesforce Opportunity and save.
  2. In Agent Builder, configure the step that updates the opportunity and make sure Run this action without user confirmation is selected if the checkbox appears. Scheduled and background modes can manage this setting through their execution mode instead, so review the Agent's saved execution settings and selected tools before publishing.
  3. Configure the Agent's schedule or trigger separately, test the workflow, and publish it only after you have verified the intended records, fields, and values.

If your admin hasn't allowed the tool, the checkbox is disabled and shows the tooltip "Your admin does not allow this action to run without confirmation". To set Run without user confirmation back to No, first remove the tool from any Agents configured to run it without confirmation.

See Run tools without user confirmation for admin eligibility and Agent configuration.

Automated updates change Salesforce records

An Agent running without confirmation can write changes without a person reviewing each update, even when a scheduled or background mode hides the confirmation checkbox in the builder. Although Salesforce authentication, Opportunity permissions, field-level view and edit permissions, and validation rules still apply, keep the Agent's instructions and tool access limited to the intended workflow.

This opt-in applies to Agents without changing the default confirmation flow in Assistant or general chat. For Agent runs started by automation, confirmation also depends on whether Agent approval and notification features are turned on.

Usage example​

This example uses the default confirmation flow 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​