Click or drag to resize
FuelTransaction table
Print this page

The FuelTransaction table holds data that is generated by importing fuel card transactions from fuel card vendors. This data is reconciled with data in Fleet, which makes it possible to validate and manage many aspects of these purchases, such as whether fueling occurred at an approved station.

Reconciliation

For every transaction, TDE reconciles the time and location of the imported transaction with the history received from the fueled vehicle. As part of reconciliation, it sets these values:

  • If MapMarkerStop is true, then the purchase occurred at a customer-defined Fuel Station marker (MapMarkerId).
  • If PoiStop is true, then the purchase occurred at a known Fuel Stop point of interest.
  • If neither of those is true, then the StopTime is set to the vehicle's stop that was closest in time and location to that of the transaction.
  • If StopTime is null, then the transaction is not yet reconciled, perhaps because the vehicle's points are not yet processed.

Inserting fuel transactions

When inserting fuel transactions, keep the following notes in mind:

  • Fuel transactions require that a location is specified from one of the following column sets: Address and Country, or Lat and Lon. Providing the Lat and Lon is preferred.
  • You must provide either a UnitId (recommended) or a VehicleName for each transaction. If the UnitId is provided and the transaction corresponds with the vehicle's location during the PurchaseWindow, then the Vin, VehicleAddressId, VehicleStreetNumber, AtLocation, AtPoi, MapMarkerId, and AtFuelStationMarker columns are automatically populated if that data is available. These are not populated if only the VehicleName is provided.

This topic contains the following sections:

Requirements

When you write templates that access this table, follow these requirements:

  1. Specify the Symbolic Name for the table version to use:

    TableID = FuelTransaction-1.0

  2. Specify an Intent that this table supports:

    • Retrieve
    • Create
    • Update
    • CreateOrUpdate

  3. Input templates: In your [Output] section, be sure to map an input value to every table column that is flagged as being a primary key or required.

  4. Retrieve templates: This table requires the use of a fetcher. The following fetchers are available and are listed from most efficient to least:
    1. Id (Equals/In)
      [Filter]
      Id(ExtId) = Equals(Id1)   # You can filter on literals or on variables from the [User] or [Calculated] sections.
      [Filter]
      Id(ExtId) = In(["Id1","Id2","Id3"])
    2. PurchaseTime (Between) AND DriverName (Equals)
      [Filter]
      PurchaseTime = Between(TimeStart,TimeEnd)  # Timestamp variables from User or Calculated section
      DriverName = Equals("Adam Smith")
    3. PurchaseTime (Between) AND UnitId (Equals)
      [Filter]
      PurchaseTime = Between(TimeStart,TimeEnd)
      UnitId(ExternalIdName) = Equals("ABC123")  # or use Telogis Id: UnitId = Equals("123456...")
    4. PurchaseTime (Between)
      [Filter]
      PurchaseTime = Between(TimeStart,TimeEnd)
FuelTransaction column description

This list includes each column's name, which you use in expressions to retrieve or create data, and data type, which defines how the data is retrieved and set.

Note Note
If a column of data type Id is a primary key OR if it refers to other tables (Id <OtherTable>), then you can map it to an external key or, in some cases, a Telogis key.
Column Data Type Description
Id Id (primary key) The ID of the fuel transaction.
UnitId Id<Unit> (recommended; only writable on Create) The ID of the vehicle being fueled. If you do not provide the UnitId, then you must provide the VehicleName, however some columns will not be automatically populated if only the VehicleName is given.
TransactionType Text (required; only writable on Create) Indicates how the fuel card was used. Values: Auth (fuel card was authenticated), Sale (purchase with fuel card was completed).
AccountNumber Text The fuel account that is associated with the CardNumber.
CardNumber Text The fuel card number, which must be a partial or masked number.
VehicleName Text (only writable on Create) The name of the vehicle.
DriverName Text The name of the driver to whom the fuel card was issued.
Longitude Angle (only writable on Create) The longitude of the fuel vendor.
Latitude Angle (only writable on Create) The latitude of the fuel vendor.
Address Text (only writable on Create) The address of the fuel vendor. (Not used if the Latitude and Longitude are set.)
Country Text (only writable on Create) The Country where the fuel vendor is located. (Not used if the Latitude and Longitude are set.)
FuelVolume Volume (required) The quantity of fuel purchased.
PurchaseAmount Number (required) The total cost of the fuel.
FuelType Text The type of fuel that was purchased. Values: Not_Set, Diesel, Gasoline, Ethanol, Propane, CNG, A_55, E_85, M_85, Gasohol, LNG, Methanol, Biodiesel, Other, Bulk_Diesel, Bulk_Gasoline, Bulk_Other.
PurchaseTime Timestamp When the fuel card transaction took place.
VehicleAddress Number (only writable on Create) The street's ID number used by Geobase, determined by matching the latitude/longitude provided to the closest point from Fleet. This address storage format represents the specific street location, such as "Main Street, Springfield, Iowa".
VehicleStreetNumber Number (only writable on Create) The address number used by Geobase, determined by matching the latitude/longitude provided to the closest point from Fleet. This address storage format represents the specific street address, such "12345".
PurchaseAddress Number (only writable on Create) The street's ID number used by Geobase, determined by the latitude/longitude provided. This address storage format represents the specific street location, such as "Main Street, Springfield, Iowa".
PurchaseStreetNumber Number (only writable on Create) The address number used by Geobase, determined by the latitude/longitude provided. This address storage format represents the specific street address, such "12345".
PurchaseWindow TimeInterval (write-only) The amount of buffer time given to match the time provided with the time from Fleet. For example, the value 10 creates a 20-minute buffer, for 10 minutes before and after the provided time. Defaults to 30 if not specified.
VehicleVin Text (read-only) The vehicle's VIN as provisioned in Fleet.
StopTime Timestamp (read-only) When the vehicle reported that it stopped at/near the fuel vendor. If no stop can be identified, this field is blank.
MapMarkerStop BoolType (read-only) True if the stop is at a fuel station map marker, false otherwise.
MapMarkerId Id<Marker> (read-only) When MapMarkerStop is true, this is the ID of the marker where the vehicle stopped for fuel.
PoiStop BoolType (read-only) True if the vehicle was not found to have stopped at the Address and Country but was at a known Fuel Stop Point of Interest. False otherwise.

Additional columns:

Column Data Type Description
CustomerId Id (read-only, all Fleet tables) The ID of the customer/owner.
CustomerFullName Text (read-only, all Fleet tables) The human-readable full name of the customer/owner.