Update Record in Zoho FSM
Table of Contents
Description
You can update a record of a module using the zoho.fsm.updateRecord() Deluge task.
This task is based on Zoho FSM API -> <Module> APIs -> Edit <ModuleName>
Syntax
<variable> = zoho.fsm.updateRecord(<module_name>, <record_ID>, <record_details>, <optional_data_map>, <connection>);
where:
Params | Data type | Description |
<variable> | KEY-VALUE | is the response returned by Zoho FSM. |
<module_Name> | TEXT | is the API name of the Zoho FSM module where the records will be updated. The API names of the modules are: |
<record_Id> | NUMBER | is the unique ID of the record you want to retrieve. Note: Learn how to fetch the ID of a record after creating or fetching it. |
<record_value> | KEY-VALUE | is the input map details of the record that needs to be inserted into the module. Note: To learn about the mandatory fields, click here and navigate to <Module> APIs -> Edit <ModuleName>
|
<optional_data_map> (optional) | KEY-VALUE | is a parameter to pass any additional values. If you want to ignore this parameter, supply an empty map. Note: To learn about the optional parameters, click here and navigate to <Module> APIs -> Edit <ModuleName>
|
<connection> (optional) | TEXT | is the name of the connection created for Zoho FSM. Note: Add relevant scopes as mentioned in Zoho FSM API -> <Module> -> Edit <ModuleName>. |
Example
The following script updates the record with ID - 23033XXXXXXXXXXXXXX of the Zoho FSM module - Requests.
emptyMap = Map(); newRecordInfo = Map(); newRecordInfo.put("Priority", "High"); response = zoho.fsm.updateRecord("Requests", 1439XXXXXXXXXXXX, newRecordInfo, emptyMap, "fsm_connection");
where:
newRecordInfo
response
"Requests"
23033XXXXXXXXXXXXXX
"fsm_connection"
Response Format
The following is a success response when a record is updated in Zoho FSM.
"data": [
{
"code": "SUCCESS",
"details": {
"Modified_Time": "2022-05-16T00:48:58-07:00",
"Modified_By": {
"name": "Mary Cooper",
"id": "1439000000161001"
},
"Created_Time": "2022-05-12T03:42:38-07:00",
"id": "1439000000185139",
"Created_By": {
"name": "Mary Cooper",
"id": "1439000000161001"
}
},
"message": "record updated",
"status": "success"
}
]
}