Data Model
Container Schema
Container schemas are Custom Objects.
- container -
mc-custom-object-schema
- key - String, matching the pattern
[-_~.a-zA-Z0-9]+
- Required - value - Object
- attributes - Array of Attribute - Required
Attribute
- name - String - Required
Displayed in start case in the Custom Object form as form field titles. Saved in schema as kebab case. - type - Type - Required
The type of the attribute. Determines the Custom Object form field input type. - set - Boolean
Flag indicating if the attribute is an array/set. - required - Boolean
Flag indicating if the attribute is required. - display - Boolean
Flag indicating if the attribute should be displayed in the Custom Object List Value column - attributes - Array of Attribute - Required when
type
is Object - reference - Reference - Required when
type
is Reference - enum - Array of Enum - Required when
type
is List (enum) - lenum - Array of LocalizedEnum - Required when
type
is Localized List (enum)
Type
List of available types.
- Text
- Localized Text
- Number
- Boolean
- Money
- Date
- Time
- Date and time
- List (enum)
- Localized List (enum)
- Reference by ID or key
- Object
Reference
- by - Enum (id, key)
- type - ReferenceType
Enum
- value - String - Required
- label - String - Required
The display text.
LocalizedEnum
- value - String - Required
- label - LocalizedString - Required
Example Data
{
"id": "a372c000-9f4c-4b8a-9e13-8d2e64f51bcd",
"version": 1,
"container": "mc-custom-object-schema",
"key": "example-schema",
"value": {
"attributes": [
{
"attributes": [
{
"display": true,
"reference": { "type": "product", "by": "id" },
"required": true,
"set": false,
"type": "Reference",
"name": "product"
},
{ "required": false, "set": true, "type": "String", "name": "text" }
],
"display": false,
"required": false,
"set": false,
"type": "Object",
"name": "object"
},
{
"display": true,
"enum": [
{ "label": "one", "value": "1" },
{ "label": "two", "value": "2" }
],
"required": false,
"set": false,
"type": "Enum",
"name": "list"
},
{
"lenum": [
{ "label": { "de": "one (de)", "en": "one" }, "value": "1" },
{ "label": { "de": "two (de)", "en": "two" }, "value": "2" }
],
"required": false,
"set": false,
"type": "LocalizedEnum",
"name": "localized list"
}
]
},
"createdAt": "2024-01-02T15:25:52.545Z",
"lastModifiedAt": "2024-01-02T15:25:52.545Z",
"lastModifiedBy": {
"isPlatformClient": true,
"user": { "typeId": "user", "id": "a372c000-9f4c-4b8a-9e13-8d2e64f51bcd" }
},
"createdBy": {
"isPlatformClient": true,
"user": { "typeId": "user", "id": "a372c000-9f4c-4b8a-9e13-8d2e64f51bcd" }
}
}
Custom Object
- container - String
The key of a container schema. - key - String, matching the pattern
[-_~.a-zA-Z0-9]+
- Required - value - Object
Dynamically determined based on the schema’s attributes. The object’s keys are the attribute’s name in kebab case.
Example Data
{
"id": "a372c000-9f4c-4b8a-9e13-8d2e64f51bcd",
"version": 1,
"container": "example-schema",
"key": "example-custom-object",
"value": {
"localizedList": "1",
"list": "2",
"object": {
"text": ["hello", "world"],
"product": {
"id": "a372c000-9f4c-4b8a-9e13-8d2e64f51bcd",
"typeId": "product"
}
}
},
"createdAt": "2024-01-02T15:28:57.702Z",
"lastModifiedAt": "2024-01-02T15:28:57.702Z",
"lastModifiedBy": {
"isPlatformClient": true,
"user": { "typeId": "user", "id": "a372c000-9f4c-4b8a-9e13-8d2e64f51bcd" }
},
"createdBy": {
"isPlatformClient": true,
"user": { "typeId": "user", "id": "a372c000-9f4c-4b8a-9e13-8d2e64f51bcd" }
}
}