Set up a Highway integration using dynamic objects
Edited

Overview

Front leverages dynamic objects to connect to Highway, enabling your team to get access to information from Highway without having to context switch out of Front or trigger Front automation based on Highway data. If you're just getting started with dynamic objects, check out these Front articles to learn more: How to create dynamic objects and Create dynamic objects with third-party data.

In this article, we’re focusing on two Front <> Highway use cases:

  1. Dynamic object - Gathering information relevant to an MC number

  2. Dynamic object - Detecting Carrier fraud via the sender's email address 


Prerequisites

  1. You must have an API key from Highway. As long as you have access to a Highway’s API you can retrieve the dynamic object data you're looking for, but without an API Key, you won’t have access to retrieve data. 

  2. You must be a Front company admin.


General configuration: Create an app/server in Front

To start, you need to create an app and a server to house the dynamic objects and make API requests. We recommend you create one app/server in Front for both of the use cases detailed above. 

Step 1

Navigate to the Developers page in settings and click the Create app button. You’ll be asked to provide a name for your app and a short description. 

Step 2

Once you’ve created your app, select the Servers tab, click Create server, and set the Origin field to the URL origin of your API. The origin would be https://staging.gohighway.com (for staging) or https://gohighway.com (for production).

Step 3

Next, set the Authentication strategy used by the API to Bearer. If you don't see the Bearer option, please contact us.

Step 4

Click back into the server you created and set the Local credentials (box on the right). This is where you’ll add the API token provided to you from Highway. Once you click Save, your server is now ready to make API requests.


Creating dynamic objects

Use case #1: Gathering information relevant to an MC number

Front will identify an MC number in an email message (email subject or email body) and comment (or only in comments, depending on your preference) to generate a dynamic object that will contain useful data from Highway and make it visible on the conversation. 

Step 1: Configure a dynamic object for an MC number

Click into your Highway app, navigate to the Features tab, click See all dynamic object configurations under the “Dynamic object configuration” card, then click Configure dynamic object to create a new one.

Select Transform text into dynamic objects because we will match against text like “MC#1234” in this use case.

Step 2: Define the text pattern 

Next, define the format for the text pattern for the MC number that the dynamic object should match against. This should be a combination of static characters and dynamic characters, without any spaces. (For example, MC123456)

Make sure your text pattern format is defined as strictly as possible to prevent unwanted matches. Examples:

  • If you know that a portion of your text pattern will always be digits, use the Digits variable instead of the Letters or digits variable.

  • If you know that a portion of your text pattern will always have a defined length (for example, exactly three digits), make sure you define the variable as such. You can click on a variable to set its length.

Step 3: Use the server to enrich your dynamic object

To begin creating the dynamic object, you’ll want to start by fetching data from Highway and saving them as dynamic variables. Please follow the instructional video on how we pull in these 3 key JSON blocks:

🎥 Video: Building the 3 “key” json response objects 

Video correction: In the video, under Fetch from server, we're using an inaccurate endpoint. Please make sure you use this updated Highway endpoint in the build: https://staging.gohighway.com/core/connect/external_api/v1/carriers?q[identifiers_value_eq]=[Digits1]&q[identifiers_is_type_eq]=MC (remove staging from the URL if you are using the production environment)

If you don't, an error will be encountered, as q[identifiers_value_is_type_eq]=MC is an invalid search term identifier. It needs to be q[identifiers_is_type_eq]=MC.

Step 4: Extract dynamic object values from the 3 JSON blocks

Now that we have our 3 “key” JSON blocks/objects, we can begin to extract the other pieces of data that we want to collect in order to complete our dynamic object. Please follow this instructional video to see how we extract other pieces of data that we’re looking to collect:

🎥 Video: Extract additional values from the 3 “key” json block/objects

Note: The additional data points extracted:

 <Fetch MC Object>

  1. ID Number

  2. Legal Name

  3. Overall Result 

  4. <Address JSON>

    1. City

    2. State

  5. <Contact information JSON>

    1. Phones (dispatch)

    2. Email (dispatch)

  6. DOT Number

  7. Connection Status

Step 5: Define the URL link when a dynamic object is created

Once the dynamic variables are created, you can go back to building out the rest of the dynamic object, starting with the target URL. We recommend linking the dynamic object to the carrier profile in Highway. You can accomplish this by using the ID Number dynamic variable and include it in the Highway endpoint: https://staging.gohighway.com/broker/carriers/[ID Number] (again, remove staging if you’re using the production environment)

Please follow along in this video as we define the URL link for Front to create when a dynamic object is generated

