Create opportunity
The Salesforce Create opportunity action creates new opportunity records in your connected Salesforce org. This write action creates new opportunities only and does not update or delete existing opportunities.
Limitations
- As with other Salesforce actions, the exact parameter set and behavior can change over time; confirm how this action behaves in your own environment before you depend on it for business-critical or large-scale opportunity creation.
Prerequisites
-
Your Salesforce org must be connected as a data source in Glean, and an admin must enable the Salesforce action pack and complete Salesforce Actions Setup including OAuth configuration.
-
Users must authenticate for Salesforce actions on first use and have permission to create Opportunity records.
Supported parameters
| Parameters | Type | Description |
|---|---|---|
| Account ID | String | Identifier of the related account. |
| Amount | Number | Monetary amount associated with the record. |
| Close date | String | Required. Expected or actual close date. |
| Contact ID | String | Identifier of the related contact. |
| Description | String | Additional details or notes about the opportunity. |
| Lead source | String | Source from which the lead or opportunity originated. |
| Name | String | Required. Name of the opportunity. |
| Next step | String | Planned next action or step for this opportunity. |
| Pricebook2 ID | String | Identifier of the associated price book. |
| Probability | Number | Probability (usually as a percentage) of winning. |
| Stage name | String | Required. Current stage of the opportunity. |
| Type | String | Type or category of the opportunity. |
Usage example
You need to create a new sales opportunity for a qualified prospect, linking it to their existing account and setting the initial stage and close date.
Instruction to an agent:
"Create a new opportunity in Salesforce for ABC Corp Enterprise License linked to the ABC Corp account with an amount of $150,000, close date March 31, 2026, stage Qualification, and probability 25%. Set the next step to Schedule product demo."
Resulting behavior:
-
Calls Search Salesforce with SOQL to find the Account for "ABC Corp".
-
Retrieves the Account ID (for example, "001xx000001234567").
-
Calls Create opportunity with:
-
Nameset to "ABC Corp Enterprise License" (required). -
Account IDset to "001xx000001234567". -
Amountset to 150000. -
Close dateset to "2026-03-31" (required). -
Stage nameset to "Qualification" (required). -
Probabilityset to 25. -
Next stepset to "Schedule product demo".
-
-
Creates a new Opportunity record in Salesforce linked to the ABC Corp account.
-
Returns the Opportunity ID (for example, "006xx000001234567").
-
Confirms the opportunity was created successfully.
Workflow tip: Always search for the Account first to get the Account ID before creating the opportunity. Three fields are required: Name, Close date, and Stage name. Combine this action with other Salesforce actions like Create lead, Create contact, Send email, or Update Salesforce Opportunity to build complete sales workflows.