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 4 Current »

Once a schema is created, it might be necessary at some point to edit it.

In this example, we will update the Administrator's persona (schema) by adding the SecurityPIN field. This field is used to validate a user of the voice application. This validation will secure sensitive data from unauthorized access.

First, be sure you are in the Experience Manager. Also, open an online JSON editor in another browser window. We recommend JSON Editor Online (http://www.jsoneditoronline.org/).

Adding the SecurityPIN field

  1. Click User Management and then Personas

  2. In the middle panel, click Administrators
    Doing so populates the right-most panel with the Administrators persona.

  3. In the bar above the Schema edit window, click the Expand icon (the left-most icon) to show the contents of the schema.

  4. Scroll through the Schema and notice there is no field with the label “SecurityPIN

  5. Click the Hamburger menu in the lower left-hand corner and then the Pencil icon

  6. Copy any field from the open curly bracket (“{”) before the label attribute to the closed curly bracket (“}”) after the type attribute

  7. Toggle to your JSON editor and paste the field attributes
    Note: if you included the comma in the last line you copied, the JSON editor may note there is an error in that line. Since we will place the SecurityPIN filed at the end of our field list, the comma is not necessary, so delete it.

  8. In the JSON editor, replicate the field definition as noted below

  9. Copy the field definition you just created

The validation section includes three attributes. Pattern requires the SecurityPIN to be a number ([0-9]) that is 4 digits long. Maxlength specifies that SecurityPIN can be no more than 4 digits. Minlength specifies that SecurityPIN can be no fewer than 4 digits.

Case sensitivity is important. Refer to the table below the Schema edit window to ensure values are entered properly.

Adding the field definition to the Administrators Schema

  1. Toggle back to the Administrators Persona

  2. Scroll down to the bottom and place your cursor at the second to last line (“]”)

  3. Paste the schema definition

  4. Be sure the last square bracket doesn’t end up on the same line as the last curly bracket

  5. Click the checkmark icon to save your work

View the new SecurityPIN field

  1. Go back into the Administrators schema and click the Expand icon on the bar of the Schema edit window

  2. Scroll down the list of fields until you find the SecurityPIN field

  3. Note that when you saved the schema, Experience Manager added an automatically generated ID field

Related Articles

  • No labels