REST Settings

REST Settings

The SaveToDB add-in allows configuring settings to enable saving data to REST API services.

Below is a sample for ZohoCRM:

SaveToDB REST API Settings

The URLs section contains methods and URL formats for CRUD operations.

The Read URL contains a URL from the Web Data Connection Wizard.

You can use it as the {url} variable in other URLs.

The Update and Delete URLs usually contain a field used to identify the record.

Use the field names in the curly brackets like {id} in the sample.

The add-in supports two methods of body encoding:

  • JSON
  • x-www-form-url-encoded

Specify the body format following your data service.

The add-in uses the same body format for Create and Update operations.

Below is a sample of the JSON-encoded body format:

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

You can use the built-in @json_row_values variable to send values of all required columns.

Otherwise, you can use parameters with the column names of the loaded data.

For example:

{"data":[{"Company":@Company,"Email":@Email,"First_Name":@First_Name,"Last_Name":@Last_Name}]}

Below is a sample of the x-www-form-url-encoded body format:

@form_row_values

The add-in replaces the @form_row_values parameter with the row values.

You can specify the parameters manually also.

For example:

Company=@Company&Email=@Email&First_Name=@First_Name&Last_Name=@Last_Name

You can specify the columns to save in the Columns field.

For example, the ZohoCRM Accounts table contains a lot of fields.

The sample above defines that only four fields must be updatable.

Note that you can easily change the list.

For example, you can connect for the first time with an empty field and then copy and paste column headers.

The add-in accepts commas, spaces, semicolons, and line breaks as separators.

You can disable REST settings temporarily using the Enabled checkbox.