Cliq Databases
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 select Bots 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 : " < >
Description
Provide a brief description about the database's purpose. This field is mandatory with a character limit upto 250.
Database Fields
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 250.
- Number - Field input should be of integer. Maximum number of characters allowed is 19.
- Boolean - Field input should be true/false.
- Encrypted-text - Field input can be of the type string, integer. Maximum number of characters allowed is 250.
- Large-text - Field input can be of the type string, integer. Maximum number of characters allowed is 1000.
Maximum number of fields that can be added for each field type | Text | Number | Boolean | Encrypted-Text | Large-Text |
5 | 5 | 5 | 3 | 1 | |
Total number of fields that can be added in a database | 19 |
Note: Under the free plan, you have the ability to create a maximum of 50 databases, while the unlimited plan allows you to create up to 100 databases.
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 (not available for encrypted-text field and large-text field)
- Mark field as Hidden (not available for encrypted-text field)
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 : " < > .
Default Value
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.
Mandatory Field
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.
Unique 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.
Database Preview
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.