SystemX -> Frontu (Clients + Objects)
Clients + Objects
Client - entity which saves all the client information. Workspace - a particular managed facility, place, or equipment. If one site contains several facilities, each of them is registered as a separate object.
For example, you have a Client which is “UAB Client”, which has some additional data like company tax/VAT ID, Code/E.I.N number, address, city, phone number, email and etc.
For example, Workspace has some information too, like workspace name which for example are “Shop”, address, customer (which means client), serial number, etc.
So as you can see Client is “UAB Client” and it has a workspace where the task can be created, for example in the workspace “Shop”.
Endpoints to use for the Clients and Objects
First of all, before creating an object you need to create a client. So you need to use this endpoint - https://developers.frontu.com/create-update-client.
In this case fill all needed information like the title - client name, address - client address, etc.
For the next steps you need to create object - https://developers.frontu.com/create-update-workspace
In this case fill all needed information like title, client, which you created before (you need to pass the guid of the client).
Real-world data mapping examples of most common cases
First of all, you need to create Clients using POST method:
{
"title": "UAB Client",
"address": "4759 Chandler Drive",
"city": "Joplin",
"phone": 865744567,
"email": "[email protected]",
"companyVatCode": "12345678",
"companyCode": "3546780",
"deleted": false,
"clientType": 2,
"systemId": "CLIENT1"
}IMPORTANT: the title is a required field.
Then you will get a response:
{
"version": 1622720578,
"title": "UAB Client",
"address": "4759 Chandler Drive",
"city": "Joplin",
"phone": "865744567",
"email": "[email protected]",
"creditStatus": null,
"note": null,
"companyCode": "3546780",
"companyVatCode": "12345678",
"guid": "cc38dd65-bcdf-cd6c-b5b7-9be97e3651fa",
"created": "2021-06-03T11:42:58+0000",
"updated": "2021-06-03T11:42:58+0000",
"deleted": false,
"clientType": 2,
"systemId": "CLIENT1",
"customValues": null
}In this case, you can take the client guid and use it in the object or you can use systemId, which defines unique data from your system and give it to the workspace.
Workspace creation example:
{
"title": "Shop",
"client": "CLIENT1",
"city": "Joplin",
"deleted": false,
"systemId": “WORKSPACE1”,
}IMPORTANT: title and the client is required fields.
Then you will get a response:
{
"version": 1622721176,
"title": "Shop",
"serialNumber": null,
"longitude": null,
"latitude": null,
"note": null,
"address": null,
"city": "Joplin",
"apartmentNumber": null,
"signatureCode": "4d5c63d2db40db14e3f9a7334cf2c83b",
"objectCode": "7930df975d543069dc4f74c3a78c316b",
"client": {
"title": "UAB Client",
"companyCode": "3546780",
"guid": "cc38dd65-bcdf-cd6c-b5b7-9be97e3651fa",
"systemId": "CLIENT1"
},
"guid": "aee6c30b-196e-6363-4c25-f2599fe116b9",
"created": "2021-06-03T11:52:56+0000",
"updated": "2021-06-03T11:52:56+0000",
"deleted": false,
"systemId": “WORKSPACE1”,
"warrantyIndicator": null,
"warrantyRequired": false,
"customValues": null
}And you can see that you have a relationship with the Workspace and Client by the systemId