Create Records

The create record deluge task is used in integration scripts to add a new record with specified values.


values_map = Map(); 


  • field_name = The unique name of the field for which the value has to be added
  • field_value = The value to be added for the particular field
  • database_name = Name of the database in which the field will be added 


In the following example, let us consider the Zylker IT Administration team which manages the internal queries and support raised by the employees. The employees use the slash command - /raiserequest to notify the team of their query. The /raiserequest command notifies the IT team of the request made while also creating an record for this request in the Database. 

response = Map();
// Check if the request made is in the correct syntax
if(mentions.size() > 0)
// Get details of the request assignee from the @mention made
	userName = mentions.get(0).get("first_name") + " " + mentions.get(0).get("last_name");
		request = arguments.replaceAll(userName,"");
		info request;
		assignee = mentions.get(0).get("id");
		values_map = Map();
		response_map = zoho.cliq.createRecord("zylkerrequestmanagement",values_map);
		info response_map;
		record_id = response_map.get("object").get("id");
// Frame the command response and post message to the bot using the zoho.cliq.postToBot deluge task and post message to the user as well with the requestID
		responseToUser = {"text":"Thanks! Your request has been raised. Please note the request ID. \n Request ID : " + record_id,"bot":{"name":"ITS Bot","image":""}};
		response = {"text":"Hi, a new request has been raised by " + user.get("first_name") + " (" + user.get("email") + ")\n These are the request details: \n Request : " + request,"card":{"theme":"modern-inline","title":"New request assigned to you!"},"buttons":{{"label":"Mark as Complete","key":"" + record_id,"action":{"type":"invoke.function","data":{"name":"updaterecord","owner":""}},"type":"+"}},"userids":assignee};
	response = {"text":"Please describe your request and @mention a user to assign this request! \n ```Sample Syntax: /raiserequest *Your request or incident* @username``` ","bot":{"name":"ITS Bot","image":""}};
return Map();


User raises a request  and assigns it to a member of the ITS team using the /raiserequest command. The command input is of the format /raiserequest [arguments] @usermention

raise request slash command

The command is executed to create a record in the Zylker Request Management Database with the request details and if the record creation is successful, a response message is posted to the requester with the request ID and the ITS Bot also notifies the assignee about the request assigned to them. 

raise request response

The ITS Bot notifying the assignee about the request assigned to them.

Notification to assignee

Details of the request raised