The structure of requests

The standard request has the following structure:

  1. Configuration
  2. Client
  3. Addressee
  4. Priority

You can place these properties in any order.


1. Configuration

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.


Common properties

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.

Note:

  • Be aware that the WorkZone 365 User Guide will contain the default names in descriptions, which might confuse users.
  • Once you change a label to a custom value, it will be applied to all languages. In other words, you cannot localize custom labels.

title

optional

string

You can change a default title of the WorkZone 365 pane.

Note:

  • Be aware that the WorkZone 365 User Guide will contain the default names in descriptions, which might confuse users.
  • Once you change a title to a custom value, it will be applied to all languages. In other words, you cannot localize custom titles.

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'
  • 'true' – the field is required.
  • 'false' – the field is optional.
Important: 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'
  • 'true' – the field is read-only.
  • 'false' – the field is available for editing.
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'
  • 'Visible' – users can see the field
  • 'None' – users don't see the field.
Important: 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.

Important: 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.

 

optional

.filter

string

Define a filter for the entity. For example, you might want to only show cases with the 'Open' state.


2. Client

For WorkZone 365, always use this syntax: "Client":"WZO".


3. Addressee

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.


4. Priority

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.

Note: Configurations cannot be of the same type with equal priority. Otherwise, WorkZone 365 issues an error and none of such configurations are applied.