The structure of requests
The standard request has the following structure:
You can place these properties in any order.
In this section, you define fields and their properties to be shown on the Document registration form. All available fields and custom fields, if there are any, must be specified in the JSON request. If the field will not be used on the Document registration form, you must specify the following property for it: "visible\":\"None\"
. If the field will be used, the following property must be defined for it: \"visible\":\"Visible\"
.
The syntax to start defining configuration is "Config":
. Remember to follow JSON syntax.
This is a list of the default fields that you can use on the Document registration form:
- Title
- DocumentType
- Classification
- State
- CaseHandler
Other available fields are:
- ResponsibleUnit
- ActingUnit
- Case
- MainDocument
- DocumentGroup
- DocumentNumber
- Origin
- MailList
- LetterDate
- ReplyDeadline
- Keywords
- Text
- CreatedBy
- CreatedDate
- VersionNumber
- Replied
- SentFrom
- ArchivingForm
- PostalDate
- RetentionDate
- Type
Along with the available default fields, you can define the following custom fields that are specific for your organization:
- Text
- Data
- Unique
- Droplist
- Integer
- Decimal
- Address
- Contact
- Employee
- Unit
- Case
- Document
The following validation rules can be set in the WorkZone Configurator for the Text and Unique fields: CVR number, Email address, and Web address.
See more about custom fields in the Administrator Guide for WorkZone Configurator. You can add these fields to the WorkZone 365 configuration using Postman. See more about Postman in Work with Postman. For an example of a JSON request for creating the custom document fields, see Add custom document fields.
In the table below you can find a list of the properties that are applicable to all fields. The required properties must be specified in the JSON request.
Properties | Required or optional | Values | Comments |
---|---|---|---|
label |
optional |
string |
You can change a default name of the field. Notater:
|
title |
optional |
string |
You can change a default title of the WorkZone 365 pane. Notater:
|
order |
required |
number |
To set the proper number, please see the configuration file. This is the only way to define what number is relevant for your configuration at this moment. |
required |
required |
'true', 'false' |
Vigtigt: You cannot set 'false' to a field that is required in the database. Your changes will not be saved to predict a crash of basic scenarios in WorkZone. |
defaultValue |
optional |
string |
Specify a default value that will be visible to users. |
readOnly |
required |
'true', 'false' |
Vigtigt: You cannot set 'false' to a field that is read-only in the database. Your changes will not be saved to predict a crash of basic scenarios in WorkZone. |
visible |
required |
'Visible', 'None' |
Vigtigt: You cannot set 'None' to a field that is required in the current request. Your changes will not be saved to predict a crash of basic scenarios in WorkZone. |
Properties | Required or optional | Sub-properties | Values | Comments |
---|---|---|---|---|
dataSource.Value |
|
|
|
|
optional |
.select |
object |
The value will be retrieved from the OData entity for a particular item. Tip: Due to complexity of this connection, it is not recommended to change this value without a strong need. |
The Select fields properties
Properties | Required or optional | Sub-properties | Values | Comments |
---|---|---|---|---|
dataSource.Items |
|
|
|
|
optional |
.odataEntity |
string |
Specify content of the field. You can find the full list of dataEntities in the dataEntities table. |
|
|
optional |
.filter |
string |
Define a filter for the entity. For example, you might want to only show cases with the 'Open' state. |
For WorkZone 365, always use this syntax: "Client":"WZO"
.
Define to whom the configuration must be applied. Use the following syntax: "NameKey_Value":"XXX"
, where XXX value can be:
- a user with the current ID value
- a unit with the current NameKey value
- the entire organization if the value is empty.
Define a priority of the configuration by using the following syntax: "Priority":"X"
, where X is the integer number. The highest priority is 9, the lowest priority is 1. If multiple configurations of the same type exist, priority helps to define which configuration must be prioritized.
Configurations cannot be of the same type with equal priority. Otherwise, WorkZone 365 issues an error and none of such configurations are applied.