Choose where you’d like to start

Extension Properties Tasks

Note: These tasks can only be used in the Extension handlers available in Zoho Cliq.

Description

The extension properties tasks are used to create and manage extension properties in Zoho Cliq.

Extensions are bundles of code integrations, commands, bots, message actions, functions, schedulers and databases combined together in Zoho Cliq. Learn more about Zoho Cliq extensions here.

Syntax

To get the value assigned to a property

<variable> = zoho.cliq.extension.getProperties(<property_Key>, <connection>);


To set a property value

<variable> = zoho.cliq.extension.setProperties(<property_KeyValue>, <connection>);


To delete a property

<variable> = zoho.cliq.extension.deleteProperty(<property_Key>, <connection>);

where,

ParameterData typeDescription

<variable>

KEY-VALUE

is the variable which will hold the response returned by Zoho Cliq.

<propertyKey>

TEXT (or) LIST*

is the property key whose value will be returned or deleted based on the task.

For getProperties task, the param can be of TEXT or LIST data type.

For deleteProperty task, the param must be of TEXT data type.

<property_KeyValue>

KEY-VALUE

Key and value to be set for an extension property.

Properties' keys can consist only characters from a to z, and _ (underscore).

<connection>

TEXT specifies the link name of the Zoho Cliq connection.

Note:

  • The connection param is mandatory when this task is triggered from a Scheduler. In all other cases, the connection param is optional.
  • While creating the connection, add the scope: ZohoCliq.Applications.ALL
  • Learn more about connections

Example

The following are sample codes for extension property tasks:

dataMap = {"username":"scottfisher"}; 
setResponse = zoho.cliq.extension.setProperties(dataMap, cliq_connection);
 
getResponse = zoho.cliq.extension.getProperties("username", cliq_connection);
 
deleteResponse = zoho.cliq.extension.deleteProperty("username", cliq_connection);

Sample Response

  • The sample success response returned by setProperties and getProperties tasks is of the following format.

    {"username":"test"}

  • The sample failure response returned by setProperties task is of the following format.

    {"code":"extra_key_found","message":"'user@name' is an extra key in the JSON Object."}

  • The sample failure response returned by getProperties and deleteProperties tasks due to incorrect, non-existent, or empty property name is of the following format.

    {"message":"The username property does not exist","code":"extension_property_does_not_exist"}

  • The sample success response returned by deleteProperties task is of the following format.

    {"status":"success"}

Related Links

Get Started Now

Execute