Skip to main content

Creating a Custom Table

To create a 'Custom Table' of your data model, go to the 'Tables data structure' (Catalog > Data > Tables data structure)

Tables data structure

tip

It is also possible to directly create a table from the Datamart Studio, via the top right button.

Shortcut

To begin, click on the 'Create table' button.

Create table

There are two options available:

  • Creating a table from a template
  • Create your own table structure

1. Creating a table from a template

Choosing the template

The 'Create table' button will lead you to a page divided into three tabs representing each type of table.

Choosing the template

From each tab, you will be able to choose among one or more templates provided by Actito.

  • The Event and Simple orders templates for Interactions tables
  • The Children, Loyalty, Sponsorship and Vouchers templates for Linked Data tables
  • The Company, Product catalog, Stores and Subscription catalog templates for Repository tables
  • The e-Retail, Retail and Subscription orders templates for Multi-tables

For more information about the predefined fields and the use cases of each template, please read the page on 'Using a JSON Template'.

Creating the table

Choose your template, then click on 'Select'.

By default, the table will take the name of the template, but you can choose to rename it.

For Interactions and Linked Data templates, you will have to select the profile database to which the table must be linked.

Click on 'Save' and the table will be created immediately. It will use the technical attribute 'profileId' as link with the profile database.

General Data

For Repository templates, the link with the profile table must be made afterwards (see below).

Linking a Repository table to a profile table

In order to build this link, it is necessary to add a new attribute in your profile table (to do so, please read 'Adding an Attribute to the Profile Table')

At the second step (Value type), select the 'Datamart' button as Restriction type in the Value restrictions section.

You will be able to select your Repository Custom Table in the drop down menu.

Linking a Repository table to a profile table

Follow up with the attribute creation to confirm this link.

In the profile file, the value taken by this attribute will be the primary key used to identify an entry of the Repository table ('businessKey').

2. Creating your own table structure

Actito allows you to define the structure of your table yourself. The creation of your custom table is done through a definition file.

The definition file used to create a 'Custom Table' is a JSON file ('example.json'), which is a text file containing a JSON.

Good to know

JSON is a data format which allows you to represent structured information (like XML)

Any creating or modification of a Data Model table must necessarily be done in this format.

If you are not familiar with this format, it is possible to validate your code with the help of the following website: https://jsonlint.com/

To create your own table, your JSON file must be created beforehand.

Click on 'Create Table', then choose the option 'Import a JSON', available in every tab, next to the templates.

The tab from which you import the JSON does not matter: the type of table must be determined by the file structure.

Import a JSON

Click on 'Select' to open a modal window. You will be invited to upload a JSON file prepared beforehand.

Choose file

Components of the 'Definition File'

To create your 'Custom Table', you will need to provide a JSON 'Definition File' which will contain the following pieces of information:

  • The type of table: Interaction, Profile Linked Data or Repository. The type of table determines its behavior. For additional information about them, we invite you to read the page 'Understanding the Different Types of Tables'.
  • The link between this Custom Table and its ‘mother’ Table (Profile or other Custom Table)
  • The different fields of this Custom Table, their type and their specific parameters (such as for the creation of Profile Table attributes)

Some of these pieces of information are mandatory, others are optional. Moreover, they might have to follow specific criteria.

For additional information about these types and the criteria specific to each of these fields, we invite you to read the 'Structuring your JSON Definition File' page.