Datalayers

With a datalayer, you specify how to edit a datastore and how to use it.

In the general settings, datalayers are created and maintained.

Existing datalayers are visible on this tab. For each datalayer, you will see the following information:
  • name datalayer

  • creation date

  • date when the definition or content of the datalayer was last modified.


Click the '+ Add' button to add a new datalayer.

The datalayer can be edited and duplicated by clicking on the gear icon.

Please note: that when copying a datalayer, the options are not included, they must be reselected.


Add

Fill in all fields to add a datalayer.


Definition

Give the datalayer a unique name and a description.

Select the desired datastore from the dropdown menu.


Create

Defining the columns lets you choose what information from the datastore will be used in this datalayer.

Creating a column can be done by selecting the desired value from the dropdown.
If desired, it is possible to customize the name of the label.


Edit

The columns can be changed via the edit icon.


Options

This section allows managing which functionalities are available.
  • Add and update:

    This option updates records in the underlying datastore, if the key is present. If it is not, a new record is created.

  • Delete:

    With this option, records in the underlying store are deleted, if the key is present

  • Merge:

    With this option, the underlying datastore is compared with the supplied data. Records that do not exist in the datastore are created, records that exist are updated, and records that are missing from the supplied data are removed from the datastore.



Flowbuilder

With the Flowbuilder option you specify whether the datamart is available in the flowbuilder.


Key API

The 'Key API' option generates a record based on a key.
Please note: Keep the Security Key secret.

It is possible to renew the Security Key.
Please note: When renewing, the links based on the old Security Key will no longer work.

EXAMPLE

Give access to online content based on a product key

Create a datamart that contains all subscriptions. This datamart then contains, for example, the following data:

  • subscription number

  • customer number

  • product code

On this datamart, 2 keys are defined: subscription number and customer number. The user logs in to the website. After a successful login, the customer number is known. The website then calls the Key API of this datamart and passes the customer number as the key. The API then returns all records from the datamart belonging to this key (customer number). For example, PRODUCT A and PRODUCT C. Based on this information, the website only allows the logged-in user to access these products.



Dataset API

With the 'Dataset API' option, a the complete dataset is returned.

EXAMPLE

Unlocking a complete datamart for reporting or analysis

Create a datamart that includes all clients including the desired KPIs per year, such as revenue, number of transactions, average revenue, etc. This datamart can look like this:

  • customer number

  • year

  • sales

  • number ofTransactions

  • averageSales

Make a connection to the API of this datamart via Power BI or another reporting tool to create the dashboard.


API key
To use this API, authentication is required via an Authorization header with a Bearer token. This must be added in the HTTP request. For example: Authorization: Bearer b383ebef-3456-491c-ae14-9a6ec91e9d2c

Field names
When calling a datalayer via an API, you can now specify the casing of the field names via a parameter:
  • pascalcase (camelCase); where spaces are replaced by an uppercase letter

  • snakecase (snake_case); where spaces are replaced by a dash (_)

  • kebabcase (kebab-case); where spaces are replaced by a middle dash (-)

  • Default; which returns the field names as they are.



Page size
The page size can be specified, any value from 20 to 100000 (100k) is accepted.
Example URL: https://campaign3-datamart-api.ternairsoftware.com/e81c3378-0006-444c-bda3-d0e5f348f077/data?page=1&resultformat=json&fieldnames=pascalcase&pagesize=100
When you have defined everything, save the datalayer by clicking the 'Save' button.

Here you can find the documentation about the Ternair System datamart API.

Delete
Please note: If you delete the datalayer, all processes that use this datalayer (selection and APIs) will return an error message. This action cannot be undone.


Authorizations

It is possible to assign access rights to the datalayer via the authorizations in the general settings. If access to the datalayer is disabled for a user group, it is not possible for users to access the selection.

Video



Copyright © 2025 Ternair.