Including Zoho Desk Resources

You can also include Zoho Desk resources, such as fields, webhooks, custom permissions, and channel integrations that can be used within the extension by defining in resources.json

For instance, if you want to create a field to be used in your extension, you have to use the organization fields API and manually associate the extension departments to the fields. This complicates the code logic of the extension and makes it difficult to manage it. You can avoid this complication by including Zoho Desk's resources in your extension's resources.json, thereby saving development time and effort substantially.

Among resources, fields are extension-specific, which means they are shared among multiple installation instances in the same portal. The other resources - webhooks, custom permissions, and channel integrations - are installation-specific, which means they are valid only in the particular installation instance.



Each resource you create must have a unique identifier, which must be specified using the resourceName key. The resourceName(s) specified should be unique across the extension and this is validated before the extension is made available on the Marketplace. The resourceName you assign serves as the unique identifier across all organizations that install your extension.

To include a resource in your extension, you must mention its resourceName value in the resources.json file in the extension bundle.

How it works?

When you define a resourceName in the resources.json file, the ID and apiName (if available) of the resource are also mapped to it automatically. After this, you can use the ID and/or apiName (if available) in APIs related to the resource, as required. For instance, if you are in need of apiName of a created field, you can use the resourceName value of the field to retrieve its apiName.

Retrieving the ID and apiName of a resource : Using the resourceName value, you can retrieve the ID and apiName of a resource in one of the following ways:

1. Through a merge field in the invoke API, or

2. Using the client SDK

1. Through a merge field in the invoke API

In this method, you must specify the resourceName value in the Desk's invoke API in the following format.

{{}} or {{resourceType.resourceName.apiName}}.

Refer Specifying Placeholders in Invoke API.

Placeholders Details :

resourceType should be fields or webhook, based on your use case.

id returns the fieldId or webhookId, based on the value in resourceType.

apiName returns the apiName of the resource. it is applicable to fields.

2. Using the client SDK

In this method, you must use the Resource API for retrieving resource details.