---
schema_version: "1"
id: 228776cd0266f7359a7331f34637f39244e052b26091b5cf64e91de4e85d982f
title: cloneMasterCart Method
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/comms-t-clonemastercart-method.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/comms-t-clonemastercart-method.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c84c0574fc6e494b21c623767bb6a6286c3a44654ba736543c730b57c940cd62
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# cloneMasterCart Method

Clones an existing master quote or order. It copies all groups and their members. It doesn’t copy Sub Quote/Order.

<!-- Section title is the name of the method followed by "Method". If appropriate, precede the method name with the class name and a colon.-->

## Class

<!-- broken link-->

<!-- Link(s) to the class(es) to which this method belongs. If more than one class implements the same interface, use an itemized list. Don't use a link if the class itself isn't documented for users, but do list the class name.-->


## Input Parameters

<!-- If this method has separate input and output parameters, split this section into two sections titled "Input Parameters" and "Output Parameters". Some methods of classes that implement VlocityOpenInterface2 might require an "Options Parameters" section as well.-->

| Parameter     | Required | Description                                                                                    |
| ------------- | -------- | ---------------------------------------------------------------------------------------------- |
| parentId      |          | Opportunity ID.                                                                                |
| masterQuoteId |          | Master quote or order ID (the ID of the record that need to be cloned).                        |
| name          |          | Name of the cloned master quote or order. Name shouldn’t be duplicated within the opportunity. |

## Output Parameters

| Parameter    | Description                                |
| ------------ | ------------------------------------------ |
| masterCartId | Master quote or order ID of cloned record. |
| message      | In case of any error.                      |

## Example Input Data

<!-- This is usually JSON, but it could be XML or a single value. For methods of classes implementing VlocityOpenInterface2 that have options parameters, include those here.-->

```
{"parentId":"0064x000002RPeOAAW","masterQuoteId":"0Q04x000000gUjNCAU","name":"Clone - M-2","cartType":"Quote"}
```

## Example Output Data

<!-- This is usually JSON, but it could be XML or a single value. Salesforce uses Return Type, but this takes care of that.-->

```
{"masterCartId":"0Q04x000000gZbWCAU","error":"OK"}
```
