Validate User Threshold
Purpose
This API helps you to validate the assignment threshold limit for users in a specific module. The limit will be calculated based on the backlog count and the record assigned count for the specified user.
Endpoints
- GET /{module_API_name}/actions/permit_threshold
- {module_API_name} : API name of the module for which you want to check the assignment threshold limit.
Request Details
Request URL
{api-domain}/crm/{version}/{module_API_name}/actions/permit_threshold
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.modules.{operation_type} or
ZohoCRM.modules.{module_API_name}.{operation_type}
Possible Operation Types
ALL - Full access to modules data
READ - Fetch modules data
Supported Modules
Leads, Contacts, Accounts, Deals, Cases and custom modules.
Custom Modules
For custom modules, use their respective API names in the request URL. You can obtain the API name from Setup -> Developer Hub -> APIs & SDKs -> API Names. You can also get the module API name from the api_name key in the GET Modules Metadata API's response.
Parameters
- owner_idstring, mandatory
ID of the user for whom you want to validate the assignment threshold limit. Use the GET Users API to get the user ID.
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/Leads/actions/permit_threshold?owner_id=111111000000056029"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"Response JSON
The permit_threshold object is the root key that contains the details of the assignment threshold validation for the specified user.
allowBooleanIndicates whether the assignment threshold has been reached for the user and whether the user is permitted to be assigned new records.
Possible values:
true - The assignment threshold has not been reached.
false - The assignment threshold has been reached.- reasonstring
Provides the reason for permitting or not permitting the user from being assigned new records.
Possible Values:
- RESTRICTION_ACTIVE: The user has an active assignment threshold and can be allowed to assign new records.
- RESTRICTION_NOTAPPLICABLE_DEFAULTASSIGNEE: The user is a default assignee and the assignment threshold is not applicable for default assignees. The user can be allowed to assign new records.
- RECORD_ALLOWCOUNT_EXCEEDS: The user threshold for allowed count has been reached and the user is not permitted to be assigned new records.
- NO_RESTRICTION: The user does not have any assignment threshold configured.
- remaining_allow_countinteger
Represents the number of additional records that can be assigned to the user before reaching the assignment threshold limit.
Possible Errors
- REQUIRED_PARAM_MISSINGHTTP 400
You did not specify the required parameter in the API request.
Resolution: owner_id parameter is mandatory to validate assignment threshold for a user. Make a GET Users API call to get the user ID and specify it in the parameter. - INVALID_DATAHTTP 400
Invalid owner ID is provided in the request URL.
Resolution: Always provide a valid owner ID. Use the GET Users API to retrieve user IDs. - NO_PERMISSIONHTTP 403
You do not have enough permission to validate assignment threshold for users.
Resolution: Contact your CRM administrator. - INVALID_MODULEHTTP 400
You provided an invalid module name in the API request.
Resolution: Make a GET Modules Metadata API call to get the valid module name and specify it in the parameter. - NOT_SUPPORTEDHTTP 400
You provided an invalid module in the API request.
Resolution: Assignment Threshold is supported only for Leads, Contacts, Accounts, Deals, Cases and custom modules. Specify a valid module name in the parameter. - FEATURE_NOT_SUPPORTEDHTTP 400
Your CRM edition does not support this feature.
Resolution: Assignment Threshold is supported in Professional and above editions. Upgrade your CRM edition to use this feature. - API_NOT_SUPPORTEDHTTP 400
You specified an invalid or lower version in the API request.
Resolution: Assignment Threshold is supported from API version v8 and above. Specify a valid version in the API request. - 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 of the API. - OAUTH_SCOPE_MISMATCHHTTP 401
Unauthorized
Resolution: The client does not have a valid scope to validate assignment threshold. Create a new token with valid scope. Refer to scope section of the API. - 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 of the API. - INTERNAL_ERRORHTTP 500
Internal Server Error
Resolution: Unexpected and unhandled exception in the server. Contact support team.
Sample Response
Copied{
"permit_threshold": {
"allow": true,
"reason": "RESTRICTION_ACTIVE",
"remaining_allow_count": 10
}
}