Collections
Last updated
Last updated
Collections are containers of data very similar to a table in a standard database. The main difference is that a collection has no real structure and can contain records with wildly different fields and content. The basic format of a single collection record is a JSON document.
A new collection can be created by using the Add New Collection button you may see in the Database section of your account.
Each collection is built around the parameters detailed below.
This is the name of the collection. It is the name that you will later use inside the designer or in API calls to refer to the collection. Collection names can be whatever you prefer but cannot contain the following characters: (space), (tab), ., $, \ or /. If any of these characters is found in the collection name, it will be replaced by an underscore (_). Also, collection names cannot be longer than 64 characters.
Once assigned, the collection name cannot be changed.
Collection Description is a pure descriptive field that can contain any kind of information you may find useful.
If enabled, this flag will allow access to this collection through Xenioo REST API interface which in turn enables integrations with external custom applications and tools. If this flag is disabled, this collection may only be accessed from the chatbot itself or from the administration interface.
This list contains all of the view fields you wish to define. As stated earlier, collections are not bound to a pre-defined structure like you may find in standard database tables but can contain arbitrary, unstructured data. Still, inserting and viewing records may prove much easier if the general fields you associate with the current collection are defined here. Fields defined in this list are later used by Xenioo to dynamically display collection data and to dynamically build an update/insert form that can be used to manage data directly.
Collection Fields are a way to define view fields in the Xenioo Table and Form view and do not enforce collection contents in any way. Using Xenioo Actions or API or even inserting full JSON you can still add to the collection whatever model you desire. Deleting an existing field from this list will not delete anything from your existing collection like it would happen with a typical relational table-based database.
Field group defines the tab name under which the field will be rendered when editing or inserting an item of the collection. All fields with the same Field Group will be rendered under the same tab page.
Field name refers to any field of your Collection model. If the field does not exist an empty column and an empty field will be show. When inserting or updating a record if the field does not exist it will be added dynamically to your document.
Field Names are forcefully converted to lowercase when the collection is saved. Any special character will also be transformed into an underscore character.
You can choose from here the way Xenioo will render the field in the edit/insert dialog. Different fields are available that can make managing your collection much easier.
You can set here the default value the field should have when a new documents created. If you are creating a Multiple Choice field you can set here all options, separated by a semicolon.
If enabled, Xenioo will require the field to be filled when editing or inserting a document.
If enabled, the field will be displayed in the tabular data view of the collection.
Once created, collection data can be added, edited or deleted in multiple ways depending on your requirements:
Using a very basic CSV structure data can be imported into a Collection.
By using View Fields defined in the collection, Xenioo is capable of creating a custom edit and insert form on the fly that can be used to quickly access your data. Pure JSON access is also available for a more finetuned control over you documents.
Using Actions and Operations designed to handle database operations you can handle dynamic data directly in your chatbot flow. A full set of scripting functions can also be used to access your collections data from Xenioo Cloud Scripting.
If you have external tools and custom applications that require access to your chatbot data collections you can integrate Xenioo Database API Interface.
There are no actual limits to the number of collections each chatbot can have and to the number of records that each collection can contain.
Collection table view, accessible by clicking on the View Data button of a collection will display a maximum of 1024 documents. This is a query/visualization limit that is not imposed on the actual data container that has no technical limit on the number of documents.
Different operations may increase your action messages count according to the following table:
Operation
Create Collection
1 Message
Query Collection Entities
1 Message, regardless of records
Delete
1 Message, regardless of records
Insert/Update
1 Message
1 Message, regardless of records
1 Message every 20 records
1 Message every 10 records