Update record in Zoho Bookings
Table of Contents
Overview
This task is used to update a record with the specified values using its ID.
This integration task is based on the Zoho Bookings API - Update Appointment.
Syntax
<response> = zoho.bookings.updateRecord(<module>, <record_id>, <new_values>, <connection>);
where:
Params | Data type | Description |
<response> | KEY-VALUE | The variable which will hold the returned response. |
<module> | TEXT | The name of the module in which the record will be updated with new values. The applicable modules are:
|
<record_id> | TEXT | The booking ID of the appointment that will be updated. Click here to learn how to get the booking ID while creating an appointment. |
<new_values> | KEY-VALUE | The new values with which the record will be updated. The applicable key and values are:
|
<connection> | TEXT | The name of the connection. Note:
|
Example
The following example changes the status of the appointment with booking ID - #PA-00002 to completed:
// Create a map to hold the new values of the record valuesMap = Map(); valuesMap.put("action", "completed"); //Execute the bookings integration task to update an appointment with the new values response = zoho.bookings.updateRecord("appointment", "#PA-00002", valuesMap, "bookings_oauth_connection");
where:
response
"appointment"
"#PA-00002"
valuesMap
"bookings_oauth_connection"
Response Format
Success Response
- The success response will be returned in the following format:{
"response": {
"returnvalue": {
"staff_name": "\"Shawn\"",
"customer_more_info": {
},
"customer_booking_start_time": "\"2019-10-18 10:00:00\"",
"customer_contact_no": "\"+919998979695\"",
"booked_on": "\"17-Oct-2019 16:25:03\"",
"booking_id": "\"#PA-00002\"",
"workspace_id": "\"3883XXXXXXXXXXX6010\"",
"duration": "\"70 mins\"",
"service_id": "\"3883XXXXXXXXXXX7032\"",
"staff_id": "\"3883XXXXXXXXXXX7016\"",
"cost_paid": "\"1500.00\"",
"currency": "\"INR\"",
"workspace_name": "\"Soft skills\"",
"cost": "\"1500.00\"",
"service_name": "\"Technical counseling\"",
"time_zone": "\"Asia/Calcutta\"",
"start_time": "\"18-Oct-2019 10:00:00\"",
"due": "\"0.0\"",
"customer_email": "\"tim@gmail.com\"",
"booking_type": "\"appointment\"",
"customer_name": "\"Tim McGraw\"",
"summary_url": "\"https://shawn24.zohobookings.com/#/customer/softskills/invoice/WuLKnVtF%2F08vVAJ2Tfm5r%2FLaM1ZRiYFBYbYq1PbO83qgDo%2BJD8E64BCcHAlR9UCq\"",
"staff_email": "\"shawn@zylker.com\"",
"customer_booking_time_zone": "\"Asia/Calcutta GMT +05:30\"",
"status": "\"completed\""
},
"status": "success"
}
}
Failure Response
- The failure response for an invalid or non-existent record ID will be returned in the following format:{
"response": {
"returnvalue": {
"message": "Invalid appointment id",
"status": "failure"
},
"status": "success"
}
}