Templates and Datasheets

Within Onirix you can create templates of information, which represent data structures that can be used to display textual content relevant to the user. In addition, each template can be filled with specific information. These are the so-called datasheets. With these functionalities you can create templates, for example, to store information about a file of a business in different fields (Name, description, schedule), or the information of a dish of a restaurant (Name, ingredients, price, allergens ...); but you can even use them to link information from Onirix with information from your own database os backend (my_element_id).

How are Templates & Datasheets related to each other?

Let's say that a Template is the parent that can have multiple children, so the relation between both is 1 to N.

Boot catalog example

One Template can be compossed by several Datasheets (which give value to the fields of the Template for a concrete case), and thus, a Datasheet can only be related with one Template. Here we show you a small example of the use of this relation with a Boot catalog. We can create a Template to include the structure of the information each product of this catalog should have, and then we fill the information for every product.

What are Templates fields?

Fields in Templates are the different elements that will be part of the structure. Each field has to have a name and a concrete type. Onirix provides some fields to create these structures:

  • InputText: any kind of text with limited characters (name, price, email...).
  • TextArea: more extense texts to include further information (descriptions, summaries, etc.)
  • Image: complementary images for the content.
  • Dropdown: list of possible options to select when filling the Template.
  • Checkbox: bi-estate information (active yes/no, available yes/no, etc.).

Here we show you how to create a Template like the one in our previous example:

How are Templates & Datasheets related with other contents?

When you have your Template ready you can associate it with AR content by defining Datasheets in the scene editor. Besides that you can also associate this kind of information also to a container (scene, map); or you can even create what we call Global Datasheets, to be used as general information (for example if you create a trivia game and you want to include general questions to be shown when playing).

Datasheets in AR content: scene editor

Here we show you how to include easily a new Datasheet following our previous example: Regina Boots. We can include this kind of information in the right part of the scene editor, by adding new Datasheets to the asset, and selecting the Template we want:

Datasheets as global content

Let's asume we have created a Template called Trivia Question and we want to include questions there for a future AR game. We can include this kind of information in the Datasheets page as we show here:

Which is the format of Datasheets ?

To send Datahseets from Onirix Studio to the final applications (and also to manage this information with the SDK) we are using JSON format. This way, an example as the one we used with the Trivia Question could have a JSON content like this:

{"oid":"2445c96a447244028a870503b2c48160",
    "name":"New question",
    "content":[
        {"Question":"How many oceans are there in the world?"},
        {"Option A":"5"},
        {"Option B":"7"},
        {"Correct answer":"Option A"}
        ],
    "created":"2019-02-07T13:18:04.000Z",
    "updated":"2019-02-07T13:18:04.000Z",
    "template":{ ... }
}

This Datasheets has an oid (internal id in Onirix), a name, its content (each field separate in an array), and other information (creaiton date, template, etc.). This is the way you can then use all this information with our Onirix SDK to personalize your apps as much as you need.