Get Configured Users
Purpose
This API helps you to fetch the list of users who are assigned an assignment threshold in the specified module.
Endpoints
- GET /settings/automation/assignment_thresholds/{threshold_ID}/restrict_to
- {threshold_ID} : ID of the assignment threshold for which you want to fetch the configured users.
Request Details
Request URL
{api-domain}/crm/{version}/settings/automation/assignment_thresholds/{threshold_ID}/restrict_to
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.assignment_thresholds.{operation_type}
Possible Operation Types
ALL - Full access to Assignment Threshold data
READ - Fetch all configured users for Assignment Threshold
Parameters
- modulestring, mandatory
Specify the module for which you want to fetch the users with assignment threshold. Use the GET Modules Metadata API to retrieve the module API names. Supported Modules: Leads, Contacts, Accounts, Deals, Cases and custom modules.
- pageinteger, optional
To get the list of user records from the respective pages. Default value is 1.
- filterstring, optional
Specify the filter criteria using which you want to search the configured users of a threshold.
Possible Value:
{
"field": {
"api_name": "{value}"
},
"comparator": "contains",
"value": "{User_name_you_want_to_filter}"
}- fieldJSON object, mandatory
Specify the API name of the field. The only supported value is name.
- comparatorstring, mandatory
Specify the comparison operator. The only supported value is contains.
- valuestring, mandatory
The value to compare against.
Ensure to encode the filter parameter value before including it in the request URL.
Note
Use the page and per_page parameters to fetch configured user records in batches. Since a maximum of 200 records can be retrieved per API call, use multiple pages (for example, page 1 and 2 with per_page=200) to fetch all records.
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/automation/assignment_thresholds/1862079000024556062/restrict_to?module=Leads"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"Response JSON
The restrict_to array is the root key that contains the list of users with their assignment threshold details based on the request parameters.
backlog_allow_countintegerContains the maximum number of records allowed for the user to retain in the backlog. New records will not be assigned if the user's backlog count is greater than or equal to the specified value.
- default_assigneeBoolean
Indicates whether the user is set as the default assignee.
Possible values:
true - The user is the default assignee.
false - The user is not the default assignee. - record_allow_countinteger
Represents the maximum number of records that can be assigned to the user for the configured interval period (the record_period key value set using Create Assignment Threshold API).
- record_assigned_countinteger
Represents the number of records that have been assigned to the user within the configured period.
- typestring
Represents the type of assignee.
Possible values: user. - userJSON object
Contains the details of the user to whom the threshold is configured. The object contains the user's name, their ID and email address.
- backlog_countinteger
Represents the number of records that are currently pending or backlogged for the user within the configured period.
Possible Errors
- INVALID_DATAHTTP 400
Invalid assignment threshold ID is provided in the request URL.
Resolution: Always provide a valid assignment threshold ID. Use the GET Assignment Threshold API to retrieve assignment threshold IDs. - NO_PERMISSIONHTTP 403
You do not have enough permission to fetch the users configured for the assignment threshold.
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 fetch the users configured for the 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{
"restrict_to": [
{
"backlog_allow_count": 2,
"default_assignee": false,
"record_allow_count": 10,
"record_assigned_count": 0,
"type": "user",
"user": {
"name": "Patricia Boyle",
"id": "1862079000000440001",
"email": "patricia.boyle@zylker.com"
},
"backlog_count": 0
}
],
"info": {
"next_page": 2,
"per_page": 200,
"count": 1,
"more_records": false
}
}