Create Opportunity Invocable Action

Use this action to create an opportunity along with an associated quote and price list. For example, build agents that instantly create-opportunity-invocable-actiongenerate deals and quotes when a high-value lead is qualified.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Unlimited, and Developer Editions

Input Values

Parameter Description Data Type
accountId The account ID for the opportunity. String
opportunityName The name of the opportunity. String
opportunityCloseDate The close date for the opportunity. Date
opportunityStage The stage of the opportunity. String

priceList

The price list to be used for the opportunity. String

Output Values

Parameter Description Data Type
opportunityId The ID of the created opportunity. String
errorMessage A message explaining why the opportunity couldn’t be created. String

Example

JSON Request

{
  "inputs": [
    {
      "accountId": "001Ij000002Okp2IAC",
      "opportunityName": "Opportunity_1",
      "opportunityCloseDate": "2026-01-02",
      "opportunityStage": "Prospecting",
      "priceList": "a3HIj000000L0P3MAK"
    }
  ]
}

JSON Response Body

[
  {
    "actionName": "B2BCmexCreateOpportunityInvocableAction",
    "errors": null,
    "invocationId": null,
    "isSuccess": true,
    "outcome": null,
    "outputValues": {
      "opportunityId": "006Ij000002YpK4IAK",
      "error": null
    },
    "sortOrder": 0,
    "version": 1
  }
]