---
schema_version: "1"
id: 1193a4cdaf35714b2a42e3cbf35fa02eaf055d18d7ff111f531a5bede8910d3b
title: cloneMasterCart Method
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_t_clonemastercart_method_215222.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_t_clonemastercart_method_215222.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 7ffd3dd9aa4270da5303df65e3d821ded4ffe87001a70be6f38e2af856ac9336
description: Clones an existing master quote or order. It copies all groups and their members. It doesn’t copy Sub Quote/Order.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# cloneMasterCart Method

Clones an existing master quote or order. It copies all groups and their members. It doesn’t copy Sub Quote/Order.

## Class

## Input Parameters

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d214845e44">
              <p style="margin-bottom:0;">Parameter</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d214845e50">
              <p style="margin-bottom:0;">Required</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d214845e56">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d214845e44 ">
              <p style="margin-bottom:0;">parentId</p>
            </td>

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d214845e50 ">

            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d214845e56 ">
              <p style="margin-bottom:0;">Opportunity ID.</p>
            </td>

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

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d214845e50 ">

            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d214845e56 ">
              <p style="margin-bottom:0;">Master quote or order ID (the ID of the record that need to be
                cloned).</p>
            </td>

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

            <td data-label="Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d214845e50 ">

            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d214845e56 ">
              <p style="margin-bottom:0;">Name of the cloned master quote or order. Name shouldn’t be
                duplicated within the opportunity.</p>
            </td>

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

## Output Parameters

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d214845e139">
              <p style="margin-bottom:0;">Parameter</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d214845e145">
              <p style="margin-bottom:0;">Description</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Parameter" class="slds-cell-wrap" style="vertical-align:top;" headers="d214845e139 ">
              <p style="margin-bottom:0;">masterCartId</p>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d214845e145 ">
              <p style="margin-bottom:0;">Master quote or order ID of cloned record.</p>
            </td>

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d214845e145 ">
              <p style="margin-bottom:0;">In case of any error.</p>
            </td>

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

## Example Input Data

```
{"parentId":"0064x000002RPeOAAW","masterQuoteId":"0Q04x000000gUjNCAU","name":"Clone - M-2","cartType":"Quote"}
```

## Example Output Data

```
{"masterCartId":"0Q04x000000gZbWCAU","error":"OK"}
```