Socotra Core allows customers to create unique configurations of their product domains. This flexibility requires app developers either build a unique application per Socotra Core tenant to work with such custom products in tenants or make applications configurable by customers in runtime.
Product fields are a way to connect application needs and Socotra tenants configurations. They designed to solve this issue in a following way:
Product field mappings are configured in socotra-app.json
manifest file at the following path
{
"name": "org-name/app-name",
"version": "0.0.1",
"socotra": {
"fields": [
// Collection of mapping field objects
]
}
}
Each entry in mapping field objects collection is a json object with following properties.
name
string (required) - Property which defines field name and, thus, a key in a map that will be used by app to retrieve mapping expression, configured by customer.
title
string (required) - Description of a mapping field for configuration step.
required
boolean (optional) - A flag which indicates whether application strictly requires this field to be configured by a customer or not.
hint
string (optional) - Optional text which can be used to explain details or give more context to customer, in addition to Title.
Example:
{
"name": "org-name/app-name",
"version": "0.0.1",
"socotra": {
"fields": [
{
"name": "policy-holder-name",
"title": "Policyholder name",
"required": true,
"hint": "Account Policyholder name"
},
{
"name": "vehicle-make",
"title": "Vehicle Make",
"required": true,
"hint": "Manufacturer of a vehicle"
},
{
"name": "vehicle-model",
"title": "Vehicle Model",
"required": false,
"hint": "Model of a vehicle"
},
{
"name": "vehicle-year",
"title": "Vehicle year",
"hint": "Year in which vehicle was manufactured"
}
]
}
}