Update Record in Zoho CRM V8
Note:
- Each time the zoho.crm.v8.updateRecord integration task is executed, it triggers an API request in the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
- Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if zoho.crm.v8.updateRecord integration task is placed inside a for each task that iterates five times, the number of external calls consumed will be five, even though the task appears only once in the script.
Overview
This task updates the values of a particular record using its ID in the specified module of Zoho CRM.
Syntax
<variable> = zoho.crm.v8.updateRecord(<module_name>, <record_ID>, <record_value>, <options_map>, <connection>);
where,
| Parameter | Data type | Description |
| <variable> | KEY-VALUE | Holds the response returned by Zoho CRM on successful task execution or error details on failure. |
| <module_Name> | TEXT | Specifies the API name of the Zoho CRM module where the records will be updated. |
| <record_Id> | NUMBER | Specifies the ID of the record that will be updated. Learn how to retrieve the unique record ID from the response returned by Zoho CRM after creating, searching, or fetching a record. |
| <record_value> | KEY-VALUE | Represents the input collection (key–value pairs) where each key is a Zoho CRM field's API name mapped to the corresponding value to be inserted into that field. For example: {"Last_Name": "Williams"} here, Last_Name represents the field API name (key), and "Williams" represents the value inserted into that field. Note: Refer this page to find field names specific to each module. |
<options_map> (optional) | KEY-VALUE | An optional parameter, used to allow selective CRM automations on successful record creation. Applicable key is trigger, and applicable values are workflow, approval, blueprint, and orchestration. When the options_map parameter is specified in the function call, the mentioned When this parameter is excluded, only approvals, blueprints, and orchestration will get executed by default. To restrict all the CRM automations from getting executed, set the value of the “trigger” key to an empty list. |
| <connection> | TEXT | Represents the link name of the connection which is connected to your Zoho CRM account. Note:
|
Example : Update lead info in Zoho CRM
The following script updates the record with ID - 23033XXXXXXXXXXXXXX of the Zoho CRM module - Leads.
leadinfo = Collection( "Company":"Zylker", "Last_Name":"Stewart", "Phone":"9876XXXXXX", "Email":"stewart@zylker.com"); response = zoho.crm.v8.updateRecord("Leads",23033XXXXXXXXXXXXXX,leadinfo);
where,
leadinforesponse"Leads"23033XXXXXXXXXXXXXXResponse Format
Success Response
The success response returned is of the following format:
{
"Modified_Time":"2018-03-26T15:17:39+05:30",
"Modified_By":{
"name":"Ben",
"id":"29383XXXXXXXXXXXXXX"
},
"Created_Time":"2018-03-26T14:39:28+05:30",
"id":"29383XXXXXXXXXXXXXX",
"Created_By":{
"name":"Ben",
"id":"29383XXXXXXXXXXXXXX"
}
}
Failure Response
Note: The sample for a few common failure cases is given below. For all possible errors, please refer to the Zoho CRM API documentation.
The failure response for incorrect or non-existent record ID will be returned in the following format:
"code": "INVALID_DATA",
"details": {},
"message": "the id given seems to be invalid",
"status": "error"
}
The failure response for incorrect or non-existent module name will be returned in the following format:
"code": "INVALID_MODULE",
"details": {},
"message": "the module name given seems to be invalid",
"status": "error"
}