Structuring your JSON Definition File

Description of information constituting the Definition File

To create a Custom Table of your Data Model, it will be necessary to define its structure through a JSON file.

This JSON file must contain a wide range of information. Some of these pieces of information are mandatory, others are optional. Moreover, they might have to follow specific criteria, either for their type or for possible values.

Parameters used to define the identity of your table (display and technical name, entity,...) can be specified directly, while parameters defining the behavior of your table will be structured as arrays.

The table below provides comprehensive explanations about the various parameters constituting your JSON file.

Parameter description table

Parameter

Explanation about expected information

Type

Mandatory or Optional ?

Further comments and constraints

id

ID for this table

String

Optional

If empty, ACTITO will automatically generate this ID

businessKey

Name of the attribute which identifies the primary key of the table

String

Mandatory

This attribute must be found in the definition file. This field must be unique and Mandatory.

technicalName

Technical name of the table, used for any reference to this table (e.g. when exporting)

String

Mandatory

Max. number of caracters: 64

userName

Name given to the table, which will be used in the interface

String

Optional

If empty, technicalName will be used by default in the interface

prettyNameExpression

Display name of the data source

String

Optional

Only for 'Repository' tables

entityName

Name of the entity to which the table belongs

String

Mandatory

 

Illustration des paramètres d'identification
"id" (string, optional): " ",
"businessKey" (string): " ",
"technicalName" (string): " ",
"userName" (string, optional): " ",
"prettyNameExpression" (string, optional): " ",
"entityName" (string): " ",
capabilityDTOs

Mandatory

 

Type(s) of capabilities granted to the table. See page 'Understanding Table Capabilities' for a detailed explanation of this parameter.

 

name

Name of the capability granted to your table

 

 

Possible values:

"Lookup table",

"EventGeneratedTable",

"Interaction",

"ProfileData"

Illustration capabilityDTOs
"capabilityDTOs" (Array[Capability], optional):
[
{
"name" (string): " 'LookupTable' , 'EventGeneratedTable', 'Interaction' , 'ProfileData' "
}
],
defaultFetchingParameters

Optional

 

It is possible to specify how the table data will be sorted by default. This will influence the customization of messages when the 'default mode' is chosen as customization source (e-mail or SMS).

 

keyAttribute

Name of the field on which the sorting will be done

String

Optional

 

 

ascending

Sorting order: Ascending or Descending

Boolean

Optional

"False" means Descending order and is the default value

 

sortingKey

Name of the attribute used as sorting criterion

String

Optional

 

 

maxNumberOfRecords

Maximum number of record entries given

Long

Optional

The default value is 1

Illustration defaultFetchingParameters
"defaultFetchingParameters" (Array[FetchingParameters], optional):
[
{
"keyAttribute" (string, optional): " ",
"ascending" (boolean, optional): ,
"sortingKey" (string, optional): " ",
"maxNumberOfRecords" (long, optional):
}
],
emails

String

Optional

 

List of e-mail addresses to which technical reports will be sent (errors, warnings,...)

Illustration emails
"emails" (Array[string], optional):
fields

Mandatory

 

Enumeration of attributes created in this table

 

objectType

Mandatory value to identify the type of object

String

Mandatory

Only possible value: ['SIMPLE']

 

fieldName

Name of the attribute

String

Mandatory

Several technical words are reserved and cannot be used as "fieldName".

Download the list of reserved words

 

columnName

Technical value

String

Mandatory

The value should be equal to the "fieldName"

 

userName

Display name of the attribute in ACTITO

String

Mandatory

If empty, the "fieldName will be used

 

type

Type of the attribute

String

Mandatory

Possible values: STRING”,”INTEGER”,”BOOLEAN”,”DATE”,”TIMESTAMP”,”NUMERIC”, ”LONG”

 

extended

Indicates if the attribute is an ID of ‘LookUp’ table (the ID will be replaced)

Boolean

Optional

  • Only for "Repository" Tables

  • The default value is "False"

  • If value is ‘True’, you should put a ‘DATA_SOURCE_LINK' whose sourceFieldName will be this field

 

required

Indicates if the attribute is mandatory

Boolean

Optional

  • The default value is "False"

 

unique

Indicates if the attribute is unique

Boolean

Optional

  • The default value is "False"

A unique field will be automatically indexed

 

indexed

Indicates if the table is indexed on this attribute

Boolean

Optional

  • The default value is "False"

 

cacheIndexed

Provides a drop down list of possible inputs

Boolean

Optional

  • The default value is "False"

Only available for attributes with the 'STRING' type

Max. 10 000 possible values

 

description

Attribute description

String

Optional

 

 

possibleValues

Enumeration of possible values

String

Optional

 

 

valueDisplayer

 

 

Optional

 


It is possible to request a type matching predefined attributes in ACTITO

 

 

