Record Clone
Purpose
To clone a record in a module.
Request Details
Request URL
{api-domain}/crm/{version}/{module_api_name}/{record_id}/actions/clone
Supported modules
Leads, Accounts, Contacts, Deals, Campaigns, Tasks, Cases, Meetings, Calls, Solutions, Products, Vendors, Price Books, Quotes, Sales Orders, Purchase Orders, Invoices, Appointments, Appointments Rescheduled History, Services, and Custom.
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
scope = ZohoCRM.modules.ALL
or
scope = ZohoCRM.modules.{module_name}.CREATE
Possible module names
leads, accounts, contacts, deals, campaigns, tasks, cases, events, calls, solutions, products, vendors, pricebooks, quotes, salesorders, purchaseorders, invoices, appointments, appointments_rescheduled_history, services, notes, and custom.
Sample Request
Copied"https://www.zohoapis.com/crm/v7/Leads/5725767000002529010/actions/clone"
-X POST
-d "input.json"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxd"
For detailed information regarding the input JSON keys, please refer to the Insert records API.
Input JSON Key
- skip_feature_executionJSON array, optional
By default, if a Cadence is configured for a module, it will be executed automatically when you the clone a record via API. This key lets you skip the execution of the Cadences feature during the records clone operation. Specify "cadences" as the value for the "name" key to skip Cadences execution for the record. Ensure you include this key alongside the "data" key in your request. The supported value for the "name" key is "cadences".
Notes
- By default, when you clone a record, the field values of the parent record will also be copied to the cloned record. If you want to modify certain fields or to add value to some fields, specify their field API names and their corresponding values in the input body. Refer to the Sample Input sections in the Insert Records API to know how to add values to fields in a module. Please note that if you do not intend to make any changes to field values, you can omit the input body during the API request.
- The Subform records in a module can only be cloned along with its parent record. See the Subforms API for more information.
- The mandatory fields in the input should not be null.
- The following fields/properties will be excluded during the record cloning process:
- Field Types:
- File Upload
- Image Upload
- Fields:
- wizard
- data_processing_basis_details (If GDPR is enabled)
- Field Properties :
- read_only
- external
- $ properties will be omitted while cloning a record.
- Field Types:
- Modules-specific fields will be excluded during the record cloning process :
- Events Module :
- recurring_activity
- remind_at
- Services Module :
- Status
- Unavailable_From
- Unavailable_Till
- Appointments Module :
Fields : Status, Reschedule_Count, Job_Sheet_Created__s, and Job_Sheet_Section__s.
Note : Only the "Appointment Information" section and its fields in it will be cloned.
- Events Module :
- The Sample Inputs, Sample Responses, and Possible Errors mentioned in the Insert Record API are applicable to the Record Clone API.
Sample Input
Copied{
"data": [
{
"Last_Name": "Patricia",
"Company": "Info Technology",
"Email": "patricia@mail.com",
// Modifying Subform records
"Project_Details": //API name of the subform
[
{
// Assigning new values to the Subform records
"Project_Name": "Mobile App Development for Productivity",
"Project_Type": "Mobile App Development",
"Expected_Budget": 50000,
"Status": "Negotiation in Process"
}
]
}
],
"skip_feature_execution": [
{
"name": "cadences"
}
]
}
Possible Errors
- INVALID_DATAHTTP 400
Invalid data or request body
Resolution: Specify a valid input or request body. Refer to the Insert Records API for more information. - DUPLICATE_DATAHTTP 400
Duplicate data
Resolution: The unique field's value (Example: Phone in the Leads module) should be unique across the module. Assign unique values to the unique keys. - MANDATORY_NOT_FOUNDHTTP 400
Required fields are missing
Resolution: You have not specified one or more mandatory fields. Refer to the System-defined mandatory fields for each module detailed in the Insert Records API. - INVALID_REQUEST_METHODHTTP 400
The http request method type is not a valid one
Resolution: You have specified an invalid HTTP method to access the API URL.
Specify a valid request method. Refer to the endpoints section above. - OAUTH_SCOPE_MISMATCHHTTP 401
Unauthorized
Resolution: The client does not have a valid scope to clone a record. Create a new token with the required scopes. Refer to the scope section above. - AUTHENTICATION_FAILUREHTTP 401
Authentication failed
Resolution: Pass the access token in the request header of the API call. - NO_PERMISSIONHTTP 403
No permission to clone a record
Resolution: Contact the administrator. - INVALID_URL_PATTERNHTTP 404
Please check if the URL trying to access is a correct one
Resolution: The request URL specified is incorrect. Specify a valid request URL.Refer to the request URL section above. - INTERNAL_ERRORHTTP 500
Internal Server Error
Resolution: Unexpected and unhandled exception in the server. Contact support team.
Sample Response
Copied{
"data": [
{
"code": "SUCCESS",
"details": {
"Modified_Time": "2024-06-05T04:28:30-07:00",
"Modified_By": {
"name": "Patricia Boyle",
"id": "5725767000000411001"
},
"Created_Time": "2024-06-05T04:28:30-07:00",
"id": "5725767000002954096",
"Created_By": {
"name": "Patricia Boyle",
"id": "5725767000000411001"
},
"$approval_state": "approved"
},
"message": "record added",
"status": "success"
}
]
}