🎥 Video: Define the URL link for Front to create when a dynamic object is generated

Step 6: Define the custom fields for your dynamic object

Next is defining how your dynamic object is going to look. Please follow along in this video as we add custom fields and map the dynamic variables to them.

🎥 Video: Define additional fields for the dynamic object and map the dynamic variables to those fields

Step 7: Test the dynamic object

Finally, you can test the dynamic object you’ve built. In the Test pattern module, enter a valid MC number that matches the text pattern and check out the preview.

Use case #2: Detecting Carrier fraud via the sender's email address 

Front will pull identity information from Highway using a sender’s email address. To accomplish this you’ll need to build Smart Rules - one to extract the sender’s email address and another optional one if you want to quarantine emails from potential bad actors. 

Step 1 

Click into your Highway app, navigate to the Features tab, click See all dynamic object configurations under the “Dynamic object configuration” card, then click Configure dynamic object to create a new one. Select Transform URLs into dynamic objects.

Step 2: Define the URL

Next, define the URL pattern for the sender’s email address that the dynamic object should match. For this use case, the URL pattern should be mailto:[Printable characters].

Printable characters is a beta feature that needs to be enabled by Front's support team. Please contact us if you need access to this. Note that implementation details may change in the future, which would require updates to be made at a later time.

Step 3: Use the server to enrich our dynamic object

To begin creating the dynamic object, you’ll want to start by fetching data from Highway and saving them as dynamic variables. Please follow this instructional video as we fetch a response from Highway’s server. This is the Highway HTTPS endpoint that’s used: https://staging.gohighway.com/core/connect/external_api/v1/carriers/email_search?email=[PRINTABLE] (remove staging if you’re using the production environment).

🎥 Video: Getting an initial json response from Highway by using the sender's email address in an API call

Step 4: Extract additional values from the initial json response (<Server JSON Output dynamic variable)

Now, we can extract the pieces of data that we want to collect in order to complete our dynamic object. Please follow this instructional video as we pull in the other pieces of data:

🎥 Video: extracting data points from the initial json output

Note: The additional data points extracted:

 <Server JSON Output>

  1. User is Blocked

  2. User Company is Blocked

  3. User Company Carrier Identity Alert Ids

  4. Email Address Identity Alert Ids


Step 5: Define the custom fields for your dynamic object

Next is defining how your dynamic object is going to look. Please follow along in this video as we add custom fields and map the dynamic variables to them.

🎥 Video: Define additional fields to generate for the dynamic object, and map dynamic variables to those fields

Step 6: Test the dynamic object

Finally, you can test the dynamic object you’ve built. In the Test URL module, enter a valid carrier email that matches the text pattern and check out the preview.

Note: Besides seeing the data in the preview, we can tell all of the API calls were successful and all data points were extracted successfully as there is a purple dot indicator next to each dynamic variable on the right-hand side showing it was a success.

Step 7

Next, we need to create two Smart Rules so that whenever someone sends an email, Front will automatically add a comment with the sender’s email address, but only once per conversation to minimize potential noise. These rules can be created in either the team workspace or at the company level depending on the inboxes you want to target.

Example: The first tim
e “mailto:Andersen@front.com” sends an email, we want to create a dynamic object to verify his identity; however, the second time to verify his identity, we receive an email from “mailto:Andersen@front.com” on the same conversation we don’t want another dynamic object to be created.

🎥 Video: Create a Front smart rule that automatically adds a comment on the conversation and lists the email sender’s email address in the comment

Video notes:

  • In the video above, in the second rule's Then…Add comment action, we only added the dynamic variable called Sender's Email address in the comment. You can customize the comment to add “and [Highway Profile](insert appropriate url here)” which will enable you to create a quick link to the Highway profile page.

  • Staging url = https://staging.gohighway.com/broker/carriers/contact-search?email=[Dynamic Variable - Sender's Email address]

  • Production url = https://gohighway.com/broker/carriers/contact-search?email=[Dynamic Variable - Sender's Email address]

Step 8

Finally, we can create Front automations that reference the values within a dynamic object. For example, if our email sender is a bad actor, we can have Front notify a manager, tag the conversation as being a fraud alert, add a comment to warn the end-user, and then “quarantine” the conversation by moving the conversation to a quarantine inbox.

Please watch this instructional video to see an example rule you can build:

🎥 Video: Creating powerful automation in Front based upon the data populated in our dynamic object from Highway


Pricing

Dynamic objects connected to third-party data are available on the Scale plan or above.