Dealing with APIs and custom fields on a regular basis can prove to be tricky. When you create custom fields using an API in the back end, these fields are replicated in the GUI of your Zoho Desk modules. The labels your developer gives to every custom field are reflected verbatim in your Zoho Desk GUI. In the event that the admin of your portal changes a given field label on the front end, the APIs using the corresponding field label will cease to function. They will work again only when you update the APIs with the exact field labels. This process can be time-consuming and cumbersome. That's why we've revamped the naming system for custom fields within Zoho Desk, using API names.
What are API names and how are they different from field labels?
Moving forward, every time you create a custom field using an API, Zoho Desk will automatically generate an API name for the given field. The API name is guaranteed to be unique, and will serve as identification across your help desk modules. The names will be based on the given field label in the application. For example, if you create a custom field with the label 'Customer Type', the API name generated may be something like 'cf_customer_type'. Please note that API names cannot be modified.
How will this affect my day-to-day activities?
Developers must use the newly generated API names (instead of field labels) to make changes to custom fields in the back end. Take a look at the example below to understand how it works. This is a sample field "JSON," created using the apiName key. By December 31st 2019, the name key will be removed. Developers are advised to replace the name key with the apiName key, as they will have to depend on it to update custom field values henceforth.
{
"displayLabel" : "door number",
"isCustomField" : true,
"toolTipType" : "placeHolder",
"showToHelpCenter" : true,
"name" : "door number",
"apiName" : "cf_door_number",
"isEncryptedField" : true,
"id" : "4000000049001",
"type" : "Text",
"maxLength" : 50,
"isMandatory" : false
}
Also, when you use apiNames to update an entity, make sure that you use "cf "instead of "customField". Refer to the below example:
{
"ticketNumber" : "101",
"subCategory" : "Sub General",
"statusType" : "Open",
"subject" : "Hi. There is a sudden delay in the processing of the orders. Check this with high
priority",
"customFields" : {
"secondaryEmail" : null,
"ModelName" : "zPhone X"
},
"cf" : {
"cf_secondary_email" : null,
"cf_model_name" : "zPhone X"
},
"dueDate" : "2016-06-21T16:16:16.000Z",
"departmentId" : "1892000000006907",
"channel" : "Email",
"description" : "Hi. There is a sudden delay in the processing of the orders. Check this with"
highest priority",
"id" : "1892000000042034",
"status" : "Open"
}
With this update, admins and agents can change field names in the GUI whenever they need, without affecting the functioning of APIs. If you are concerned about your APIs and want to know more about the changes you should make, you can read this help document . Where can you find the API names for custom fields?
To view a list of all API names, you can run a search in the OrganizationFields or the Layouts API. The APIs, when searched for, will provide a list of API names corresponding to the fields in a specified module or layout.
We understand that this is a significant change to how you name custom fields within Zoho Desk. We believe that this update will vastly simplify your experience with APIs and custom fields. If you have any concerns or doubts, we'd be happy to hear from you. You can comment below, or send us an email at support@zohodesk.com .
Cheers,
Team Zoho Desk