Cliq Database is the perfect storage solution when building integrations on Cliq Platform. It provides the ability to store, sync, update data items with easy access. All the CRUD operations of the database are available as deluge tasks and also as standard REST APIs.
Note: Cliq Database Rest APIs are explained in our Rest API guide.
How to create a database
- Click on your display picture and selectBots and Tools.
- In your Integration page, select Databases
- Click Create Database
- Configure the details shown below before clicking on Save & Edit Fields
Database Unique Name
The database unique name is a special identifier for your database and is a mandatory field.
Allowed Values: The unique name allows only lowercase a-z letters and can have a maximum of 30 characters.
Database Display Name
This database display name is shown in the user interface and is a mandatory field.
Allowed Values: The database display name can have a maximum of 30 characters with lowercase and uppercase a-z letters, numbers, spaces and special characters except the following : " < >
Provide a brief description about the database's purpose. This field is mandatory with a character limit upto 250.
There are three different field types that can be added in your Cliq Database.
- Text - Field input can be of the type string, integer, boolean. Maximum number of characters allowed is 100.
- Number - Field input should be of integer. Maximum number of characters allowed is 100.
- Boolean - Field input should be true/false.
|Maximum number of fields that can be added for each field type||Text||Number||Boolean|
|Total number of fields that can be added in a database||15|
Note: A maximum of 10 databases can be created for each Organization.
How to add database fields
To add fields in a database, just drag and drop or click twice on the required field type and configure the following details to create the field
- Field Display Name
- Field Unique Name
- Default Value
- Mark field as Mandatory
- Mark field as Unique
Field Unique Name
The field unique name is a unique identifier for each field and is mandatory.
Allowed values: A maximum of 30 lowercase a-z characters without any spaces or special characters are allowed.
Field Display Name
The field display name will be displayed to the user. This field is optional. If the display name is not defined by the user, the unique name will be considered as the display name.
Allowed values: The database display name can have a maximum of 30 characters with lowercase or uppercase a-z letters, spaces and special characters except the following : " < > .
You can set a default value for each field during its creation. If no default value is set during creation, then the value is considered as empty by default for fields of the type text. It is mandatory to define a default value for the fields of the type number.
Marking a field as mandatory requires the user to fill in a value for the field.
Adding values for the mandatory field during record creation: If a user tries to create a record without passing any input for the mandatory field, the createRecord api will throw an error, asking the user to specify a value for the mandatory column.
In case of a record update, if a new value is not specified for the mandatory field then the existing value is maintained for the respective field.
Marking a field as unique ensures that there is no duplication of values entered in any record for that particular field. During record creation, if an already existing value is inserted for a field marked as unique, the createRecord api will throw a duplicate entry found error.
The database preview shows the list of deluge tasks to add a record, edit a record, get records, delete a record and delete records with a sample syntax. Click on the database name, to open up this database preview!
Edit a Database
To edit configurations of a database:
- Select the database name to open the database preview
- Click the Edit Configuration button to edit the database details
To edit fields in a database:
- Press on Edit fields option against the database name
- Select the 'Edit Icon' for any field and edit the required details.
View a Database
- View a database by hovering over the database name and select view database option.
- Selecting this option will display a preview image of the database in a new window.
Delete a Database
- Delete a database by clicking the respective database's icon.
- Clicking on this icon will show a confirmation prompt, as shown in the image below .
- Once you choose the Yes, Delete button, the database will be deleted. Note that any action associated with this database will be ineffective. A database once deleted cannot be retrieved back.