FS 370536 FleetCheck Interface: Difference between revisions
From Calidus HUB
(v0.1 - Initial draft version - incomplete) |
(v0.2 - Added technical details.) |
||
Line 5: | Line 5: | ||
{{#vardefine:SystemCode|CTMS}} | {{#vardefine:SystemCode|CTMS}} | ||
{{#vardefine:Doc_Title|FleetCheck Interface}} | {{#vardefine:Doc_Title|FleetCheck Interface}} | ||
{{#vardefine:Version|0. | {{#vardefine:Version|0.2}} | ||
{{#vardefine:Date| | {{#vardefine:Date|12th May 2020}} | ||
{{#vardefine:Reference|370536}} | {{#vardefine:Reference|370536}} | ||
{{#vardefine:Year|2020}} | {{#vardefine:Year|2020}} | ||
Line 332: | Line 332: | ||
* Authentication parameters. | * Authentication parameters. | ||
* ''CategoryName'' | * ''CategoryName'' | ||
* ''CategoryId'' | * ''CategoryId'' | ||
Line 346: | Line 346: | ||
* Authentication parameters. | * Authentication parameters. | ||
* ''DriverId'' | * ''DriverId'' | ||
* '' | * ''CategoryName'' | ||
Line 406: | Line 406: | ||
<!-- NEW PAGE --> | <!-- NEW PAGE --> | ||
= TECHNICAL NOTES = | = TECHNICAL NOTES = | ||
== CTMS Web Service, for FC->CTMS == | == CTMS Web Service, for FC->CTMS == | ||
Line 434: | Line 424: | ||
These are RESTful web services and generally support only the POST and PUT actions. | These are RESTful web services and generally support only the POST and PUT actions. | ||
=== General Notes === | |||
All code to process the received data from FleetCheck should be in package DP_FLEETCHECK. | |||
=== Responses === | === Responses === | ||
Responses will be handled by the .NET code. | |||
Responses will be sent as per HTTP standards: | Responses will be sent as per HTTP standards: | ||
Line 453: | Line 449: | ||
} | } | ||
</pre> | </pre> | ||
=== Parameters === | |||
Parameters will be extracted and validated in the .NET code. | |||
Line 465: | Line 465: | ||
</pre> | </pre> | ||
All parameters passed in to all web service methods will be checked to ensure that there is no SQL insertion, as well as standard checks for requirement, length and basic type. | |||
Parameters will be extracted from the call to the web service. They will be passed to the appropriate procedure within CTMS package DP_FLEETCHECK. | |||
=== Authorisation === | |||
Authorisation parameters consist of: | Authorisation parameters consist of: | ||
Line 475: | Line 481: | ||
* Configuration. | * Configuration. | ||
Actions taken when updating data will be audited in the system through this user account. | A default FLEETCHECK user will be created. This FleetCheck user will be used solely by the .NET web service system for connection purposes. | ||
A new user parameter will be created called FLEETCHECK_AUTHCODE. This will be set against the default FLEETCHECK user - many may be created, but only one expected, and is an optional parameter. | |||
The authorisation procedure in .NET will call package DP_FLEETCHECK.AUTHORISE_USER, accepting the authcode parameter above, returning an error code, and with in/out parameters for username, password and errors (if any). | |||
The procedure will find the user set up with FLEETCHECK_AUTHCODE set to the passed-in Auth Code. | |||
Any issues should be returned with a false return code (negative integer), and the description of the issue, for example: | |||
* -1 - Authcode not valid. | |||
Actions taken when updating data will be audited in the system through this default FleetCheck user account. | |||
Any issues should also be logged by the .NET code to a local logging file. These files should be created new every hour. | |||
=== General Processing === | |||
Procedure code should exist in package DP_FLEETCHECK dedicated to the particular web service, for example, DRIVER. | |||
The .NET code should call the correct procedure associated to the web service, passing in the specific parameters in the process, as well as the following: | |||
* p_message - error descriptions, if any. | |||
* p_action - the action derived from the HTTP action above: | |||
** A - Add | |||
** U - Update | |||
The procedure should also return a basic error code (0 or negative number to identify the specific error) or 1 if all worked as expected. | |||
The procedure should update or create records on appropriate tables, as detailed in the specific descriptions. | |||
The .NET code written should be separated into DAL and BAL objects. BAL objects should define the actions being taken for each web service method, for example AddDriver, UpdateDriver or AddUpdateDriver. These will call define DAL object methods. DAL objects should contain the call the the CTMS Oracle package code - Oracle should not be referenced in any other places in the code, as this web services project may be converted to work with SQL Server for CTL TMS or for C-ePOD. | |||
Line 490: | Line 527: | ||
Parameters: | Parameters: | ||
* Authorisation parameters | * Authorisation parameters | ||
* '' | * ''p_id'' - unique numeric ID. Used as the key when adding or updating a driver. | ||
* '' | * ''p_surname'' - must be provided when creating a new driver. Maximum 50 characters. If id is not provided, surname and forename will be used to identify the driver. | ||
* '' | * ''p_forename'' - must be provided when creating a new driver. Maximum 50 characters. If id is not provided, surname and forename will be used to identify the driver. | ||
* '' | * ''p_job'' - must be provided when creating a new driver. Maximum 50 characters. | ||
* '' | * ''p_inactive'' - Optional. Will be assumed to be "N" when creating a new driver is not provided. Values "Y" or "N" | ||
* '' | * ''p_agency'' - Is this an agency driver. "Y" or "N". Optional. Assumed to be "N" when creating a new driver if not provided. | ||
* '' | * ''p_agencyname'' - provide the agency name. Maximum 100 characters. Required if agency = "Y". | ||
* '' | * ''p_carrier'' - must be a valid carrier id. Maximum 12 characters. Optional. Assumes driver is not assigned to a carrier if omitted when creating a new driver. | ||
* '' | * ''p_carriername'' - must be a valid carrier name. Maximum 50 characters. Optional. Assumes driver is not assigned to a carrier if omitted when creating a new driver. | ||
Procedure: DP_FLEETCHECK.DRIVER. | |||
Table RES_PERSON: | Table RES_PERSON: | ||
Line 509: | Line 545: | ||
! Field !! Type !! Notes | ! Field !! Type !! Notes | ||
|- | |- | ||
| ID || NUMBER || | | ID || NUMBER || ''p_id'' | ||
|- | |- | ||
| SURNAME || VARCHAR2(50) || | | SURNAME || VARCHAR2(50) || ''p_surname'' | ||
|- | |- | ||
| FORENAME || VARCHAR2(50) || | | FORENAME || VARCHAR2(50) || ''p_forename'' | ||
|- | |- | ||
| JOB_TITLE || VARCHAR2(50) || | | JOB_TITLE || VARCHAR2(50) || ''p_job'' | ||
|- | |- | ||
| LOCATION_ID || VARCHAR2(12) || | | LOCATION_ID || VARCHAR2(12) || | ||
|- | |- | ||
| CREATED_BY || VARCHAR2(40) || | | CREATED_BY || VARCHAR2(40) || When adding, CTMS Username | ||
|- | |- | ||
| CREATED_DATE || DATE || | | CREATED_DATE || DATE || When adding, SYSDATE | ||
|- | |- | ||
| UPDATED_BY || VARCHAR2(40) || | | UPDATED_BY || VARCHAR2(40) || When updating, CTMS Username | ||
|- | |- | ||
| UPDATED_DATE || DATE || | | UPDATED_DATE || DATE || When updating, SYSDATE | ||
|- | |- | ||
| CONTACT_NO || VARCHAR2(50) || | | CONTACT_NO || VARCHAR2(50) || N/A | ||
|- | |- | ||
| INACTIVE || VARCHAR2(1) | | | INACTIVE || VARCHAR2(1) || ''p_inactive'' | ||
|- | |- | ||
| AGENCY || VARCHAR2(1) || | | AGENCY || VARCHAR2(1) || ''p_agency'' | ||
|- | |- | ||
| SMARTPHONE_ENABLED || VARCHAR2(100) || | | SMARTPHONE_ENABLED || VARCHAR2(100) || N/A | ||
|- | |- | ||
| EPOD_USERNAME || VARCHAR2(10) || | | EPOD_USERNAME || VARCHAR2(10) || N/A | ||
|- | |- | ||
| TOMTOM_ENABLED || VARCHAR2(1) || | | TOMTOM_ENABLED || VARCHAR2(1) || N/A | ||
|- | |- | ||
| HUB_LOCATION || VARCHAR2(12) || | | HUB_LOCATION || VARCHAR2(12) || N/A | ||
|- | |- | ||
| START_AT_HUB || VARCHAR2(1) || | | START_AT_HUB || VARCHAR2(1) || N/A | ||
|- | |- | ||
| RETURN_TO_HUB || VARCHAR2(1) || | | RETURN_TO_HUB || VARCHAR2(1) || N/A | ||
|- | |- | ||
| AGENCY_NAME || VARCHAR2(100) || | | AGENCY_NAME || VARCHAR2(100) || ''p_agencyname'' | ||
|} | |} | ||
If a carrier or carrier name is provided, the carrier should be updated. | |||
To update driver carrier assignment. | To update driver carrier assignment. | ||
First, the process should find the carrier. This may be through the ID provided or the carrier name. If the carrier is not found, do not perform the update of the carrier assignment. Return an error. | |||
If the carrier is found, check whether the driver has a carrier entry. If it does not, one should be created. If found, it should be updated. | |||
Table RES_PERSON_CARRIER | Table RES_PERSON_CARRIER | ||
Line 564: | Line 600: | ||
! Field !! Type !! Notes | ! Field !! Type !! Notes | ||
|- | |- | ||
| INACTIVE || VARCHAR2(1) || | | INACTIVE || VARCHAR2(1) || ''p_inactive'' | ||
|- | |- | ||
| PC_ID || NUMBER(10) || | | PC_ID || NUMBER(10) || ''p_id'' | ||
|- | |- | ||
| ID || NUMBER || | | ID || NUMBER || N/A | ||
|- | |- | ||
| CARRIER_ID || VARCHAR2(12) || | | CARRIER_ID || VARCHAR2(12) || The carrier ID found | ||
|- | |- | ||
| RAG || VARCHAR2(1) || | | RAG || VARCHAR2(1) || N/A | ||
|} | |} | ||
{{Note}}As FleetCheck supports only one category assigned to each resource, then changing the category should make the prior carrier unavailable and this carrier available. The process should find all other carrier records and mark them inactive, if the user is being marked as active to this carrier. This is handled in the CTMS-FleetCheck interface, defined below. | |||
{{Note}} This is a method available to either system. Therefore, if updating carrier assignment from this method, this method should not then send an update out through the other system web service method. | |||
Line 591: | Line 630: | ||
Parameters: | Parameters: | ||
* Authorisation parameters | * Authorisation parameters | ||
* '' | * ''p_id'' - unique ID. Used when updating an existing tractor. Use the registration. | ||
* '' | * ''p_type'' - must be a valid vehicle type in the system. Required when creating a tractor. | ||
* '' | * ''p_desc'' - Required when creating a tractor. Maximum length 50. | ||
* '' | * ''p_inactive'' - Optional. Will be assumed to be "N" when creating a new tractor if not provided. Values "Y" or "N". | ||
* '' | * ''p_mpg'' - Optional. Decimal number, 3 decimal places. | ||
* '' | * ''p_vin'' - optional. Maximum length 17. | ||
* '' | * ''p_carrier'' - must be a valid carrier id. Maximum 12 characters. Optional. Assumes tractor is not assigned to a carrier if omitted when creating a new tractor. | ||
* '' | * ''p_carriername'' - must be a valid carrier name. Maximum 50 characters. Optional. Assumes tractor is not assigned to a carrier if omitted when creating a new tractor. | ||
Procedure: DP_FLEETCHECK.TRACTOR. | |||
Table RES_TRACTOR | Table RES_TRACTOR: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 609: | Line 648: | ||
! Field !! Type !! Notes | ! Field !! Type !! Notes | ||
|- | |- | ||
| TRACTOR_ID || VARCHAR2(12) || | | TRACTOR_ID || VARCHAR2(12) || ''p_id'' | ||
|- | |- | ||
| TRACTOR_TYPE || VARCHAR2(12) || | | TRACTOR_TYPE || VARCHAR2(12) || ''p_type'' | ||
|- | |- | ||
| DESCRIPTION || VARCHAR2(50) || | | DESCRIPTION || VARCHAR2(50) || ''p_desc'', if provided | ||
|- | |- | ||
| INACTIVE || VARCHAR2(1) || | | INACTIVE || VARCHAR2(1) || ''p_inactive'', if provided | ||
|- | |- | ||
| LOCATION_ID || VARCHAR2(12) || | | LOCATION_ID || VARCHAR2(12) || N/A | ||
|- | |- | ||
| TRACKING_ENABLED || VARCHAR2(50) || | | TRACKING_ENABLED || VARCHAR2(50) || N/A | ||
|- | |- | ||
| CONTACT_NO || VARCHAR2(50) || | | CONTACT_NO || VARCHAR2(50) || N/A | ||
|- | |- | ||
| MPG || NUMBER(6,3) || | | MPG || NUMBER(6,3) || ''p_mpg'', if provided. | ||
|- | |- | ||
| TRACK_REF || VARCHAR2(30) || | | TRACK_REF || VARCHAR2(30) || N/A | ||
|- | |- | ||
| VIN_NO || VARCHAR2(17) || | | VIN_NO || VARCHAR2(17) || ''p_vin'' if provided. | ||
|- | |- | ||
| FLEET_ID || VARCHAR2(100) || | | FLEET_ID || VARCHAR2(100) || N/A | ||
|- | |- | ||
| BLUE_LIGHT || VARCHAR2(1) || | | BLUE_LIGHT || VARCHAR2(1) || N/A | ||
|- | |- | ||
| TAIL_LIFT || VARCHAR2(1) || | | TAIL_LIFT || VARCHAR2(1) || N/A | ||
|- | |- | ||
| TOMTOM_ENABLED || VARCHAR2(1) || | | TOMTOM_ENABLED || VARCHAR2(1) || N/A | ||
|- | |- | ||
| EPOD_ENABLED || VARCHAR2(1) || | | EPOD_ENABLED || VARCHAR2(1) || N/A | ||
|- | |- | ||
| RAG || VARCHAR2(1) || | | RAG || VARCHAR2(1) || N/A | ||
|} | |} | ||
If a carrier or carrier name is provided, the carrier should be updated. | |||
To update vehicle carrier assignment. | To update vehicle carrier assignment. | ||
First, the process should find the carrier. This may be through the ID provided or the carrier name. If the carrier is not found, do not perform the update of the carrier assignment. Return an error. | |||
If the carrier is found, check whether the vehicle has a carrier entry. If it does not, one should be created. If found, it should be updated. | |||
Line 653: | Line 698: | ||
! Field !! Type !! Notes | ! Field !! Type !! Notes | ||
|- | |- | ||
| ID || NUMBER(10) || | | ID || NUMBER(10) || N/A | ||
|- | |- | ||
| TRACTOR_ID || VARCHAR2(12) || | | TRACTOR_ID || VARCHAR2(12) || ''p_id'' | ||
|- | |- | ||
| CARRIER_ID || VARCHAR2(12) || | | CARRIER_ID || VARCHAR2(12) || The carrier ID found | ||
|- | |- | ||
| INACTIVE || VARCHAR2(1) || | | INACTIVE || VARCHAR2(1) || ''p_inactive'' | ||
|} | |} | ||
{{Note}}As FleetCheck supports only one category assigned to each resource, then changing the category should make the prior carrier unavailable and this carrier available. The process should find all other carrier records and mark them inactive, if the user is being marked as active to this carrier. | |||
{{Note}} This is a method available to either system. Therefore, if updating carrier assignment from this method, this method should not then send an update out through the other system web service method. This is handled in the CTMS-FleetCheck interface, defined below. | |||
Line 677: | Line 726: | ||
Parameters: | Parameters: | ||
* Authorisation parameters | * Authorisation parameters | ||
* '' | * ''p_id'' - unique ID. Used when updating an existing trailer. | ||
* '' | * ''p_type'' - must be a valid trailer type in the system. Required when creating a trailer. | ||
* '' | * ''p_inactive'' - Optional. Will be assumed to be "N" when creating a new trailer if not provided. Values "Y" or "N". | ||
* '' | * ''p_carrier'' - must be a valid carrier id. Maximum 12 characters. Optional. Assumes trailer is not assigned to a carrier if omitted when creating a new trailer. | ||
* '' | * ''p_carriername'' - must be a valid carrier name. Maximum 50 characters. Optional. Assumes trailer is not assigned to a carrier if omitted when creating a new trailer. | ||
Procedure: DP_FLEETCHECK.TRAILER | |||
The process should first check the authorised user parameters. If the user does not have a default cost centre, return an error and do no more processing. | |||
Table RES_TRAILER | Table RES_TRAILER | ||
Line 692: | Line 742: | ||
! Field !! Type !! Notes | ! Field !! Type !! Notes | ||
|- | |- | ||
| TRAILER_ID || VARCHAR2(12) || | | TRAILER_ID || VARCHAR2(12) || ''p_id'' | ||
|- | |- | ||
| TRAILER_TYPE || VARCHAR2(12) || | | TRAILER_TYPE || VARCHAR2(12) || ''p_type'' | ||
|- | |- | ||
| INACTIVE || VARCHAR2(1) || | | INACTIVE || VARCHAR2(1) || ''p_inactive'' | ||
|- | |- | ||
| TRACKING_ENABLED || VARCHAR2(50) || | | TRACKING_ENABLED || VARCHAR2(50) || N/A | ||
|- | |- | ||
| COST_CENTRE_NAME || VARCHAR2(12) || | | COST_CENTRE_NAME || VARCHAR2(12) || from the user cost centre parameter | ||
|} | |} | ||
Line 706: | Line 756: | ||
To update trailer carrier assignment. | To update trailer carrier assignment. | ||
First, the process should find the carrier. This may be through the ID provided or the carrier name. If the carrier is not found, do not perform the update of the carrier assignment. Return an error. | |||
If the carrier is found, check whether the vehicle has a carrier group entry for the carrier group of that carrier. If it does not, one should be created. If found, it should be updated. | |||
Table RES_TRAILER_CARRIER_GROUP | Table RES_TRAILER_CARRIER_GROUP | ||
Line 716: | Line 766: | ||
! Field !! Type !! Notes | ! Field !! Type !! Notes | ||
|- | |- | ||
| ID || NUMBER(10) || | | ID || NUMBER(10) || N/A | ||
|- | |- | ||
| TRAILER_ID || VARCHAR2(12) || | | TRAILER_ID || VARCHAR2(12) || ''p_id'' | ||
|- | |- | ||
| INACTIVE || VARCHAR2(1) || | | INACTIVE || VARCHAR2(1) || ''p_inactive'' | ||
|- | |- | ||
| NAME || VARCHAR2(35) || Carrier Group, taken from RES_CARRIER. | | NAME || VARCHAR2(35) || Carrier Group, taken from RES_CARRIER.GROUP_NAME | ||
|} | |} | ||
{{Note}} This is a method available to either system. Therefore, if updating carrier assignment from this method, this method should not then send an update out through the other system web service method. This is handled in the CTMS-FleetCheck interface, defined below. | |||
{{Note}} Assigning a trailer to a carrier will check the carrier group of that carrier and assign the trailer to that carrier group. As trailers can only be assigned to one category in FleetCheck, if this trailer is assigned to another carrier group, this should be made unavailable to that prior carrier group. | |||
Line 739: | Line 793: | ||
Parameters: | Parameters: | ||
* Authorisation parameters | * Authorisation parameters | ||
* '' | * ''p_id'' - unique ID. Used when updating an existing tractor. | ||
* '' | * ''p_desc'' - Required when creating equipment. Maximum length 255. If id not provided, this will be used to identify the equipment. | ||
* '' | * ''p_qty'' - Optional. If not provided when creating new equipment, defaults to 1. | ||
Procedure: DP_FLEETCHECK.EQUIPMENT | |||
RES_EQUIPMENT | Table RES_EQUIPMENT | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 757: | Line 806: | ||
! Field !! Type !! Notes | ! Field !! Type !! Notes | ||
|- | |- | ||
| EQUIPMENT_TYPE || VARCHAR2(12) || | | EQUIPMENT_TYPE || VARCHAR2(12) || ''p_id''. {{Note}} This will be used as a unique identifier rather than a type. | ||
|- | |- | ||
| EQUIPMENT_DESCRIPTION || VARCHAR2(255) || | | EQUIPMENT_DESCRIPTION || VARCHAR2(255) || ''p_desc'' | ||
|- | |- | ||
| RPE | NUMBER || | | RPE || NUMBER || 0 | ||
|- | |- | ||
| WEIGHT | NUMBER || | | WEIGHT || NUMBER || 0 | ||
|- | |- | ||
| TRIP_FREQUENCY | VARCHAR2(20) || | | TRIP_FREQUENCY || VARCHAR2(20) || N/A | ||
|- | |- | ||
| QUANTITY | NUMBER || | | QUANTITY || NUMBER || ''p_qty'' if provided, else 1. | ||
|- | |- | ||
| LOADING_TIME | NUMBER || | | LOADING_TIME || NUMBER || 0 | ||
|} | |} | ||
Line 813: | Line 862: | ||
=== System Parameters === | === System Parameters === | ||
System parameters are required to control access to the FleetCheck interface. | |||
* FC_URL - the base URL for the FleetCheck system. | * FC_URL - the base URL for the FleetCheck system. | ||
Line 819: | Line 868: | ||
* FC_FLEET_KEY - the FleetCheck fleet being updated by C-TMS. | * FC_FLEET_KEY - the FleetCheck fleet being updated by C-TMS. | ||
* FC_TIMEOUT - the amount of time to wait when trying to update FleetCheck. | * FC_TIMEOUT - the amount of time to wait when trying to update FleetCheck. | ||
Line 836: | Line 882: | ||
{{Warning}} All auditing ? | {{Warning}} All auditing? | ||
Line 843: | Line 889: | ||
The procedures will receive several parameters, predominantly driven by the data to send to FleetCheck. One is common: | The procedures will receive several parameters, predominantly driven by the data to send to FleetCheck. One is common: | ||
* | * p_action - (A)dd, (U)pdate or (D)elete. | ||
This will be determined by whether we are adding, updating or deleting data. | This will be determined by whether we are adding, updating or deleting data. | ||
Line 858: | Line 904: | ||
* ''FleetKey'' - from FC_ACCESS_FLEET. | * ''FleetKey'' - from FC_ACCESS_FLEET. | ||
The action for the web service call will be determined by the parameter | The action for the web service call will be determined by the parameter p_action: | ||
* A - POST | * A - POST | ||
* U - PUT | * U - PUT | ||
Line 870: | Line 916: | ||
If this is in the success range (200), this should be audited so that it is visible in the existing EDI Log screen as a successful send. | If this is in the success range (200), this should be audited so that it is visible in the existing EDI Log screen as a successful send. | ||
If this is in the error range (400), this should be audited so that it is visible in the existing EDI Log screen as an error. | If this is in the error range (400), this should be audited so that it is visible in the existing EDI Log screen as an error. Any data included in the error returned should be kept as part of the audit. {{Warning}} Related to how we audit data. | ||
=== External Type === | === External Type === | ||
To add, update or delete FleetCheck External Types (vehicle types and trailer types). | |||
Whenever | Whenever vehicle types and trailer types are added to C-TMS, edited or deleted (i.e. in a database trigger), the system will call DP_FLEETCHECK.UPDATE_EXTERNAL_TYPE, passing in parameters of: | ||
* | * p_action - (A)dd, (U)pdate or (D)elete. | ||
* | * p_id - the vehicle type ({{Warning}} ???) or trailer type (RES_TRAILER_TYPE.TRAILER_TYPE). | ||
* | * P_desc - the vehicle type of trailer type description. | ||
The system will do this by adding a FleetCheck trigger to tables {{Warning}} ??? and RES_TRAILER_TYPE. | The system will do this by adding a FleetCheck trigger to tables {{Warning}} ??? and RES_TRAILER_TYPE. | ||
DP_FLEETCHECK.UPDATE_EXTERNAL_TYPE will call the FleetCheck web service method to update External Types, method | DP_FLEETCHECK.UPDATE_EXTERNAL_TYPE will call the FleetCheck web service method to update External Types, method: "UpdateExternalType.ashx". | ||
Parameters: | Parameters: | ||
* Authentication | * Authentication parameters. | ||
* ''ExternalTypeId'' - | * ''ExternalTypeId'' - p_id | ||
* ''ExternalTypeDescription'' - | * ''ExternalTypeDescription'' - p_desc | ||
=== Category === | === Category === | ||
To add or | To add, update or delete FleetCheck Categories (home fleet carriers) | ||
Whenever carriers are added to C-TMS, edited or deleted (i.e. in a database trigger), the system will call DP_FLEETCHECK.UPDATE_CATEGORY, passing in parameters of: | |||
* p_action - (A)dd, (U)pdate or (D)elete. | |||
* p_id - the carrier ID (RES_CARRIER.CARRIER_ID). | |||
* p_name - the carrier name (RES_CARRIER.CARRIER_NAME). | |||
The system will do this by adding a FleetCheck trigger to table RES_CARRIER. | |||
DP_FLEETCHECK.UPDATE_CATEGORY will call the FleetCheck web service method to update Categories, method: "UpdateCategory.ashx". | |||
Parameters: | Parameters: | ||
* Authentication parameters. | * Authentication parameters. | ||
* ''CategoryName'' | * ''CategoryName'' - p_name | ||
* ''CategoryId'' - | * ''CategoryId'' - p_id | ||
Line 908: | Line 960: | ||
To update driver carrier assignment. | To update driver carrier assignment. | ||
Whenever drivers are assigned to carriers in C-TMS, edited or deleted (i.e. in a database trigger), the system will check and attempt to update FleetCheck. | |||
The system will do this by adding a FleetCheck trigger to table RES_PERSON_CARRIER. | |||
When a driver carrier record is created or INACTIVE set to "N", the process will call DP_FLEETCHECK.UPDATE_DRIVER_CATEGORY, passing in parameters of: | |||
* p_action - (A)dd, (U)pdate or (D)elete. | |||
* p_id - the carrier ID (RES_PERSON_CARRIER.CARRIER_ID). | |||
* p_driver - the driver ID (RES_PERSON_CARRIER.ID). | |||
* p_user - the user making the amendment. | |||
The procedure DP_FLEETCHECK.UPDATE_DRIVER_CATEGORY will check the user (p_user) making the amendment. | |||
If this is not the default FLEETCHECK user, the process will retrieve the carrier name CARRIER_NAME using the carrier ID provided (p_id) from RES_CARRIER. | |||
Then the procedure will call the FleetCheck web service method to update Driver Categories, method: "UpdateDriverCategory.ashx". | |||
Parameters: | Parameters: | ||
* Authentication parameters. | * Authentication parameters. | ||
* ''DriverId'' | * ''DriverId'' - p_driver | ||
* '' | * ''CategoryName'' - the retrieved carrier name from RES_CARRIER.CARRIER_NAME. | ||
Furthermore, all other entries for that driver against other carriers will be set to INACIVE = "Y". The process will update all of these records at the end of the process. | |||
Line 922: | Line 988: | ||
To update vehicle carrier assignment. | To update vehicle carrier assignment. | ||
Whenever tractors are assigned to carriers in C-TMS, edited or deleted (i.e. in a database trigger), the system will check and attempt to update FleetCheck. | |||
The system will do this by adding a FleetCheck trigger to table RES_TRACTOR_CARRIER. | |||
When a tractor carrier record is created or INACTIVE set to "N", the process will call DP_FLEETCHECK.UPDATE_TRACTOR_CATEGORY, passing in parameters of: | |||
* p_action - (A)dd, (U)pdate or (D)elete. | |||
* p_id - the carrier ID (RES_TRACTOR_CARRIER.CARRIER_ID). | |||
* p_vehicle_id - the vehicle registration (RES_TRACTOR_CARRIER.TRACTOR_ID). | |||
* p_user - the user making the amendment. | |||
The procedure DP_FLEETCHECK.UPDATE_TRACTOR_CATEGORY will check the user (p_user) making the amendment. | |||
If this is not the default FLEETCHECK user, the process will retrieve the carrier name CARRIER_NAME using the carrier ID provided (p_id) from RES_CARRIER. | |||
Then the procedure will call the FleetCheck web service method to update Vehicle Categories, method: "UpdateVehicleCategory.ashx". | |||
Parameters: | Parameters: | ||
* Authentication parameters. | * Authentication parameters. | ||
* ''VehicleRegistration'' | * ''VehicleRegistration'' - p_vehicle_id | ||
* ''CategoryName'' | * ''CategoryName'' - the retrieved carrier name from RES_CARRIER.CARRIER_NAME. | ||
Furthermore, all other entries for that tractor against other carriers will be set to INACIVE = "Y". The process will update all of these records at the end of the process. | |||
Line 936: | Line 1,016: | ||
To update trailer carrier assignment. | To update trailer carrier assignment. | ||
Whenever trailers are assigned to carriers in C-TMS, edited or deleted (i.e. in a database trigger), the system will check and attempt to update FleetCheck. | |||
The system will do this by adding a FleetCheck trigger to table RES_TRAILER_CARRIER_GROUP. | |||
When a tractor carrier record is created or INACTIVE set to "N", the process will call DP_FLEETCHECK.UPDATE_TRAILER_CATEGORY, passing in parameters of: | |||
* p_action - (A)dd, (U)pdate or (D)elete. | |||
* p_id - the carrier group ID (RES_TRAILER_CARRIER_GROUP.NAME). | |||
* p_vehicle_id - the trailer ID (RES_TRAILER_CARRIER_GROUP.TRAILER_ID). | |||
* p_user - the user making the amendment. | |||
The procedure DP_FLEETCHECK.UPDATE_TRAILER_CATEGORY will check the user (p_user) making the amendment. | |||
If this is not the default FLEETCHECK user, the process will retrieve the carrier name CARRIER_NAME of the first carrier found in this carrier group using the carrier group ID provided (p_id) from RES_CARRIER. | |||
Then the procedure will call the FleetCheck web service method to update Vehicle Categories, method: "UpdateVehicleCategory.ashx". | |||
Parameters: | Parameters: | ||
* Authentication parameters. | * Authentication parameters. | ||
* '' | * ''VehicleRegistration'' - p_vehicle_id | ||
* ''CategoryName'' | * ''CategoryName'' - the retrieved carrier name from RES_CARRIER.CARRIER_NAME. | ||
Furthermore, all other entries for that trailer against other carrier groups will be set to INACIVE = "Y". The process will update all of these records at the end of the process. | |||
<!-- NEW PAGE --> | <!-- NEW PAGE --> |