Clone Assignment Rule
Purpose
To clone an existing Assignment Rule.
Use the Get Assignment Rules API to fetch Assignment Rule IDs available in your organization.
Endpoints
- POST /settings/automation/assignment_rules/{assignment_rule_ID}/actions/clone
Request Details
Request URL
{api-domain}/crm/{version}/settings/automation/assignment_rules/{assignment_rule_ID}/actions/clone
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.assignment_rules.CREATE
Parameter
- modulestring, mandatory
Specify the module API name associated with the Assignment Rule that you want to clone. Use Get Modules Metadata API to fetch module API names.
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/automation/assignment_rules/2276164000003551073/actions/clone?module=Leads"
-X POST
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d "@cloneRule.json"Input JSON
- assignment_rulesJSON array, mandatory
Specify the details for the new Assignment Rule created by cloning the existing Assignment Rule.
- namestring, mandatory
Specify a unique name for the new Assignment Rule.
Note:
- The cloned Assignment Rule retains the same configuration as the existing Assignment Rule, including its rule entries, criteria, assignee configuration, follow-up actions, and user availability settings.
- You can specify the name of the new Assignment Rule while cloning. To modify the cloned Assignment Rule after it is created, use the Update Assignment Rule API.
Sample Input
Copied{
"assignment_rules": [
{
"name": "Clone of basic assignment rule"
}
]
}Possible Errors
- INVALID_DATAHTTP 400
The ID provided is invalid
Resolution: Specify a valid Assignment Rule ID. Use the Get Assignment Rules API to fetch the Assignment Rule IDs available in your organization. - DUPLICATE_DATAHTTP 400
The module specified in the query parameter is invalid
Resolution: Refer to the Get Modules Metadata API to identify the correct module API name. - LIMIT_REACHEDHTTP 400
The Assignment Rule limit for your CRM edition has been reached
Resolution: Upgrade your Zoho CRM edition to increase the available Assignment Rule limit. - INVALID_MODULEHTTP 400
The specified Assignment Rule name already exists
Resolution: Specify a unique name for the new Assignment Rule. - DUPLICATE_DATAHTTP 400
Duplicate data
Resolution: Specify a unique name for the cloned Assignment Rule. - REQUIRED_PARAM_MISSINGHTTP 400
A required parameter is missing
Resolution: Specify the module parameter and its corresponding value. Use the Get Modules Metadata API to know the supported module API names. - MANDATORY_NOT_FOUNDHTTP 400
Mandatory field is missing
Resolution: Specify all mandatory fields to proceed with cloning the Assignment rule. Refer to the Input JSON section to know the required fields. - NO_PERMISSIONHTTP 400
No permission to clone the Assignment rule
Resolution: You do not have permission to clone the Assignment Rule. Contact your administrator to enable the required permissions. - 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 Endpoint section to know the HTTP method. - OAUTH_SCOPE_MISMATCHHTTP 401
Unauthorized
Resolution: The client does not have a valid scope to clone the Assignment Rule. Create a new token with valid scope. Refer to Scope section. - AUTHENTICATION_FAILUREHTTP 401
Authentication failed
Resolution: Pass the access token in the request header of the API call. - 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. - INTERNAL_ERRORHTTP 500
Internal Server Error
Resolution: Unexpected and unhandled exception in the server. Contact the support team.
Sample Response
Copied{
"assignment_rules": [
{
"code": "SUCCESS",
"details": {
"id": "2276164000003550025"
},
"message": "Assignment rule CLONED successfully",
"status": "success"
}
]
}