Setting Up HubSpot Integration for Toll Data Management

In this post, we will guide you through the process of setting up a HubSpot integration for managing toll data. The integration involves creating and associating custom objects in HubSpot to streamline toll record management and vehicle contracts.

Introduction

HubSpot provides powerful tools for managing customer relationships and business processes. By integrating toll data management with HubSpot, you can automate toll record creation, associate tolls with vehicle contracts, and maintain a comprehensive record of toll-related activities. This blog post will cover the configuration requirements, steps to obtain necessary IDs, and how to fill out the integration form.

Configuration Form Fields

To set up the HubSpot integration, you’ll need to fill out a configuration form with specific details. Let’s walk through each field in the form and explain what is required.

1. Access Token

  • Type: Text Input
  • Description: The access token required to authenticate requests to the HubSpot API.

2. Toll Custom Object Type Id

  • Type: Text Input
  • Description: The custom object type ID for tolls in HubSpot. This ID is required to identify the toll custom object.

3. Toll Vehicle Association Id

  • Type: Text Input
  • Description: The association type ID between tolls and vehicles in HubSpot. This ID is required to link toll records with vehicle contracts.

4. Vehicle Custom Object Type Id

  • Type: Text Input
  • Description: The custom object type ID for vehicles in HubSpot. This ID is required to identify the vehicle custom object.

5. Match Toll Based On Vehicle Agreements Date

  • Type: Checkbox
  • Description: If checked, tolls will be matched based on the vehicle agreements date. This ensures that tolls are correctly associated with the appropriate vehicle contracts based on their active agreement periods.

6. Vehicle Agreement End Date Property Internal Name

  • Type: Text Input
  • Description: The internal name of the property for the vehicle agreement end date. This field is required if matching tolls based on vehicle agreements date.

7. Vehicle Agreement Start Date Property Internal Name

  • Type: Text Input
  • Description: The internal name of the property for the vehicle agreement start date. This field is required if matching tolls based on vehicle agreements date.

8. Vehicle Custom Object Property Internal Name For Plate State

  • Type: Text Input
  • Description: The internal name of the property for the vehicle’s plate state. This field is required to identify the vehicle’s plate state.

9. Vehicle Custom Object Property Internal Name For Plate Number

  • Type: Text Input
  • Description: The internal name of the property for the vehicle’s plate number. This field is required to identify the vehicle’s plate number.

Example Configuration Form Filling

Here is an example of how the form might be filled out:

  • Access Token: [Your HubSpot Access Token]
  • Toll Custom Object Type Id: 2-31601055
  • Toll Vehicle Association Id: 140
  • Vehicle Custom Object Type Id: 2-31442987
  • Match Toll Based On Vehicle Agreements Date: [Checked]
    • Vehicle Agreement End Date Property Internal Name: rental_end_date
    • Vehicle Agreement Start Date Property Internal Name: rental_start_date
  • Vehicle Custom Object Property Internal Name For Plate State: plate_state
  • Vehicle Custom Object Property Internal Name For Plate Number: license_plate

Obtaining Required IDs and Property Internal Names

1. Access Token

To interact with HubSpot’s API, you’ll need an access token. Here’s how you can generate one:

  1. Navigate to your HubSpot account.
  2. Go to Settings > Integrations > API Key or Private Apps.
  3. Create a new API key or private app to generate an access token.
  4. Copy and paste the access token into the Access Token field in the configuration form.

2. Custom Object Type IDs

You need to create custom objects for tolls and vehicles in HubSpot and note down their IDs:

  1. Navigate to Settings > Objects > Custom Objects in HubSpot.
  2. Create custom objects for tolls and vehicles.
  3. Note down the IDs assigned to these custom objects, and enter them in the Toll Custom Object Type Id and Vehicle Custom Object Type Id fields.

3. Association IDs

Set up associations between the toll and vehicle custom objects to manage relationships:

  1. Navigate to Settings > Objects > Associations.
  2. Set up the association between the toll and vehicle custom objects.
  3. Note down the ID assigned to this association and enter it in the Toll Vehicle Association Id field.

4. Property Internal Names

For each custom object, navigate to Settings > Objects > Custom Objects and note down the internal names of the required properties:

  1. Select the custom object (toll or vehicle).
  2. Navigate to Properties.
  3. Note down the internal names for:
    • Plate number: Enter in Vehicle Custom Object Property Internal Name For Plate Number.
    • Plate state: Enter in Vehicle Custom Object Property Internal Name For Plate State.
    • Agreement start date (if applicable): Enter in Vehicle Agreement Start Date Property Internal Name.
    • Agreement end date (if applicable): Enter in Vehicle Agreement End Date Property Internal Name.

Required Custom Object Properties

Toll Custom Object

The toll custom object must have the following properties and types:

  • id: String - Unique identifier for the toll.
  • amount: Number - Amount of the toll.
  • fee: Number - Fee associated with the toll.
  • exit_plaza: String - Exit plaza where the toll was collected.
  • exit_plaza_cash_cost: Number - Cash cost at the exit plaza.
  • posting_date: Date - Date the toll was posted.
  • transaction_date_time: Datetime - Date and time of the toll transaction.

Ve hicle Custom Object

The vehicle custom object must have the following properties and types:

  • vehicle_custom_object_property_internal_name_for_plate_number: String - Internal name for the plate number property.
  • vehicle_custom_object_property_internal_name_for_plate_state: String - Internal name for the plate state property.

If Match Toll Based On Vehicle Agreements Date is checked, the following properties are also required:

  • vehicle_agreement_start_date_property_internal_name: Date - Internal name for the agreement start date property.
  • vehicle_agreement_end_date_property_internal_name: Date - Internal name for the agreement end date property.

Required Scopes

To use this integration, you must have the following scopes in your HubSpot access token:

  • crm.objects.custom.read - Required to read custom objects.
  • crm.objects.custom.write - Required to write custom objects.
  • crm.schemas.custom.read - Required to read custom object schemas.
  • crm.objects.contacts.read - Required to read contacts.
  • crm.schemas.contacts.read - Required to read schema contacts.

These scopes are required to access and manage custom objects and schemas in HubSpot.

Setting up HubSpot integration for toll data management can significantly streamline your business processes. By following the steps outlined in this post, you can ensure that your toll data is accurately managed and associated with vehicle contracts in HubSpot. For more detailed instructions, refer to the official HubSpot documentation. If you encounter any issues or need further assistance, please contact HubSpot support.