Create a global data model using JSON

You can create a data model using a sample JSON. On providing a JSON file, the JSON format is parsed, and a tree structure is created automatically. The global data model can be used across processes, cases, rules, custom services, and forms.

When generating a data model from a sample JSON, all elements in an array in the sample JSON are checked to ensure all properties are added to the data model.

  1. Navigate to System data > Data models.

    The Data models page appears.

  2. Click New.

    The new data model appears in a tree form under the Design tab and opens in a new browser tab.

  3. You can change the default name and provide a meaningful and unique name for the data model.
  4. Optional. Provide a Description of the data model.
  5. By default, the data model is placed in your default working category. To place it in a different category, on the Category list, select a category.
  6. To add a JSON file, click Load from external source.

    The Load from external dialog box is displayed.

  7. On the Type list, select JSON expression. (Default: JSON expression)
  8. Browse the file or drag the JSON file into the File box.

    You can also paste the sample JSON format in the File content box.

    Once you add the files, the file preview is displayed in the File content box. You can edit the file if required.

  9. Click Add.

    The JSON file is parsed, and the fields are displayed in the tree structure in the canvas. You can change or rename the field properties or delete them from the tree.

    • The field names support these special characters (!@#$%^&*()_+-={}|:"<>?,./;'[]\).

    • If the JSON file cannot be parsed, an error message is displayed.

    • If the JSON is a list, you cannot return it to the data object you created; instead, you must map it to the list field within the JSON that has been created.

    • When you define a tree structure for the data model, but provide a different JSON sample, a warning message is displayed that the existing model will be overwritten. You must confirm if you want to continue, as this action cannot be undone.

  10. You can rearrange the fields using drag and drop. The updated field order is automatically reflected even in the Data object variable being used in the workflow.

    • You can reorder the entire object, or fields that are at same level or within a list.

    • You can move the entire object or list up and down, or move fields from one object to another object; however, you cannot move the fields out of a list.

  11. Save or release the data model.

    The new data model appears on the Data models list page.