Use b2bCmexCreateQuoteMembers invocable action to create multiple quote members in one synchronous request, with optional duplicate detection.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions |
Available from the Salesforce REST Actions API, Flow Builder, and OmniStudio in API version 68.0 and later, this action creates or upserts quote members from a JSON array. You can check for existing quote members by using a composite key built from selected fields.
Input Values
| Parameter | Required | Description | Data Type |
|---|---|---|---|
| quoteId | Yes | The ID of the quote to add members to. | String |
| members | Yes | A JSON array of member objects that use field API names as keys. | String (JSON array) |
| checkAsyncJobStatus | No | A Boolean value that indicates whether to check for a concurrent asynchronous job. Set the value to false to skip the check. The default value is true. |
Boolean |
| checkDuplicate | No | A Boolean value that indicates whether to check for existing quote members. | Boolean |
| duplicateCheckFields | No | Field API names used to build the composite duplicate-detection key. When multiple fields are provided, matching always uses AND, so a record is treated as a duplicate only if all provided fields match. | List of Strings |
Output Values
| Parameter | Description | Data Type |
|---|---|---|
| isSuccess | A Boolean value that indicates whether the operation completed successfully. | Boolean |
| createdQuoteMembers | The quote members that the action created or upserted. | List of Strings |
| skippedDuplicateCount | The number of members skipped because duplicates were detected. | Integer |
| error | An error message if the operation failed. | String |
Usage
Use this action to create quote members in bulk, such as members supplied by a CSV upload.
Set checkDuplicate to true and specify duplicateCheckFields to skip members that match existing composite keys.
The action returns its result synchronously.
Considerations
- The
membersvalue is sent as a JSON-encoded string when the REST Actions API is used. - The running user must have access to the record.
- Business and validation failures are returned in
outputValues.error, even when the Actions API envelope containsisSuccess=true. - Duplicate checking is optional.
Example Input
{
"inputs": [
{
"quoteId": "0Q0XXXXXXXXXXXXXXX",
"members": [
{ "Name": "Acme HQ", "City__c": "London" },
{ "Name": "Acme DC", "City__c": "Leeds" }
],
"checkDuplicate": true,
"duplicateCheckFields": ["Name", "City__c"]
}
]
}
Example Output
[
{
"actionName": "vlocity_cmt__B2BCmexCreateQuoteMembersInvocable",
"isSuccess": true,
"errors": null,
"outputValues": {
"isSuccess": true,
"createdQuoteMembers": [
{ "Id": "a0XXXXXXXXXXXXXXXX", "Name": "Acme HQ" }
],
"skippedDuplicateCount": 1,
"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 or when the running user doesn't have access to the record.