Home / JSON Structure / uiOptions

uiOptions

{info.fa-info-circle} The examples for uiOptions are just extractions from other schemas for reference only. You cannot just copy and paste the extraction into the empty schema and expect it to fully work.

multiple

Allows to have multiple options in the drop-down list.
Type: boolean.
Default value: false.
Used with uiType: select.

Example

{
"licenseEndorsements": {
  "label": "Endorsements to Licence:",
  "uiType": "select",
  "options": [
    "night flying",
    "floats",
    "commercial atpl",
    "instrument",
    "multi-engine"
  ],
  "uiOptions": {
    "class": "col-3",
    "multiple": true
  }
}
}

visible

Sets the element as invisible.
Type: boolean.
Default value: true.
Used with uiType: All.

Example

{
"ipt12": {
  "label": "ipt",
  "uiType": "number",
  "default": "12",
  "uiOptions": {
    "class": "col-3",
    "icon": "fe fe-percent",
    "readonly": true,
    "visible": false
  }
}
}

permission

Allows to show some elements only for users with specific permissions.
Type: string.
Default value: (empty).
Used with uiType: All.

Example

{
uiOptions: {
  "permissions": {
    "edit": { 
      "only": "master.show"
    },   
    "visible": {
      "except": ["broker.show1"]
    }
  }

class

One of the CSS classes. The following classes are used:

  • col-X, where X is a length of the field. Quote fields are measured in columns, where the max length is 12. Therefore, the field with the CSS class col-12 will take the whole row in a quote. If you need to have 4 fields in the same row, then the CSS class will be col-3.
  • offset-Y-X, where Y is an offset direction (left or right) and X defines how many columns the field will be shifted.
  • align-self-end, alligns a field to the previous field.
    Type: string.
    Default value: (empty).
    Used with uiType: text, textArea, select, tag, date, toggler, radios, heading, money, moneySelect, currency, number, decimal, checkboxes, client, user.

Example

{
"brokerContact": {
    "label": "Broker Contact",
    "uiType": "user",
    "options": "brokers",
    "uiOptions": {
      "class": "col-3",
      "quoteField": "broker_id"
    }
},
"brokerComm": {
    "label": "Broker Commission %",
    "uiType": "decimal",
    "uiOptions": {
      "class": "col-3 offset-right-3"
  }
}
}

classColumn

Controls the width of the whole section.
Type: string.
Default value: (empty).
Used with uiType: section, tableSection, multipleSection.

Example

{
"type": "object",
  "uiType": "section",
  "label": "Submission details",
  "uiOptions": {
    "class": "text-muted",
    "classColumn": "col-lg-6"
}

readonly

Allows to make an element only readable and a user cannot modify it in the quote.
Type: boolean.
Default value: false.
Used with uiType: All, except quote.

Example

{
"grossComm": {
  "label": "Gross Commission %",
  "uiType": "decimal",
  "uiOptions": {
    "class": "col-3",
    "icon": "fe fe-percent",
    "readonly": true,
    "validationRules": [
      "lte:25"
    ]
  }
},
}

disabled

This uiOption does not let you to edit the value in the frontend, it can only be changed in the backend or through an API.
Type: boolean.
Default value: false.
Used with uiType: All, except quote.

Example

{
"properties": {
  "entryDateAddress": {
    "uiType": "googleLookUp",
    "label": "Address",
    "uiOptions": {
      "class": "col-6",
      "disabled": true
    }
  }
}
}

status

Allows to show an element only when the quote is in a particular status. It is required to use such keywords as only and except. Values for these keywords must be provided in an array.
Type: object.
Default value: null.
Used with uiType: All, except quote.

Example

{
"buttonQuotation": {
  "label": "ML Quotation",
  "default": "quotationDoc",
  "uiType": "integrationButton",
  "uiOptions": {
    "icon": "fe fe-file",
    "class": "btn-outline-secondary",
    "status": {
      "only": [
        "indicated",
        "quoted",
        "prepared",
        "bound"
      ]
    }
  }
}
}

required

Makes an element as a required in a quote. In this case, it will have a red asterisk (*) near the element and a quote will not be saved, until that element is used.
Type: boolean.
Default value: false.
Used with uiType: text, textArea, select, tag, date, radios, money, moneySelect, number, decimal, checkboxes.

Example

{
"country": {
  "label": "Country",
  "uiType": "select",
  "default": "Canada",
  "options": [
    "United States",
    "Canada"
  ],
  "uiOptions": {
    "class": "col-3",
    "required": true,
    "readonly": true
  }
},
}

icon

CSS class name for adding an icon to the element. The icons script is taken from here. This script has to be included into the JSON file in the following structure: fe fe-iconName.
Type: string.
Default value: (empty).
Used with uiType: button, integrationButton, number, decimal.

Example

{
"properties": {
  "airports": {
    "label": "Airports",
    "iType": "decimal",
      "uiOptions": {
      "icon": "fe fe-percent"
    }
  },
}

quoteField

Most of the quote forms fields are stored in the quotes.data table. Some of the fields are required to be shown on a quotes list, transfer the value to an invoice, or use in the generic bound revenues calculation. This is when the native quote fields are used. To map the entered value to the native field, in the JSON structure you must define that field in the uiOptions object:
Type: string.
Default value: (empty).
Used with uiType: money, text, number, date.

Example

{
  "policynumber": {
     "label": "Quote number",
      "uiType": "text",
       "uiOptions": {
          "quoteField": "number",
          "readonly": true,
          "class": "col-4"
      }
  }

In this example we see, that the entered quote number will be mapped to the native quote field number.

Native Quote Fields List

Native Quote Field Type Mapping Allowance Description
id uuid RESTRICTED Unique quote identifier.
number string ALLOWED Quote number, generated based on the schema numbering template. It is not recommended to change.
schema_id uuid RESTRICTED Unique schema identifier.
state string ALLOWED Quote state. Not recommended to change if you do not know the complete workflow logic.
type string RESTRICTED Quote type.
status json RESTRICTED Current workflow status.
agent_id uuid ALLOWED Maps the selected agent name from a quote.
creator_id uuid ALLOWED User name who created a quote.
broker_id uuid ALLOWED User from an agent entity.
underwriter_id uuid ALLOWED User from a coverholder entity.
data json RESTRICTED Container for all quote data.
premium number ALLOWED Entered total gross premium.
client_id uuid RESTRICTED Unique client identifier.
client string ALLOWED Client full name or legal entity name.
client_code string ALLOWED Client identification code or entity registration number.
client_tax_id string ALLOWED Client entity tax ID (e.g. VAT).
client_building string ALLOWED Client bulding number.
client_street string ALLOWED Client street name.
client_town string ALLOWED Client town name.
client_county string ALLOWED Client county name.
client_country string ALLOWED Client country name.
client_post_code string ALLOWED Client post code number.
object string ALLOWED Insured object e.g. house address, vehicle registration number.
currency_id string ALLOWED Premium currency code.
valid_date datetime ALLOWED Quote validity date (e.g. 30 days from the creation date).
issue_date datetime ALLOWED Quote issue date.
inception_date datetime ALLOWED Date of quote inception/start of cover.
expiry_date datetime ALLOWED Date of quote expiry/end of cover.
version_expired_date datetime ALLOWED
termination_date datetime ALLOWED Quote termination/cancel date.
created_at datetime RESTRICTED Quote creation date.
updated_at datetime RESTRICTED The last time when the database was updated.
is_renewable bool ALLOWED States if the quote is possible to renew. Default value is true.
workflow_id uuid RESTRICTED Unique identifier of a workflow, related to a quote. Might be null if no workflow is needed.
renewed_id uuid RESTRICTED Unique identifier of a renewed quote. If the field value is null, then the quote is not renewed yet.
sequence integer ALLOWED Sequence number of a quote.
version integer ALLOWED Quote version number.
remote_folder string RESTRICTED Name of folder in OneDrive.
meta json RESTRICTED Additional information about a quote, e.g. if a section is expanded or collapsed, etc.
policy_reference uuid RESTRICTED Unique policy identifier.

datamask

Defines the specific data entry format in the field. For more information see here Type: string.
Default value: (empty).
Used with uiType: text, textArea, number, date.

No example available.

regex

Allows to introduce a rule to the text field, so that the user types in the correct information. If the data does not match with the backend, then an error is displayed.
Type: string.
Default value: (empty).
Used with uiType: text, textArea.

Example

{
  "website": {
  "label": "Website address",
  "uiType": "text",
  "uiOptions": {
    "class": "col-3",
    "regex": "  ",
    "placeholder": "www.example.com"
  }
},
}

placeholder

A hint for the field, which shows an example of what should be entered. Type: string.
Default value: (empty).
Used with uiType: text, textArea.

Example

{
"website": {
  "label": "Website address",
  "uiType": "text",
  "uiOptions": {
    "class": "col-3",
    "placeholder": "www.example.com"
  }
}
}

showTime

Allows to set the time. Type: boolean.
Default value: false.
Used with uiType: date.

Example

{
"entryDate": {
  "label": "Entry Date",
  "uiType": "date",
  "uiOptions": {
    "showTime": true,
    "readonly": true,
    "class": "col-4",
    "quoteField": "issue_date"
  },
  "uiRules": [
    {
      "trigger": "onLoad",
      "action": "setToday",
      "target": "quote.entryDate"
    }
  ]
}
}

togglable

Allows to enable or disable the whole section.
Note: If the section is disabled and has mandatory fields, then the system will not require to fill them.
Type: string.
Default value: disabled.
Used with uiType: section, multipleSection, tableSection, tabSection.

{
"type": "object",
  "uiType": "section",
  "label": "Submission details",
  "uiOptions": {
    "togglable": true
  },
  "properties": {
    "professionalLiability": {
      "label": "Professional Liability",
      "uiType": "money",
      "default": "100000",
      "uiOptions": {
        "class": "col-6"
      }
    }
  }
}

collapsable

This uiOption makes a section minimised by default. If required, user can expand this section in a quote.
Type: string.
Default value: expanded.
Used with uiType: section, multipleSection, tableSection, tabSection.

Example

{
  "type": "object",
  "uiType": "section",
  "label": "Risk Assessment",
  "uiOptions": {
    "collapsable": "collapsed"
  }
}
}

quoteCurrency

Disables the selection of a currency in a field and uses the default one.
Type: boolean.
Default value: false.
Used with uiType: money, moneySelect.

Example

{
  "type": "object",
  "uiType": "section",
  "label": "Risk Assessment",
  "uiOptions": {
    "collapsable": "collapsed"
  }
}

precision

Defines how many decimal places should be shown for the value.
Type: number.
Default value: 0.
Used with uiType: money, moneySelect.

Example

{
  "type": "object",
  "uiType": "section",
  "label": "uiType - money",
  "properties": {
    "moneySelect": {
      "label": "Money and selectable currency",
      "uiType": "moneySelect",
      "default": "100",
      "uiOptions": {
        "class": "col-4",
        "precision": 2,
        "quoteCurrency": true
      },
    }
  }
}

policyWriteableField

This uiOption allows the field to appear only when the policy is created.
Type: boolean.
Default value: false.
Used with uiType: policyNumber.

Example

{
"policyNumber": {
  "label": "Policy Number",
  "uiType": "policyNumber",
  "uiOptions": {
    "class": "col-3",
    "quoteField": "policy_number",
    "policyWritableField": true,
    "status": {
      "only": [
        "bound",
        "issued",
        "cancelled"
      ]
    }
  }
}
}

min

Limits the lowest possible value for the field. If you enter a smaller number, then after saving the quote number will be automatically changed to the default minimum.
Type: number, decimal.
Default value: null.
Used with uiType: money, moneySelect, number, decimal.

Example

{
"premium": {
  "label": "Premium",
  "uiType": "money",
  "uiOptions": {
    "class": "col-6",
    "min": 20,
    "max": 500
  }
},
}

max

Limits the highest possible value for the field. If you enter a bigger number, then after saving the quote number will be automatically changed to the default maximum.
Type: number, decimal.
Default value: null.
Used with uiType: money, moneySelect, number, decimal.

Example


{
"premium": {
  "label": "Premium",
  "uiType": "money",
  "uiOptions": {
    "class": "col-6",
    "min": 20,
    "max": 500
  }
},
}