Update Global Picklist

Purpose

To update a global picklist or global set in your Zoho CRM account.

Endpoints

  • PATCH /settings/global_picklists/{global_picklist_ID}

Request Details

Request URL

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

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

ZohoCRM.settings.global_picklist.UPDATE 
(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.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v8/settings/global_picklists/2423488000000725001"
-X PATCH
-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 are allowed. 

  • descriptionstring, optional

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

  • pick_list_values_sorted_lexicallyboolean, optional

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

    Possible values:

    • true - alphabetical order
    • false - given order
  • pick_list_valuesJSON array, mandatory

    Contains the details of different values of the global set.

    • display_valuestring, optional

      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 are not allowed in the display value. This key is mandatory when you create a new option.

    • reference_valuestring, optional

      It represents the unique reference value associated with the particular option. Please note that emojis and special characters are not allowed in the display value.

    • idstring, mandatory

      It represents the unique ID of an option. This key is mandatory when you an option. Use the GET - Global Picklists API to retrieve option IDs.

    • sequence_numberinteger, optional

      It represents the position of a value in a set of picklist options.

    • typestring, optional

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

Notes

  • You can create new options, or update or delete the existing options of a global picklist using this API.
  • 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.
  • To update a value in the picklist, you must provide the ID of the picklist value.
  • You cannot update a global picklist option when the picklist is scheduled for deletion.
  • You can delete only one option in a single API call. Note that you cannot delete an option which is associated with the features like Blueprint, Workflow, etc.
  • Options which are associated with record creation, Workflow, ABM mapping, and Process Flow cannot be  moved from used stateto unused state.
  • Options which are associated with fields update, record creation, Workflow, ABM mapping, and Process Flow cannot be deleted.
  • A global picklist can have upto 1000 used options and 500 unused options.

Sample Input

Copied{
    "global_picklists": [
        {
            "display_label": "Source1",
            "description": "desc1",
            "pick_list_values_sorted_lexically": true, // to change the order to alphabetical order
            "pick_list_values": [
                {
                    "display_value": "Advertisement1", // updating the picklist display value
                    "sequence_number": 2, // updating the order of picklist value
                    "reference_value": "Advertisement1", // to change the picklist reference value
                    "id": "211111000000055940", // updating picklist id 
                    "type": "used" // to move the option to used state
                },
                {
                    "display_value": "Cold Call1",
                    "sequence_number": 2,
                    "id": "211111000000055942", // picklist id to be updated
                    "type": "unused" // to move the option to unused state
                },
                {
                    "display_value": "Cold Call2",
                    "sequence_number": 3,
                    "id": "211111000000051285",
                    "type": "unused",
                    "_delete": null // deleting the option from the global picklist
                },
                {
                    // to create new option id 
                    "display_value": "Employee 33",
                    "sequence_number": 1
                }
            ]
        }
    ]
}

Possible Errors

  • INVALID_DATAHTTP 400
    • The display_label contains an emoji or is null
    • The global picklist ID given seems to be invalid

    Resoutions:

    • Emojis and special characters are not allowed in the display value. Please specify a valid non-empty value.
    • Specify a valid unique ID for a global picklist. Use the GET Global Picklist API to retrieve the unique ID of the global picklist and its associated option IDs.
  • 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.
  • MANDATORY_NOT_FOUNDHTTP 400

    One or more mandatory fields missing

    Resolution: To update an option in a global picklist, you must provide its corresponding ID or display_value.

  • NOT_ALLOWEDHTTP 400

    global picklist deletion in progress

    Resolution: Updating a global picklist is not possible while it is in the deletion process. Please specify a valid global picklist to update.

  • 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 above.

  • 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 scope. Refer to the scope section above.

  • 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 above.

  • 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 updated successfully",
            "status": "success"
        }
    ]
}