Handling Truck Visit Appointments Results
Client applications will be notified of the truck visit appointments results through the registered web-hooks with Envase Connect Data. The truck visit appointments event will provide the information about the appointments of specific truck, which has the following structure:
{
"action": "TRACE_RESULT",
"orgId": "ENVASE",
"svcId": "ICTSI-INTEGRATION",
"type": "APPOINTMENT",
"payload": {
"appointmentNumber": "2344",
"code": "LATE",
"containerNumber": "",
"created": "2023-09-12T00:06:22.637Z",
"updated": "2023-09-12T04:04:23.783Z",
"cancelled": "2023-09-12T04:04:23.783Z",
"deliveryOrder": "SUBICTESTENVA",
"endDate": "2023-09-12T03:59:00.000Z",
"event": {
"description": [
{
"description": "Truck Visit Appointment late",
"language": "en-us"
}
],
"locationCode": "SBITC",
"operatorId": "ICTSI",
"type": "TVAPPT_LATE"
},
"gateId": "SBITC_GATE",
"id": "",
"locationCode": "SBITC",
"providerId": "ictsi",
"referenceKey": "ICTSI/PH/SBITC/15260",
"requestedDate": "2023-09-12T02:00:00.000Z",
"startDate": "2023-09-12T02:00:00.000Z",
"company": "SBITC ",
"companyId": "SBITC",
"license": "PM162",
"truck": {
"id": "test reference",
"driverLicense": "test license",
"appointmentNumber": "2347",
"code": "LATE",
"company": "SBITC ",
"companyId": "SBITC",
"created": "2023-09-12T00:18:45.943Z",
"endDate": "2023-09-12T03:59:00.000Z",
"license": "PM162",
"startDate": "2023-09-12T02:00:00.000Z",
"updated": "2023-09-12T04:04:23.797Z",
"cancelled": "2023-09-12T04:04:23.797Z"
}
}
}
The root properties orgId and svcId identify the client application and are used by Envase Connect Data to determine which web-hook will be notified. In this case as the event is related to truck visit appointments, So OrgId is set to ENVASE and svcId is set to ICTSI-INTEGRATION. The type property will be set to APPOINTMENT. The action will be set to TRACE_RESULT indicating that is a new result for the truck visit appointments being traced.