Change Handlers Using REST API

Change Handlers Using REST API

SaveToDB 10 enables you to configure REST API services within a database, as detailed in Getting Data Using REST API and Saving Data Using REST API.

Here's a quick overview of the configuration:

IDTABLE_SCHEMATABLE_NAMETABLE_TYPETABLE_CODEINSERT_OBJECTUPDATE_OBJECTDELETE_OBJECT
 ZohoCRMContactsHTTPhttps://www.zohoapis.com/crm/v2/ContactsPOST {$url}

{"data":[{@json_row_values}]}
PUT {$url}/{id}

{"data":[{@json_row_values}]}
DELETE {$url}/{id}

The configured ZohoCRM.Contacts object shares the same configuration features as other native database objects.

Developers can set up change handlers using the xls.handlers table. Here’s an example:

IDTABLE_SCHEMATABLE_NAMECOLUMN_NAMEEVENT_NAMEHANDLER_SCHEMAHANDLER_NAMEHANDLER_TYPEHANDLER_CODE
 ZohoCRMContactsFirst_NameChangeHTTPPUT https://www.zohoapis.com/crm/v2/Contacts/{id}

{"data":[{"First_Name":@First_Name}]}
 ZohoCRMContactsLast_NameChangeHTTPPUT https://www.zohoapis.com/crm/v2/Contacts/{id}

{"data":[{"Last_Name":@Last_Name}]}

The HANDLER_CODE field contains the HTTP commands used to update a data source.

To use this method, the REST API must support updating individual fields. If it doesn't, you'll need to use the standard method for saving changes.

The URL can include parameters in curly brackets, like {id} in the example above.

The add-in automatically populates these parameters from table columns and selects the appropriate URL parameters.

The request body can include parameters prefixed with the @ character.

For more details on the HTTP commands, check out:

This website is using cookies. By continuing to browse, you give us your consent to our use of cookies as explained in our Cookie Policy.