Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

This document tries to explain the Schema field types and the different properties that are unique to some of these field types.

Content schema is used to explain the fields in this document.

URL

This field will take the URL as input.

{
            "type": "String",
            "fieldType": "url",
            "ref": "",
            "options": [],
            "multiple": false,
            "validation": [
                {
                    "required": false
                }
            ],
            "isDefault": false,
            "label": "Place your URL",
            "key": "testurl"
}

The field label will turn red if a URL is not entered in this field.

Text

This field is used for entering the text values.

{
            "type": "String",
            "fieldType": "text",
            "ref": "",
            "options": [],
            "multiple": false,
            "validation": [
                {
                    "required": false
                    //"maxlength": 250
                }
            ],
            "isDefault": false,
            "label": "Place your text",
            "key": "testtext"
}

[Optional] You can set the maxlength property under the validation array. This will make the field label turn red if you enter more than the maxlength number of characters.

Textarea

This field will display a text box. You also see the number of characters this textbox can take on the bottom right corner. You cannot add more than the maxlength number of characters.

{
            "type": "String",
            "fieldType": "textarea",
            "ref": "",
            "options": [],
            "multiple": false,
            "validation": [
                {
                    "required": true,
                    "maxlength": 250
                }
            ],
            "isDefault": false,
            "label": "Place your text in the area",
            "key": "testtextarea"
}

The maxlength is a mandatory property for textarea fieldType.

Rich Text

Use this field type to enable the formatting of the text entered.

{
            "type": "String",
            "fieldType": "richtext",
            "ref": "",
            "options": [],
            "multiple": false,
            "validation": [
                {
                    "required": false
                }
            ],
            "isDefault": false,
            "label": "Place your rich text here",
            "key": "testrichtext"
}

Media Embed

Use this option to Embed media content or Insights Dashboards and so on.

The Embed field in Edit mode.

The Embed field in View mode.

{
            "type": "String",
            "fieldType": "embed",
            "ref": "",
            "options": [],
            "multiple": false,
            "validation": [
                {
                    "required": false
                }
            ],
            "isDefault": false,
            "label": "Embed your file here",
            "key": "testembed"
}

File

Use this field type to allow uploading files.

File upload in Edit mode.

File upload in view mode.

Click on the Browse button.

Choose a file/image or click on Upload to upload your own file.

After selecting the file/image of your choice. Click on the OK button.

{
            "type": "String",
            "fieldType": "file",
            "ref": "",
            "options": [
                {
                    "multiple": "true"
                },
                {
                    "removeAfterUpload": true
                },
                {
                    "mimeTypes": [
                        "image",
                        "application"
                    ]
                }
            ],
            "multiple": false,
            "validation": [
                {
                    "required": true
                }
            ],
            "isDefault": false,
            "label": "Upload your file here",
            "key": "testfile"
        },

The options array has the multiple, removeAfterUpload, and mimeTypes properties.

Property

Description

"multiple": "true"

Allows you to upload multiple files and previews it. Both multiple properties should be true for this.

"removeAfterUpload": true

Removes the local copies of the uploaded files.

"mimeTypes": [
"image",
"application"
]

The mime type defines the type of file that is getting uploaded.

The mime types can be audio, video, text, image, application, and font.

Date

Use this field type for the Date picker widget.

{
            "type": "String",
            "fieldType": "Date",
            "ref": "",
            "options": [],
            "multiple": false,
            "validation": [
                {
                    "required": false
                }
            ],
            "isDefault": false,
            "label": "Place your Date here",
            "key": "testdate"
}

DateTime

Use this field type for the Date and Time picket widget.

{
            "type": "Date",
            "fieldType": "datetime",
            "ref": "",
            "options": [],
            "multiple": false,
            "validation": [
                {
                    "required": true
                }
            ],
            "isDefault": true,
            "label": "Place your Time here",
            "key": "testdatetime"
}

Checkbox

Use this field type to display checkboxes.

{
            "type": "Object",
            "fieldType": "checkbox",
            "ref": "",
            "options": [
                {
                    "value": "Choice 1",
                    "key": "choicekey1"
                },
                {
                    "value": "Choice 2",
                    "key": "choicekey2"
                }
            ],
            "multiple": false,
            "validation": [
                {
                    "required": false
                }
            ],
            "isDefault": false,
            "label": "Select multiple choices from the dropdown",
            "key": "testcheckbox"
}

