Collections

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.

Creating a new collection

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.

Collection Name

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

Collection Description is a pure descriptive field that can contain any kind of information you may find useful.

Enable API Access

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.

Collection Fields

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.

Please note that collection fields are just a direct reference to a field inside the Xenioo collection document and may not reflect the actual JSON representation of the record. Likewise, removing a field or changing the field name does not affect the real contents of the collection like a in a typical relational table structure.

Field Group

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

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.

Value Edit Mode

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.

Default Value Or Source

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.

Mandatory

If enabled, Xenioo will require the field to be filled when editing or inserting a document.

Display in View

If enabled, the field will be displayed in the tabular data view of the collection.

View Fields 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.

Managing Collection Data

Once created, collection data can be added, edited or deleted in multiple ways depending on your requirements:

Importing from a file

Using a very basic CSV structure data can be imported into a Collection.

Dynamically editing data or using pure JSON

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.

From your online chatbot flow using both Actions and Cloud Scripting

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.

Using Database API Interface

If you have external tools and custom applications that require access to your chatbot data collections you can integrate Xenioo Database API Interface.

Limits And Counters

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:

Last updated