---
schema_version: "1"
id: a0cdf3e5a2d44e6dc7d9eb1a265697e1517019300586264c4e99b387534b5647
title: Create a Quote 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_a_quote_invocable_action.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_create_a_quote_invocable_action.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 86ab0a31880b56cc998286729ae6af54e94510e10ee10149dbc8d96af659bf24
description: Create an enterprise quote for an existing opportunity, or create an opportunity and its quote together in one request.
products:
  - Communications
release: "264"
---
# Create a Quote Invocable Action

Create an enterprise quote for an existing opportunity, or create an opportunity and its quote together in one request.

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

Available from the Salesforce REST Actions API, Flow Builder, and OmniStudio in API version 68.0 and later, this synchronous action calls the `ESM_CreateQuote` Integration Procedure. Specify an existing opportunity ID, or provide the required opportunity values to create an opportunity.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-communications-264-0-0-production-enus/444efb86-ea1e-477e-afbc-56eaac192eaf/images/icon_note.png)

Note To configure this invocable action as an Agentic action in Agentforce, use wrappers for both input and output payload transformation. You can create the wrappers in Apex or in Flow.

## Input Values

   
| Parameter | Required | Description | Data Type |
| --- | --- | --- | --- |
| accountId | Yes | The ID of the account for the quote. | String |
| quoteName | Yes | The name of the quote. | String |
| priceList | Yes | The ID of the price list to use for the quote. | String |
| opportunityId | No | The ID of an existing opportunity. If this value is blank, the action creates an opportunity. | String |
| opportunityName | Conditional | The name of the new opportunity. Required when `opportunityId` is blank. | String |
| opportunityCloseDate | Conditional | The close date of the new opportunity in yyyy-MM-dd format. Required when `opportunityId` is blank. | Date |
| opportunityStage | Conditional | The stage of the new opportunity. Required when `opportunityId` is blank. | String |

## Output Values

  
| Parameter | Description | Data Type |
| --- | --- | --- |
| quoteId | The ID of the created quote. | String |
| opportunityId | The ID of the opportunity associated with the quote. | String |
| error | An error message if the quote couldn't be created. | String |

## Usage

Use this action to create a quote for an existing opportunity or to create a new opportunity and quote together.

To use an existing opportunity, specify `opportunityId`. To create an opportunity, omit `opportunityId` and specify `opportunityName`, `opportunityCloseDate`, and `opportunityStage`.

The action returns its result synchronously.

## Considerations

- The running user must have access to the record.
- When `opportunityId` is blank, all three new-opportunity inputs are required.
- Business and validation failures are returned in `outputValues.error`, even when the Actions API envelope contains `isSuccess=true`.
- Inputs and outputs are positional when a request contains multiple input objects.

## Example Input

```json
{
  "inputs": [
    {
      "accountId": "001XXXXXXXXXXXXXXX",
      "quoteName": "Acme Enterprise Q1 Quote",
      "priceList": "Enterprise Price List",
      "opportunityId": "006XXXXXXXXXXXXXXX"
    }
  ]
}
```

## Example Output

```json
[
  {
    "actionName": "vlocity_cmt__B2BCmexCreateQuoteInvocable",
    "isSuccess": true,
    "errors": null,
    "outputValues": {
      "quoteId": "0Q0XXXXXXXXXXXXXXX",
      "opportunityId": "006XXXXXXXXXXXXXXX",
      "error": null
    }
  }
]
```

## Error Handling

Check `outputValues.error` to determine whether the action succeeded. Business and validation failures don't populate the Actions API `errors` array.

The action returns an error when a required value is blank. If the Integration Procedure doesn't return a quote ID, the action reports that the quote ID couldn't be extracted from the response.

An access failure returns the following message:

```
Looks like you don't have access to this record. Your Salesforce admin can help with that.
```