Choose where you’d like to start

Delete Records

Note: This task is applicable to all Zoho Services except Zoho Creator.

Overview

This task is used to delete records from a Zoho Cliq database based on a specified criteria.

This task is based on Zoho Cliq API - Delete a record.

Syntax

<variable> = zoho.cliq.deleteRecords(<database_name>, <query_text>, <connection>);

where,

ParamsData typeDescription

<variable>

KEY-VALUE

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

<database_name>

TEXT

specifies the unique name of the database from which the records will be deleted.

<query_text>

TEXT

specifies the query parameters.

Click here to find the list of operators that can be used in the search criteria.

<connection>

TEXTspecifies the link name of the Zoho Cliq connection.

Note:

  • In view of stopping new authtoken generation, a Zoho OAuth connection with appropriate scopes is mandatory for new integration tasks (created after the deadline specified in the post) to work as expected. Existing integration tasks will continue to work with or without the connections parameter unless the authtoken is manually deleted from accounts.
  • Add relevant scopes as mentioned in Zoho Cliq API - Delete a record.
  • Refer to this post for the list of Zoho services that support the connections page.
  • Learn more about connections

Example 1: Delete the records that satisfy static criteria

The following example deletes all the records from the Zoho Cliq database - availabilitydatabase that has the value - false in the column - availability.

 response_map = zoho.cliq.deleteRecords("availabilitydatabase","availability==false", "cliq_connection");

where,

response_map
is the KEY-VALUE returned by Zoho Cliq. It represents the status of the executed task.
"availabilitydatabase"
is the TEXT that represents the unique name of the database from which the records need to be deleted
"availability==false"
is the TEXT that represents the criteria
"cliq_connection"
is the TEXT that represents the name of the connection

Example 2: Delete the records that satisfy dynamic criteria

Write the below script in the message handler of your Bot configuration to delete records from the Zoho Cliq database - availabilitydatabase that has the value specified by the user in the column - name.

 response = Map();
 dynamic_value = message;
 query_text = "name==" + dynamic_value;
 response_map = zoho.cliq.deleteRecords("availabilitydatabase", query_text, "cliq_connection");
 response.put("text", response_map);
 return response;

where,

response_map
is the KEY-VALUE returned by Zoho Cliq. It represents the status of the executed task.
dynamic_value
is the TEXT variable that holds the user specified value of the column - name
query_text
is the TEXT variable that holds the search criteria
"cliq_connection"
is the TEXT that represents the name of the connection

Sample Response

Success Response

  • The success response returned is of the following format

     {"status":"SUCCESS"}

Failure Response

  • The failure response returned for an incorrect database name is of the following format

     {
     "status":"FAILURE",
     "message":"Uh-oh! Looks like availabilitydata does not exist.",
     "code":"platform_storage_database_not_found"
     }

Related Links

Get Started Now

Execute