You can add the checkboxes to the options array.

Each choice will have a Key and Value.

  • The key is the unique representation of the choice and

  • the Value is the Display text of the choice.

Dropdown

This field type will display options in a dropdown.

{
            "type": "Object",
            "fieldType": "select",
            "ref": "",
            "options": [
                {
                    "value": "Select 1",
                    "key": "selectkey1"
                },
                {
                    "value": "Select 2",
                    "key": "selectkey2"
                }
            ],
            "multiple": false,
            "validation": [
                {
                    "required": false
                }
            ],
            "isDefault": false,
            "label": "Select a choice from the dropdown",
            "key": "testselect"
}

You can add the choices to the options array.

Each choice will have a Key and Value.

  • The key is the unique representation of the choice and

  • the Value is the Display text of the choice.

If you choose “multiple”: true, then you can select multiple items from the dropdown.

SSML

The SSML field type displays the voice tab of the multi-modal content editor. You can use this field type to change the voice output. Refer https://orbita.atlassian.net/wiki/spaces/OCS/pages/7538212/What%2Bis%2Bthe%2BMultimodal%2BContent%2BEditor#Voice-Tab

{
            "type": "String",
            "fieldType": "ssml",
            "ref": "",
            "options": [],
            "multiple": false,
            "validation": [
                {
                    "required": false
                }
            ],
            "isDefault": false,
            "label": "Place your SSML content here",
            "key": "testssml"
}

Multi-Screen

The multi-screen renders the multimodal content editor. Refer What is the Multimodal Content Editor?

{
            "type": "Object",
            "fieldType": "multiscreen",
            "ref": "",
            "options": [],
            "multiple": false,
            "validation": [
                {
                    "required": true
                }
            ],
            "isDefault": false,
            "label": "This is the multiscreen field",
            "key": "testmultiscreen"
}

Persona List

This field type will let you choose the persona from the list of all the personas available in the environment.

{
            "type": "Object",
            "fieldType": "personalist",
            "ref": "",
            "options": [],
            "multiple": false,
            "validation": [
                {
                    "required": true
                }
            ],
            "isDefault": false,
            "label": "Select the persona from the list",
            "key": "testpersonalist"
}

Dynamic Data Reference

You can refer to the documents from another schema to this schema.

For example, if you want to refer to the documents from the facilitydata content schema to this schema, you can use this field type.

The documents available in facilitydata schema will be listed in the dropdown.

{
            "type": "String",
            "fieldType": "schemarefdata",
            "ref": "content_facilitydata",
            "options": [],
            "multiple": false,
            "validation": [
                {
                    "required": "true"
                }
            ],
            "isDefault": true,
            "label": "Choose from the facility schema",
            "key": "testschemarefdata"
        },

If you choose “multiple”: true, then you can select multiple items from the dropdown.

Json

This field type will display a code block.

{
            "type": "Object",
            "fieldType": "json",
            "ref": "",
            "options": [],
            "multiple": false,
            "validation": [
                {
                    "required": true
                }
            ],
            "isDefault": false,
            "label": "Place your JSON here",
            "key": "testjson"
}

Tags

This field type is used for tags. Using tags, you can categorize all the documents in this schema. Add your text and press enter in this field to add a tag.

{
            "type": "Object",
            "fieldType": "tags",
            "ref": "",
            "options": [],
            "multiple": false,
            "validation": [
                {
                    "required": true
                }
            ],
            "isDefault": false,
            "label": "You can put your tags here",
            "key": "testtags"
}

Flow data reference

You can select the flow studio flows from the dropdown using this field type.

{
            "type": "String",
            "fieldType": "schemarefdata",
            "ref": "flowstudio_flow",
            "options": [],
            "multiple": false,
            "validation": [
                {
                    "required": true
                }
            ],
            "isDefault": true,
            "label": "flow studio",
            "key": "flow"
}

If you choose “multiple”: true, then you can select multiple items from the dropdown.

Related Articles

  • No labels