displayerType

Name of the ACTITO displayer enabling the rendition of the field

String

Optional

Possible values: ‘CivilState’, ’PersonTitle’, ’Gender’, ’Country’, ’Language'


typeValidator

 

 

Optional

 

 

It is possible to request a type matching predefined attributes in ACTITO

 

 

objectType

Name of the validator used to ensure data consistency

String

Optional

Possible values:‘EMAIL_ADDRESS’, ’SEX’, ‘COUNTRY’, ’LANGUAGE’, ‘PHONE_NUMBER’, ‘CIVIL_STATE’, ‘PERSON_TITLE’, ’STRING_LENGTH’

 

 

minCharacters

Minimum numbers of characters

Long

Optional

Only if objectType = ’STRING_LENGTH’

 

 

maxCharacters

Maximum numbers of characters

Long

Optional

Only if objectType = ’STRING_LENGTH’

Illustration fields
"fields" (Array[PropertyWithInfoDTO], optional):
[
{
"cacheIndexed" (boolean, optional): ,
"columnName" (string): ,
"type" (string) : "STRING","INTEGER","BOOLEAN","DATE","TIMESTAMP","NUMERIC","LONG"
"extended" (boolean, optional): ,
"fieldName" (string): " ",
"indexed" (boolean, optional): ,
"objectType" (string): "SIMPLE",
"required" (boolean, optional): ,
"unique" (boolean, optional): ,
"userName" (string, optional): " ",
"possibleValues": (Array [String]) : ,
"description": (string, optional): " ",
"valueDisplayer" (ValueDisplayerDTO, optional) : ,
{
"displayerType" : "CivilState","PersonTitle","Gender","Country","Language"
}
,
"typeValidator" (AdvancedTypeValidator, optional) :
{
"objectType" : "EMAIL_ADDRESS","SEX","COUNTRY","LANGUAGE","PHONE_NUMBER","CIVIL_STATE","PERSON_TITLE","STRING_LENGTH"
"minCharacters" (long, optional): ,
"maxCharacters" (integer, optional): : ,
}
}
],
layout

Optional

 

Layout of the table preview

 

details

 

 

Optional

 

 

sections

 

 

 

Optional

 

 

 

fields

 

String

Optional

 

 

 

name

Section name

String

Mandatory

 

 

list

 

 

Optional

 

 

 

fields

Fields names

String

Optional

 

This is where you should provide the list of attributes in the interaction summary, in the profile file (profile interaction tab)

Illustration layout
"layout" (Layout, optional):
{
"details" (Details, optional):
{
"sections" (Array[Section], optional):
[
{
"fields" (Array[string], optional): " ",
"name" (string): " "
}
]
}
,
"list" (FieldList, optional):
{
"fields" (Array[string], optional):
}
}

Optional

 

definition of the link between this table and other tables (Profile tables or Repository tables)

 

constraintType

Behavior of the link when a profile is deleted

String

Optional

  • If link to a profile table, only one possible value: ‘onDeleteCascade ’ (meaning the table entries will be deleted if the profile is deleted)

  • No default value

  • Possibles values: "none", "onDeleteCascade", "onDeleteSetNull"

 

linkName

Name given to the link

String

Mandatory

 

 

objectType

Type of the linked table

String

Mandatory

Possible values: 'PROFILE_LINK', 'DATA_SOURCE_LINK'

 

sourceFieldName

Name of the attribute in the source table

String

Mandatory

This attribute must be present in the definition file. This attribute is mandatory and must be ‘indexed’.

sourceFieldName and targetFieldName must share the same type.

 

targetFieldName

Name of the attribute in the linked table

String

Mandatory

  • If link to a table profile: should reference the businessKey or profileID

  • If link to a repository table: should reference the businessKey

 

targetedEntityName

Entity in which the table is

String

Optional

 

 

targetedProfileTableName / targetedDataSourceName

Name of linked table (profile or others)

String

Mandatory

  • if ObjectType = 'PROFILE_LINK’ Name of the profile table

  • if ObjectType = 'DATA_SOURCE_LINK' Table name

  • These properties are exclusive.

Illustration links
"links" (Array[SimpleLinkDTO], optional):
[
{
"constraintType" (string, optional): "none","onDeleteCascade","onDeleteSetNull",
"linkName" (string): " ",
"objectType" (string): "PROFILE_LINK","DATA_SOURCE_LINK",
"sourceFieldName" (string): " ",
"targetFieldName" (string): " ",
"targetedEntityName" (string, optional): " ",
"targetedProfileTableName" / "targetedDataSourceName" (string): " "
}
],
tableEventDefinitions

 

 

Optional

Mandatory for ‘Interaction ’ table if you want to do scenarios.

Only for "Interaction" tables:

