As well as the standard JSON data types, we will refer to the following additional types.
Date: a string formatted as yyyy-MM-dd
Date-time: a string formatted as yyyy-MM-dd’T’HH:mm:ss
Reference: a reference to a record in Case Manager (see the following section for details)
Enum: a string-based value (available values are configurable and so will be communicated separately)
Address: an object with individual properties for each field of the address (see below)
References
References are used as data properties to refer to other entities (records or configuration elements).
Three types of references are supported.
Name References
These are string values that identify an existing entity using a unique name identifier. The names depend on the type of entity being referenced; for example, a case has a unique reference which serves as its name.
ID References
These are numeric references corresponding to the id value assigned to the entity in Case Manager’s persistent tore. These values differ across instances of Case Manager but can be supplied upon request.
Batch References
Batch References are used to refer to records created by a prior operation within the batch. They are defined through the invocation of the Process Batch service and cannot be used to refer to the same record in subsequent batches. A Batch Reference is assigned to a record by specifying a value in the ref field of the operation invocation that creates the record. It can then be referred to in other operation invocations by supplying the reference prefixed with a dollar $ character.
For example, the following pair of operation create a client record and then creates a case that links to that client record through its batch reference of myClient:
{
"operations":
[
{
"type": "ClientCreate",
"ref": "myClient",
"data": {
"firstName": "Freda",
"surname": "Bloggs"
}
},
{
"type": "CaseCreate",
"data": {
"summary": "Freda's case",
"client": "$myClient"
}
}
]
}
Please note, the full set of required properties has been omitted from the above example; please see the Example Payload section below for a comprehensive payload example.
Address
Data properties
All values are string-based.
Name |
Notes |
---|---|
companyName |
|
flatNumber |
|
premisesName |
|
houseNumber |
|
streetName |
|
district |
|
town |
|
region |
|
postcode |
|
countrystring (enum) - only applicable for systems with country support enabled. |
Field values
A number of record types within Case Manager support custom fields that are defined within the configuration of the Case Manager system. In operation data objects these fields are typically referenced through a Name Reference to indicate the field to be set and a value for the field is supplied. The Name Reference for a field comprises its FieldList name and Field name concatenated together, separated by a period character. For example, the following fragment supplies the value of an ethnicity for the equalityAndDiversity field list.
{
"fieldValues": [
{
"field": "equalityAndDiversity.ethnicity",
"value": "Mixed: White and Black Caribbean"
},
]
}
The values of custom fields will vary depending on the type of the field that is being set as described in the following table:
Field Types |
Data type |
Notes |
---|---|---|
String |
String up to 255 characters |
May also be subject to field specific validation. |
Text |
String |
|
Integer |
Whole number |
|
Float |
Decimal number |
|
Date |
yyyy-MM-dd |
|
Date-time |
yyyy-MM-dd'T'HH:mm |
|
Time |
HH:mm |
|
Picklist value |
Numeric ID or String value of picklist value |
String values must be an exact match for the configured picklist value. |
Multi-value picklist |
Array of Numeric ID or String value of picklist value |
The order of values supplied is not significant. String values must be an exact match for the configured picklist value. |
Address |
Address object |
Individual fields may have validation rules such as being mandatory, or needing to conform to a regex pattern; any such rules depend on the Case Manager configuration, and so these will be supplied as part of the custom configuration documentation for the customer.
Pete Patel
Comments