---
schema_version: "1"
id: ae1a593130c6ada628a0c3b438cf05a9741a86940161d39589209acfaa5daace
title: Implement Deep Cloning by Using Invocable Action
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_implement_quote_cloning_invocable_action.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_implement_quote_cloning_invocable_action.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d58747f7e211ba29bf845865b8e871d7e693df1f85d2c4985cb170a5f16e8b97
description: Use invocable actions to implement deep cloning of quotes and orders. The clone record invocable Apex class contains the core logic. Large JSON inputs in cloning configurations can exceed Agentforce character limits. Therefore, use this recommended implementation path.
products:
  - Communications
release: "264"
---
# Implement Deep Cloning by Using Invocable Action

Use invocable actions to implement deep cloning of quotes and orders. The clone record invocable Apex class contains the core logic. Large JSON inputs in cloning configurations can exceed Agentforce character limits. Therefore, use this recommended implementation path.

![Managed Package Icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-communications-264-0-0-production-enus/444efb86-ea1e-477e-afbc-56eaac192eaf/communications/images/media_package_icon.png) _This feature is part of the Communications Cloud managed package._

| REQUIRED EDITIONS |
| --- |
| Available in: Lightning Experience |
| Available in: **Enterprise**, **Performance**, **Unlimited**, and **Developer** Editions |

1. Create a Screen Flow or Autolaunched Flow and add the Clone Record action.
2. Pass the following inputs to the action:
    
    - **recordId** (required) — the ID of the source Quote or Order to clone.
    - **sObjectName** (required) — Quote or Order.
    - **executionMode** (required) — sync or async. For enterprise-scale quotes (up to 50,000 QLIs), use async. For smaller quotes (100–500 QLIs), use sync.
    - **targetFieldUpdates** (optional) — field/value pairs to apply to the cloned record (for example, Name, Status: Draft for cloned orders). If the source quote or order's status is Activated, Salesforce won't let the cloned record save with that status. Include a Draft value here (for example, {"Status": "Draft"}) for the clone to succeed.
    - **targetRecordId** (optional) — clone child records into an existing target record instead of creating a new one.
    - **runPricing** or **runValidation** (optional) — set to true to trigger pricing and validation after the clone completes.
    - **objectDetailsInSortedOrder, cloningOptions, defaultObjectsToClone** — define the related objects to clone and the order in which they're processed. For Enterprise Sales Management, this sequence typically is: Quote or Order → Quote Group → Quote Member → Quote Line Item → Quote Line Item Relationship → Applied Promotions or Price Adjustments.
    
    ![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 For the full payload, see the JSON examples in [Set Up Deep Clone API Configuration](https://help.salesforce.com/s/articleView?id=ind.comms_configure_enterprise_quote_clone_api.htm&language=en_US).
3. Save and activate the Flow.
4. Reference the flow as a Topic Action in Agentforce (for example, Clone Quote) so that reps can invoke it conversationally.

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

Important The cloning sequence appears as an ordered list, but the objectDetailsInSortedOrder configuration enforces the order — not separate flow elements. The flow calls the invocable action only once. While ESM and Industries CPQ use the same underlying API, ESM requires the Quote Line Item Relationship objects.