This is not an official Onfleet product
The connector script can be used with Data Studio to view and analyze performance metrics from Onfleet.
- Create a new project on Google Apps Script
- Copy paste the source files of the current connector or create a new one
- In the Apps Script development environment, click on
Publish
>Deploy from manifest
to use the connector in Data Studio
getAuthType
defines the authenication scheme the connector uses (username-password in this case) and stores the credentials passed in from Data Studio in a property store that only the current user can access, and only within this script.
getConfig
defines the configuration options that are available to the user. In this connector, the user can define the Onfleet table (e.g. taskCompletionResult, taskType, etc.), the secondary dimension (e.g. day, week, month, etc.), and optionally the ID of an Onfleet team or driver.
getSchema
returns the list of columns and the columns' data types that are available from the data source based on the configuration parameters provided by the user.
Finally, getData
authenticates Onfleet's analytics API using the user's credentials, fetches the data from the API using an HTTP request based on the user's configuration parameters, and returns the data in a format that is readable by Data Studio.