This allows you to define ‘actions’ stored in this table which must trigger an event used in ACTITO scenarios

 

technicalName

Technical name of this event

String

Mandatory

 

 

userName

Display name of this event (as it will appear in ACTITO)

String

Optional

If empty, the technical name will be used by default

 

tableEventConditionDefinitionDTOs

 

Optional

 

 

 

afterPredicate

 

 

 

 

 

 

beforePredicate

 

 

 

 

 

 

type

Type of action which will create an action in ACTITO

String

Mandatory

  • Valeurs possibles : ‘CREATE’, 'UPDATE'

  • At least include one ‘CREATE’ event

Illustration tableEventDefinitions
"tableEventDefinitions": [
{
"technicalName": "testEvent",
"userName": "testEventDisplayName",
"tableEventConditionDefinitionDTOs": [
{
"type": "CREATE"
}
]
}
]

Illustration of a complete JSON file

The file below provides an illustration of the format taken by a file containing every possible parameter, alongside the expected values.

Visual illustration of a JSON definition file
{
"id" (string, optional): " ",
"businessKey" (string): " ",
"technicalName" (string): " ",
"userName" (string, optional): " ",
"prettyNameExpression" (string, optional): " ",
"entityName" (string): " ",
"capabilityDTOs" (Array[Capability], optional):
[
{
"name" (string): " 'LookupTable' , 'EventGeneratedTable', 'Interaction' , 'ProfileData', 'MultipleTargetingAllowed' "
}
],
 
"defaultFetchingParameters" (Array[FetchingParameters], optional):
[
{
"keyAttribute" (string, optional): " ",
"ascending" (boolean, optional): ,
"sortingKey" (string, optional): " ",
"maxNumberOfRecords" (long, optional):
}
],
 
"emails" (Array[string], optional):
 
"fields" (Array[PropertyWithInfoDTO], optional):
[
{
"cacheIndexed" (boolean, optional): ,
"columnName" (string): ,
"type" (string) : "STRING","INTEGER","BOOLEAN","DATE","TIMESTAMP","NUMERIC","LONG"
"extended" (boolean, optional): ,
"fieldName" (string): " ",
"indexed" (boolean, optional): ,
"objectType" (string): "SIMPLE",
"required" (boolean, optional): ,
"unique" (boolean, optional): ,
"userName" (string, optional): " ",
"possibleValues": (Array [String]) :
"description" (string, optional): " ",
"valueDisplayer" (ValueDisplayerDTO, optional) : ,
{
"displayerType" : "CivilState","PersonTitle","Gender","Country","Language"
}
,
"typeValidator" (AdvancedTypeValidator, optional) :
{
"objectType" : "EMAIL_ADDRESS","SEX","COUNTRY","LANGUAGE","PHONE_NUMBER","CIVIL_STATE","PERSON_TITLE","STRING_LENGTH"
"minCharacters" (long, optional): ,
"maxCharacters" (long, optional): : ,
}
}
],
"layout" (Layout, optional):
{
"details" (Details, optional):
{
"sections" (Array[Section], optional):
[
{
"fields" (Array[string], optional): " ",
"name" (string): " "
}
]

Field types

Depending on their types, the fields must follow specific constraints:

  • STRING: string of characters [a-z, A-Z, 0-9]

    • the default max number of characters for a STRING type is 255. It can be modified with a "typeValidator" parameter (see table above)

  • INTEGER:

    • this type is depreciated but remains allowed in a table definition. It will be automatically transformed in type LONG

    • no space, dot or comma

    • maximum value: 2147483647

    • minimum value: -2147483647

  • LONG:

    • maximum value: 2147483647

    • minimum value: -2147483647

    • no space, dot or comma

  • BOOLEAN: match one of the following values “true” or “false”

  • DATE: string of characters matching one of the following formats:

    • YYYYMMDD

    • YYYY-MM-DD

    • dd/MM/yyyy

  • TIMESTAMP: string of characters matching one of the following formats:

    • YYYYMMDD *

    • YYYY-MM-DD *

    • dd/MM/yyyy *

    • YYYYMMDDhhmmss

    • YYYY-MM-DD hh:mm:ss

    • dd/MM/yyyy HH:mm:ss

    • MM/dd/yyyy hh:mm:ss AM|PM

* if no values are specified for "hhmmss", the values "00:00:00" will be added

  • NUMERIC:

    • separator must be '.'

    • no character amount limit

Good to know

In addition to general types, there are advanced types for specific fields, in order to ensure their format to match the format expected by ACTITO.

These are the following types: "EMAIL_ADDRESS","SEX","COUNTRY","LANGUAGE","PHONE_NUMBER","CIVIL_STATE". The syntax required for theses types is detailed in the "Using Predefined Attributes" page.

To make sure that fields of your table match one of these types, you will have to specify it in the "objectType" parameter.