Click or drag to resize
Site table
Print this page

The Site table provides access to the markers defined for your organization. A marker contains information about the location it represents, such as opening hours, access restrictions, and contact information.

The information accessible in the Site table is largely the same as the information available in the Marker table, except that the Site table contains additional columns not available in the Marker table (for example, multiple addresses, the yard shape, and marker attributes).

All new integrations dealing with markers should use the Site table, not the Marker table.

This topic contains the following sections:

Requirements

To Create a new marker, at a minimum the following columns must be provided:

  • Name
  • Location or an Address.

You can supply marker address data in raw or structured format. For details, see the Address data type documentation.

When only the Name and Location are provided, then the ShapeType defaults to Circle, and the Radius defaults to 500 feet. If the Name, Location, and Radius are provided but not the ShapeType, then the ShapeType is set to Circle. If you provide the Name and Location and set the ShapeType to Polygon, then the Yard column is also required on Create.

To Update or Delete a marker, only the Id is required.

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

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

    TableID = Site-1.0

  2. Specify an Intent that this table supports:

    • Retrieve
    • Create
    • Update
    • CreateOrUpdate
    • Delete

  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 does not require the use of a fetcher. However, the following fetchers are available to optimize your query 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. UserId (Equals)
      [Filter]
      UserId = Equals("ABC123")   # You can filter on literals or variables from the [User] or [Calculated] section.
    3. UpdateTime (GreaterThan)
      [Filter]
      UpdateTime = GreaterThan(StartTime)   # Filter on literals or variables from the [User] or [Calculated] section.
    4. UpdateTime (Between)
      [Filter]
      UpdateTime = Between(StartTime,EndTime)   # Filter on literals or variables from [User] or [Calculated]
    5. Name (Equals)
      [Filter]
      Name = Equals("SiteName")    # You can filter on literals or variables from [User] or [Calculated]
    6. Yard (ContainsPoint(Latitude,Longitude))

      This fetcher filters by whether the boundary of a marker's yard contains a location, identified by latitude and longitude. If you filter on literals (Example 1), then you must define a default unit of measure for the Angle data type in the [Defaults] section. If you filter on input from the [User] section, then you can either define the unit of measure in the [Defaults] section or for each line in the [User] section as shown in Example 2.

      Example 1
      [Defaults]
      Angle=Degree     # Sets the default unit of measure for the Latitude and Longitude literals in the [Filter] section
      
      [Filter]
      Yard = ContainsPoint(30.39761,-97.72958)  # Filters markers by literal values
      Example 2
      [User]     # Sets the Latitude and Longitude by query string, for example: &Latitude=30.39761&Longitude=-97.72958
      Latitude(Angle,Degree) = “latitude”        # Sets the data type and unit of measure for Latitude
      Longitude(Angle,Degree) = “longitude”      # Sets the data type and unit of measure for Longitude
      
      [Filter]
      Yard = ContainsPoint(Latitude,Longitude) # Filters markers by input from the [User] section
Supported table options

This table supports the following option, which can be set in the [TableOptions] section.

  • LocationAddressSync - This table option is Boolean and can be omitted. This option controls how the Location and primary address (Addresses[0]) are assigned during a Create or Update operation. The following tables describe the behavior of this option for the Create intent and Update intent.

    Create Intent

    Value

    Description

    Not set

    The default behavior will be the following:

  • Location provided/Addresses[0] empty: Will assign the Addresses[0] value.
  • Addresses[0] provided/Location empty: Will assign the Location value.
  • Both provided: Will use the values as provided.
  • True

    The default behavior will be the following:

  • Location provided/Addresses[0] empty: Will assign the Addresses[0] value.
  • Addresses[0] provided/Location empty: Will assign the Location value.
  • Both provided: Will use the values as provided.
  • False

    The default behavior will be the following:

  • Location provided/Addresses[0] empty: An error is thrown. Both the Location value and the Addresses[0] value must be set during Create since values will not be synced.
  • Addresses[0] provided/Location empty: An error is thrown. Both the Location value and the Addresses[0] value must be set during Create since values will not be synced.
  • Both provided: Will use the values as provided.
  • Update Intent

    Value

    Description

    Not set

    The default behavior will be the following:

  • Location provided/Addresses[0] empty: Will update the Location value only.
  • Addresses[0] provided/Location empty: Will update the Addresses[0] value only.
  • Both provided: Will update the values as provided.
  • True

    The default behavior will be the following:

  • Location provided/Addresses[0] empty: Will update the Addresses[0] value to the reversed geocode of the Location value.
  • Addresses[0] provided/Location empty: Will update the Location value to the geocode of the Addresses[0] value.
  • Both provided: Will update the values as provided.
  • False

    The default behavior will be the following:

  • Location provided/Addresses[0] empty: Will update the Location value.
  • Addresses[0] provided/Location empty: Will update the Addresses[0] value.
  • Both provided: Will update the values as provided.

Site column descriptions

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 marker.
UpdateTime Timestamp (read-only) The date and time when this marker was last updated.
Name Text (required on Create) The name of the marker.
UserId Id<User> (read-only) The ID of the user who created the marker.
Location Location The latitude and longitude for the location of the marker.
Yard Polygon The points defining a marker's boundary in a Well Known Text (WKT) format. The WKT string cannot be greater than 10 MB. WKT example: "POLYGON((-120.06252 36.08499, -115.07387 35.8306, -117.65138 33.74055, -120.06252 36.08499))".
Addresses Array<Address> An array of addresses associated with the marker. The first address in the array is the primary address for the marker. Each address in the array has a Label subfield that describes the address. Note that the Coordinates subfield is not supported in this column.
Description Text A description of the marker.
PhoneNumbers Set<PhoneNumber> A set of phone number objects associated with the marker. Each object can contain Type, Contact, and Number values.
Intersection Location The latitude and longitude for the street intersection of the marker.
Tags Set<Text> A list of tags assigned to the marker. Note that the tags must already be assigned for the account: you cannot create new tags here.
Radius Distance The radius of the marker (for markers with a Circle ShapeType).
DriverId Id<Driver> The ID of the driver associated with the marker (For example, the driver with a job assigned at the marker).
PrimaryCategoryId Id<Category> The ID of the marker's primary category.
CategoryIds Set<Id<Category>> Set of IDs of the categories to which this marker belongs. Updates must include the full set of desired IDs.
TerritoryId Id<Territory> The ID of the territory to which the marker belongs. To clear the territory, set the TerritoryId to 0.
TerritoryName Text (read-only) The name of the territory to which the marker belongs.
ShapeType EnumType Indicates whether the marker's yard has a circle or a polygon shape. Values: Circle, Polygon.
IsZone BoolType Indicates whether the marker is a zone marker. Zone markers report the vehicles actual location rather than "snapping" vehicle locations to the marker location. In addition, zone markers can have assigned speed limits.
SpeedLimit Speed Maximum speed (in default units) for vehicles driving within the boundaries of the marker. This value is only used for zone markers.
Notes Text Free-form notes about the marker.
Attributes Map<Text,Text> Attributes of the marker. Map of Attribute ID to value. Value constraints are determined by the type of the attribute. See Attribute table for details.

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.
Custom columns
Column Data Type Description
Custom.name Text Specifies a user-defined custom column name to store additional information in the table. If the column name contains non-alphanumeric characters, enclose the value in brackets, for example Custom.[Special column].