This documentation introduce the RequestType usage and detail format.
The RequestType define how to User Request store data in its data repository.
All RequestType have two blocks :
Commons fields are a serie of statics fields wich are always present to store the Request data.
All commons fields implied in all RequestType.
The Five Ws :
The 'who' is represented with the field applicationUser .
This field represent an 'User' into the client application. User Request can be share with different client, this possiblity implies that the Users for the client application X are completely different from the Users fro the client application Y
The ApplicatoinUser is define as follow :
gid : unique id from client application Users directorytitle: title of user like "M.", Mme", ...firstName: first name of userlastName: last name of useremail: email of userphone: phone number of usersource: the client application can use this field to add spécifique source of the user like "interne", "externe", "CRM", ...metaData: array of key value to add custom data to the user.No field are required, but it is recommended to fill them.
The 'what' is represented with the field subject.
The 'Where' is represented with the field address.
The Address is define as follow :
country : countrycity : citypostalCode : postal codestreet : street name, without the numbernumber : number into the street name. Like "3", "4ter", ...address : fulll address string line.latitude : latitude in WGS84 systemelongitude : longitude in WGS84 systemeNo field are required, but it is recommended to fill them.
The 'When' is is implied when Request is save with the today data-time
The 'Where' is represented with the field comment. This content a simple text block.
All RequestType have a field attachment to store files into Request.
You can use this field like the email's attachments.
The customs fields are all other field not in the basic Five Ws.
You can add custom field by defining it in the RequestType.
Field definition is definied array of FieldDefnition. Each FieldDefnition lik this :
code : code (like an id) for this field. The code can be name with alpha-numric characters only. By default all value stored in User Request are stores as string. But some specific features are embed in the code :
label : label is the human label wich describe this field. The label can be use by the client application to add text behind field form element. WARNING : there is no multilanguage support at this time.
fieldType : the field type for this field. The available types are :
textblock considered as basic type : string,
number considered as basic type : float,
email considered as basic type : string,
toggle considered as basic type : boolean,
date considered as basic type : date,
phone considered as basic type : string,
uuid considered as basic type : string,
radio considered as basic type : string,
filePath considered as basic type : string,
mimeType considered as basic type : string,
datetime considered as basic type : datetime,
time considered as basic type : time,
size considered as basic type : float,
rate considered as basic type : float,
integer considered as basic type : integer,
originalFileName considered as basic type : string,
boolean considered as basic type : boolean,
latitude considered as basic type : string,
longitude considered as basic type : string,
street considered as basic type : string,
postalCode considered as basic type : string,
streetNumber considered as basic type : string,
checkbox considered as basic type : boolean,
coordinate considered as type : object
latitude considered as basic type : latitude,
longitude considered as basic type : longitude,
address considered as type : object
street considered as basic type : text,
postalCode considered as basic type : text,streetNumber considered as basic type : text,
prestationfamilly considered as basic type : string,
prestationobject considered as basic type : string,
prestationtype considered as basic type : string,
prestation considered as type : object
family considered as basic type : selection,
object considered as basic type : selection,type considered as basic type : selection,
selection considered as type : object
id considered as basic type : string
label considered as basic type : string
multiSelection considered as array of type : object
id considered as basic type : string
label considered as basic type : string
file specific type to store file into field
files specific type to store array of files into field
configuration : this attribute take free json format to add specific configuration on the field
Each RequestType must be associate with workflow.
{
"id": "REQUEST_TYPE_1",
"description": "Description of this RequestType",
"fields": [
{
"code": "listOfUsage",
"label": "List of usages",
"fieldType": "selection",
"configuration": {
"data": [
{
"id": "usage1",
"label": "Usage 1"
},
{
"id": "usage2",
"label": "Usage 2"
}
]
},
"extraLabels": false
},
{
"code": "visitDate",
"label": "Type de visite",
"fieldType": "date",
"configuration": {},
"extraLabels": false
},
{
"code": "tags",
"label": "Request tags",
"fieldType": {
"id": "multiSelection",
"fieldType": "selection"
},
"configuration": {
"data": [
{
"id": "tag1",
"label": "Tag 1"
},
{
"id": "tag2",
"label": "Tag 2"
},
{
"id": "tag3",
"label": "Tag 3"
},
{
"id": "tag4",
"label": "Tag 4"
}
]
},
"extraLabels": false
},
{
"code": "controlDocmentsList",
"label": "Document used by controler",
"fieldType": "files",
"configuration": [],
"extraLabels": false
},
{
"code": "isChecked",
"label": "Is checked ?",
"fieldType": "boolean",
"configuration": [],
"extraLabels": false
},
{
"code": "numberOfControls",
"label": "Number Of Controls",
"fieldType": "number",
"configuration": [],
"extraLabels": false
},
{
"code": "fileNumberLong",
"label": "File number",
"fieldType": "number",
"configuration": [],
"extraLabels": false
}
],
"workflow": "SIMPLE_WORKFLOW"
}