---
schema_version: "1"
id: 465e07c1c02828737cd4fbe16411a1462db62c72ab87fa5ba9a182ea7993109c
title: Create Opportunity Invocable Action
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_create_opportunity_invocable_action.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_create_opportunity_invocable_action.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 2846573ce52230304c21f9ee01b75c9bcd02976d80b3cdac4081db116f87177b
description: 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.
products:
  - Communications
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col style="width:100%"></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

## Input Values

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:33.33333333333333%">
          <col style="width:33.33333333333333%">
          <col style="width:33.33333333333333%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d103726e75">Parameter</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d103726e78">Description</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d103726e81">Data Type</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d103726e75 ">accountId</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d103726e78 ">The account ID for the opportunity.</td>

            <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d103726e81 ">String</td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d103726e75 ">opportunityName</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d103726e78 ">The name of the opportunity.</td>

            <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d103726e81 ">String</td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d103726e75 ">opportunityCloseDate</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d103726e78 ">The close date for the opportunity.</td>

            <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d103726e81 ">Date</td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d103726e75 ">opportunityStage</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d103726e78 ">The stage of the opportunity.</td>

            <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d103726e81 ">String</td>

          </tr>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d103726e75 ">
              <p style="margin-bottom:0;">priceList</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d103726e78 ">The price list to be used for the opportunity.</td>

            <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d103726e81 ">String</td>

          </tr>
        </tbody>
      </table>

## 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

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

JSON Response Body

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