You are here:
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.
This feature is part of the Communications Cloud managed package.
| REQUIRED EDITIONS |
|---|
| Available in: Lightning Experience |
| Available in: Enterprise, Performance, Unlimited, and Developer Editions |
- Create a Screen Flow or Autolaunched Flow and add the Clone Record action.
-
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).
- 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 For the full payload, see the JSON examples in Set Up Deep Clone API Configuration. - Save and activate the Flow.
- Reference the flow as a Topic Action in Agentforce (for example, Clone Quote) so that reps can invoke it conversationally.

