Create Global Picklist

Purpose

To create a global set in your Zoho CRM account.

Endpoints

  • POST /settings/global_picklists

Request Details

Request URL

{api-domain}/crm/{version}/settings/global_picklists

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

ZohoCRM.settings.global_picklist.CREATE 
(or) 
ZohoCRM.settings.global_picklist.ALL

Supported modules

Leads, Contacts, Accounts, Campaigns, Cases, Invoices, Deals, Price Books, Products, Purchase Orders, Quotes, Sales Orders, Solutions, Vendors, Calls, Tasks, Events, Users, DealHistory, QuotedItems, OrderedItems, PurchaseItems, InvoicedItems, Visits, Services, Appointments, and Custom modules.

Copiedcurl "https://www.zohoapis.com/crm/v8/settings/global_picklists"
-X POST
-d "@input.json"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Input JSON 

  • display_labelstring, mandatory

    The unique name for the global picklist, which will be displayed in the CRM UI. A maximum of 50 characters allowed. 

  • descriptionstring, optional

    Represents the description for the global picklist. A maximum of 1000 characters allowed.

  • pick_list_values_sorted_lexicallyBoolean, optional

    It represents the sort order preference for the global set values. 


    Possible values:

    • false - given order (default value)
    • true - alphabetical order
  • pick_list_valuesJSON array, mandatory

    Includes the details of the global set options.

    • display_valuestring, mandatory

      The unique label displayed in the CRM interface for a specific value. A maximum of 120 characters are allowed.
      Please note that emojis and special characters  or empty value are not allowed in the display value. 

    • sequence_numberinteger, optional

      It represents the position of a value in a set of picklist options. By default, the sequence will be based on the user's input. See the sample input for reference.

    • reference_valueinteger, optional

      It represents the unique reference value for a specific option. Please note that emojis and special characters are not allowed in the reference value. By default, the display value will be used as the reference value. A maximum of 120 characters are allowed.

    • typestring, optional

      It represents whether the option is used or unused. The default value for type is used. A maximum of 1000 used options is allowed, and a maximum of 500 unused options is allowed.

Note

  • You can create one global set in a single API call. The maximum possible global sets for an org depends on the Zoho CRM edition. Refer to the feature-wise comparison of Zoho CRM Editions for more information.
  • By default, the system assigns the value of the display_value key to the actual_value. You cannot manually specify a value for the actual_value.

Sample Input

Copied{
    "global_picklists": [
        {
            "display_label": "Source",
            "description": "Use this picklist option across all modules in your account.",
            "pick_list_values_sorted_lexically": false,
            "pick_list_values": [
                {
                    "display_value": "Cold Call",
                    "sequence_number": 2,
                    "reference_value": "Call",
                    "type": "used"
                },
                {
                    "display_value": "Twitter",
                    "sequence_number": 15,
                    "reference_value": "Tweet",
                    "type": "used"
                },
                {
                    "display_value": "Facebook",
                    "sequence_number": 16,
                    "reference_value": "Face_book",
                    "type": "unused"
                },
                {
                    "display_value": "Google+",
                    "sequence_number": 3,
                    "reference_value": "Google+",
                    "type": "used"
                }
            ]
        }
    ]
}

Possible Errors

  • INVALID_DATAHTTP 400
    • The display_label contains an emoji or is null
    • The display label, actual label, or description has exceeded its limit

    Resoutions:

    • Emojis and special characters are not allowed in the display value. Please specify a valid non-empty value.
    • Ensure that the values for display_label, actual_label, and description adhere to the specified limits. See the Request JSON section for more information.
  • MANDATORY_NOT_FOUNDHTTP 400

    One or more mandatory fields are missing

    Resolution: Specify all the mandatory fields in the input. Please refer to the Request JSON section for more information.

  • LIMIT_EXCEEDEDHTTP 400
    • The values in the picklist have reached their limit
    • The limit for the used or unused option has been reached.
    • Global picklists limit exceeded

    Resolutions:

    • A maximum of 1000 used options and 500 unused options can be added for a global set. Ensure that your global set options are within its limit.
    • You have already created the maximum number of global sets possible for your org.  Please refer here to know about the limits for your edition. Refer to the feature-wise comparison of Zoho CRM Editions for more information.
  • DUPLICATE_DATAHTTP 400
    • Duplicate display_label
    • Duplicate display_value has been found among the picklist options

    Resolutions:

    • Ensure that the display_label for the global set is a unique value.
    • Verify that each display_value among picklist options is unique.
  • INVALID_REQUEST_METHODHTTP 400

    The https 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 for more details.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    Unauthorized
    Resolution: The client does not have a valid scope to create global picklists. Create a valid token with the required scopes. Refer to the Scope section for more details.

  • 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 for more details.

  • INTERNAL_ERRORHTTP 500

    Internal Server Error
    Resolution: Unexpected and unhandled exception in the server. Contact support team.

Sample Response

Copied{
    "global_picklists": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "2423488000000725001"
            },
            "message": "global picklist added successfully",
            "status": "success"
        }
    ]
}