Skip to main content

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

ParametersTypeDescription
Account IDStringIdentifier of the related account.
AmountNumberMonetary amount associated with the record.
Close dateStringRequired. Expected or actual close date.
Contact IDStringIdentifier of the related contact.
DescriptionStringAdditional details or notes about the opportunity.
Lead sourceStringSource from which the lead or opportunity originated.
NameStringRequired. Name of the opportunity.
Next stepStringPlanned next action or step for this opportunity.
Pricebook2 IDStringIdentifier of the associated price book.
ProbabilityNumberProbability (usually as a percentage) of winning.
Stage nameStringRequired. Current stage of the opportunity.
TypeStringType 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:

    • Name set to "ABC Corp Enterprise License" (required).

    • Account ID set to "001xx000001234567".

    • Amount set to 150000.

    • Close date set to "2026-03-31" (required).

    • Stage name set to "Qualification" (required).

    • Probability set to 25.

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

Troubleshooting

FAQs