Skip to content
Home » Linehaul

Linehaul

Linehaul Integration

Connect carriers and linehaul operations directly into FTM.cloud.
FTM’s Linehaul integration streamlines how carriers are onboarded, managed, and updated in Salesforce. By connecting with MyCarrierPackets (MCP), this integration automates data flow between carriers, dispatch, and back-office teams, eliminating manual entry and ensuring your linehaul operations always run smoothly.

What is Linehaul Integration?

Linehaul refers to the long-distance movement of freight, often between distribution centers, ports, or hubs. Managing this process requires constant coordination with carriers, accurate documentation, and real-time updates.

The Linehaul integration connects Salesforce and FTM.cloud with carrier packet systems like MyCarrierPackets. This allows carriers to submit onboarding packets, insurance details, preferred lanes, and factoring information directly into your TMS. With webhook-based automation, any carrier updates in MCP are immediately reflected in Salesforce, ensuring your records stay accurate and up to date.

Benefits of the Integration

  • Automated Carrier Onboarding: Eliminate manual data entry with direct MyCarrierPackets integration.
  • Real-Time Updates: Sync carrier insurance, factoring, and compliance details automatically.
  • Streamlined Operations: Dispatchers and back-office staff have instant access to the latest carrier information.
  • Custom Workflows: Use Flows or Process Builder to extend the integration into billing, safety, or load assignment processes.
  • Scalable & Secure: OAuth and Named Credentials ensure data integrity while supporting enterprise security standards.

Prerequisites

Before beginning setup, make sure you have:

  • ✅ Salesforce Admin access
  • ✅ Sandbox login for testing
  • ✅ MyCarrierPackets API credentials
  • ✅ Integration user configured with correct permissions

Sandbox Access

Use these credentials for testing in the sandbox:

  • Username: [sandbox username]
  • Password: [sandbox password]

Step-by-Step Integration Guide

1. Configure Named Credentials

  1. In Salesforce, go to Setup → Security → Named Credentials
  2. Click New Named Credential
  3. Enter the following:
    • Label: LinehaulAPI
    • URL: https://sandbox.mycarrierpackets.com/api
    • Identity Type: Named Principal
    • Authentication Protocol: Password Authentication
  1. Enter your sandbox username and password
  2. Save

2. Create New Required Fields

Add new custom fields to your Carrier object to capture Linehaul and MCP data. Examples include:

Field NameTypeDescription
Preferred_Lanes__cTextCarrier’s preferred operating lanes
Number_of_Trailers__cNumberAvailable trailers for linehaul
Cargo_Insurance__cCurrencyInsurance coverage amount
Factoring_Company__cLookupFactoring company associated with carrier
Linehaul_Status__cPicklistCurrent carrier onboarding status

3. Connected Apps & OAuth Setup

  1. Navigate to Setup → App Manager → New Connected App
  2. Enter the app name (e.g., Linehaul Integration)
  3. Configure OAuth settings with scopes:
    • Access and manage your data (api)
    • Perform requests on your behalf (refresh_token, offline_access)
  4. Add callback URL for the integration
  5. Save and note the Client ID and Client Secret

4. APEX Code for API Callouts

Create an Apex class to manage MCP webhook payloads and Linehaul API requests.

📎 Example: LinehaulService.cls

public with sharing class LinehaulService {

    @AuraEnabled

    public static String getCarrierDetails(String carrierId) {

        HttpRequest req = new HttpRequest();

        req.setEndpoint(‘callout:LinehaulAPI/carriers/’ + carrierId);

        req.setMethod(‘GET’);

        Http http = new Http();

        HttpResponse res = http.send(req);

        return res.getBody();

    }

}

5. Automation with Flow / Process Builder

  • Create a Record-Triggered Flow on the Carrier object
  • Trigger when a carrier record is created or updated
  • Call the LinehaulService Apex class to sync MCP data automatically

6. Add Button to Layout

  1. Navigate to Object Manager → Carrier → Page Layout
  2. Add a button labeled “Sync Linehaul Data”
  3. Map returned MCP/Linehaul fields such as Preferred_Lanes__c, Cargo_Insurance__c, and Factoring_Company__c

7. Configure Sharing Settings

Ensure correct access for integration users:

  • Carrier object: Read/Write
  • Insurance & Factoring fields: Visible to Admins and Dispatchers
  • Apex classes: Enabled for integration user profiles

8. VFP Code (Optional UI)

If you want to display carrier onboarding data in a custom UI:

📎 Attach the Visualforce Page (VFP) code as .txt file

Deployment

Once your integration is configured and tested in Sandbox, you’ll need to move the setup into Production. Deployment for the Linehaul integration follows Salesforce best practices and requires both metadata migration and API credential updates.

1. Prepare Change Sets

From Sandbox:

  1. Go to Setup → Outbound Change Sets
  2. Create a new change set (e.g., Linehaul_Integration_v1)
  3. Add the following components:
    • Custom Fields (Preferred_Lanes__c, Cargo_Insurance__c, etc.)
    • Named Credentials (LinehaulAPI)
    • Apex Classes (LinehaulService.cls, webhook handlers, test classes)
    • Visualforce Pages (if used)
    • Flows or Process Builder automations
    • Custom Buttons and Layout changes
  4. Upload the change set to Production

2. Validate and Deploy in Production

  1. In Production, go to Inbound Change Sets
  2. Select the uploaded change set and click Validate
  3. Confirm all tests run successfully
  4. Deploy the change set

3. Update Production Credentials

In Production:

  • Replace Sandbox Username & Password with Production credentials in Named Credentials
  • Update the endpoint from
    https://sandbox.mycarrierpackets.com/api
    to
    https://www.mycarrierpackets.com/api
  • Confirm the OAuth Connected App is active and assigned to the correct profiles

4. Post-Deployment Testing

After deployment, perform these tests in Production:

  • Carrier Onboarding: Create a new carrier via MyCarrierPackets and verify it syncs into Salesforce
  • Webhook Updates: Update insurance or factoring details in MCP and confirm Salesforce records update automatically
  • Manual Sync Button: Test the “Sync Linehaul Data” button to ensure Apex callouts return live data
  • Flows: Verify Record-Triggered Flows update fields correctly

5. Common Deployment Issues

IssueSolution
Test class failuresEnsure all Apex classes include valid test coverage
INVALID_SESSION_ID after deploymentRefresh OAuth token and re-authenticate Named Credential
Custom field missing on ProductionDouble-check that all fields were included in the change set
Webhook not firingVerify endpoint is correct and production domain is whitelisted in MCP

✅ With deployment complete, your Linehaul integration is now live and syncing data automatically between MyCarrierPackets and Salesforce.

Troubleshooting

IssueSolution
INVALID_SESSION_ID errorRe-authenticate OAuth or refresh Named Credential
Carrier updates not syncingConfirm webhook is enabled in MCP
Fields not mappingVerify custom field API names in Flow/APEX

.

Need Help?

📩 Contact the FTM integration team at [email protected] for assistance with configuration, deployment, or troubleshooting.

Leave a Reply

Your email address will not be published. Required fields are marked *


Let's Talk!

Thanks for stopping by! We're here to help, please don't hesitate to reach out.

Watch a Demo