Import Users Example
Skill level:

This example demonstrates a tool that can be built with an advanced-level knowledge of the MyGeotab system. It is suitable for those who have a well-versed understanding of the entire Geotab ecosystem and are confident with the MyGeotab SDK and leveraging the MyGeotab APIs within their projects.

This SDK example assists with importing users to your database using comma separated values (CSV). Use the form to add new users with optional NFC or GO driver keys. You can also use the text box to paste in users from another source.
In this example
API Methods:Add
API Entities:Driver HosRuleSet

Step 1: Click Add user (can view the inputted information in the input container below)

Step 2: Click Import users (to import the user to the database)

  

Template

This SDK example assists with importing users to your database using comma separated values (CSV).

Use the form to add new users with optional NFC or GO driver keys. You can also use the text box to paste in users from another source.

ValueExampleNotesRequired
Emailjohn.smith@geotab.comCan be email or user name. Spaces are not allowed.Yes
First nameJohnSpaces are not allowed.Yes
Last nameSmithYes
PasswordMinimum of 6 characters.Yes
GroupsDrivers|West|GarminNames of groups separated by the | character.Yes
Reporting GroupsDrivers|West|GarminNames of reporting groups separated by the | character.No
Security clearance IDb28A7Found in the URL when viewing a security clearance in MyGeotab.

Example:
my.geotab.com/DATABASE/#clearance,id:b28A7
Yes
NFC key numberT1234SFound on the NFC key fob.No
Custom NFC key number12345678Found on the Custom NFC key fob.No
Country CodeCAThe user two symbols country ISO code (https://www.iso.org/iso-3166-country-codes.html)No
Phone number+1 5555555555The user's phone number with space separated country phone code.No
Phone number extension1234The user's phone number extension.No
Designation""The user's designationNo
Employee number63-221-44The user's employee number.No
Fuel economy measurementLitersPer100KmChoose how to display fuel economy. There are four different measurements: liters per 100 kilometers, kilometers per liter, miles per US gallon, or miles per imperial gallon. You may need to refresh your browser for the change to take effect.Yes
Distance measurement systemMetric (true)Choose how to display speeds and distances. This can be Metric or US/Imperial. You may need to refresh your browser to see the change take effect.Yes
Feature previewOn or Off (true or false)Toggle feature preview.Yes
Time zoneAmerica/New_YorkThe time zone offset from UTC for your location. All data will be displayed in this time zone.Yes
Authority nameNational ExpressThe motor carrier that the driver works for.No
Authority address5000 Explorer DriveThe motor carrier's main office address.No
Carrier number8Z88In the United States, this is the motor carrier's USDOT number. In Canada, this is the Canadian Carrier code.No
Home terminalStark TowerThe motor carrier's place of business where the driver ordinarily reports for work. This can include a temporary work site designated by the motor carrier.No
Home terminal address200 Park AvenueThe motor carrier's address where the driver ordinarily reports for work.No
Driver license numberYEETDriver's license number and License state/province must be set at the same time.No
License state/provinceOntario (ON)Selecting North America will show a dropdown menu; selecting Other will display a text box.No
RulesetCalifornia Property Intrastate (HosRuleSetCaliforniaProperty)This is the ruleset the user will follow when using hours of service.No
Yard move allowedOn or Off (true or false)Toggling this setting to ON allows the driver to apply the yard move exemption.Yes
Personal conveyance allowedOn of Off (true or false)Toggling this setting to ON allows the driver to apply the personal conveyance exemption.Yes

To make things easier, we've provided you with an excel template. Please follow the input requirements outlined in the Help menu.

Keep in mind that Time Zone is a required input and if a license plate is entered, it must be unique to the database. License state is required only if a license plate is provided. You may enter a state other than those provided.

NFC and Custom NFC keys must be unique to the database; no duplicates can exist.

If you want to import any reporting groups - the user groups cannot include the "CompanyGroupId", otherwise all reporting groups wiil be ignored.

Email1,FirstName,LastName,Password,GroupName1|GroupName2|...|GroupNameN,ReportingGroupName1|ReportingGroupName2|...|ReportingGroupNameN,SecurityClearanceId,NfcKey,CustomNfcKey,EmployeeNumber,FuelEconomyMeasurement,DistanceMeasurementSystem,FeaturePreview,TimeZone,AuthorityName,AuthorityAddress,CarrierNumber,HomeTerminal,HomeTerminalAddress,DriverLicenseNumber,LicenseState,Ruleset,YardMoveAllowed,PersonalConveyanceAllowed
Email2,FirstName,LastName,Password,GroupName1|GroupName2|...|GroupNameN,ReportingGroupName1|ReportingGroupName2|...|ReportingGroupNameN,SecurityClearanceId,NfcKey,,EmployeeNumber,,,,TimeZone,AuthorityName,AuthorityAddress,CarrierNumber,HomeTerminal,HomeTerminalAddress,DriverLicenseNumber,LicenseState,Ruleset,YardMoveAllowed,PersonalConveyanceAllowed
Email3,FirstName,LastName,Password,GroupName1|GroupName2|...|GroupNameN,ReportingGroupName1|ReportingGroupName2|...|ReportingGroupNameN,SecurityClearanceId,NfcKey,,,,,,,,,,,,,,Ruleset,,