Streamline carrier onboarding and data sync with MyCarrierPortal.
FTM’s My Carrier Portal integration connects your TMS with MyCarrierPackets (MCP), allowing you to invite carriers, automatically collect packet data (insurance, W9, etc.), monitor risk & compliance status, and sync updates in real time or on demand.
What is My Carrier Portal (MCP)?
My Carrier Portal (also known as MyCarrierPackets) is an online platform that simplifies carrier onboarding. Carriers receive packet invitations (Intellivite) to complete required forms, and once done, their documents, compliance data, and contact info are synced automatically into the TMS. The system supports ongoing monitoring (risk assessments, blocked status), equipment type mapping, and configurable sync behavior (overwrite settings vs. manual/once-only sync).
This document describes the Salesforce Apex integration between MyCarrierPackets (MCP) and FreightTM, designed to automate carrier onboarding.
When a new carrier completes their packet in MCP, a webhook is triggered
(/services/apexrest/mcp/webhook).
Salesforce receives the event, validates it, retrieves the carrier’s DOT number, queries additional carrier details from MCP APIs, and then performs the following actions:
- Creates or updates the corresponding
FreightTM__Carrier__c
record in Salesforce. - Downloads and stores insurance and compliance documents as Salesforce Files (
ContentVersion). - Sends an email notification to the responsible team or customer contact.
Benefits of the Integration
- Automate carrier onboarding via Intellivite invitations
- Auto-create carrier profiles in Salesforce when matching key identifiers (DOT, MC)
- Sync critical data: insurance certificates, payment/factoring details, dispatch contact info, W9s, preferred regions, etc.
- Real-time or near-real-time monitoring of risk status and blocked carrier flags
- On-demand sync capability for individual carriers
- Overwrite setting allows control over whether MCP data always replaces existing data or only supplements it
Prerequisites
- Admin access to both MCP and Salesforce / FTM
- MCP account set up with Integration Tools enabled
- Credentials (username & password) for MCP integration source
- Salesforce permissions to create custom fields, Apex/Flow, manage API/webhook endpoints
- Sandbox environment available for testing
Sandbox Access
- Username: [your sandbox MCP username]
- Password: [your sandbox MCP password]
Step-by-Step Integration Guide
Below is the procedure for setting up the MCP integration in FTM/Salesforce, adapted from the MCP & Tai-Software docs.
1.Create MCP Integration Credentials & Source
- Log into your MCP account
- Go to Integration Tools → Add Integration
- Select your company’s name from the drop-down (Integration Source Type: MyCarrierPortal)
- Provide a Username and Password to be used by FTM to fetch data
- Create a new “Integration Source” in TMS/FTM:
- Fill in Source Description, Source Group (Other), Source Type (MyCarrierPortal)
- Link it to your parent organization (Account)
When this is done, an Initial Sync will pull up to 5 years of carrier data from MCP into your system.

2. Webhook Event Handling
Class: MCPWebhookService
Endpoint: /services/apexrest/mcp/webhook
- Receives HTTP POST requests from MyCarrierPackets.
- Validates request authenticity using HMAC-SHA256 signature (
verifySignature()). - Deserializes the JSON payload.
- Dispatches event processing to
MCPEventController.handleCarrierPacketCompleted().
3. Authentication
Class: MCPAuthenticationService
- Performs
POSTtohttps://api.mycarrierpackets.com/tokenusing password-grant OAuth flow. - Returns an
access_tokenstring used for subsequent MCP API requests.
Data Fetching & Carrier Record Creation
Class: MCPEventController
- Extracts DOT number from the webhook payload.
- Calls MCP API
/api/v1/Carrier/GetCarrierData?DOTNumber={dot}. - Parses response JSON for:
- Carrier details (Legal Name, DBA, Address, etc.)
- Insurance certificates (
CertData) - Factoring information
- Risk assessment metrics
- W9 details
- Upserts (insert/update)
FreightTM__Carrier__crecord using mapped fields.
4. Intellivite Invitations and Carrier Profile Creation
- From the LSP Carrier List (or Truckload Quoting if applicable), send a packet invitation (Intellivite) to the carrier using Name / SCAC / DOT / MC number etc.
- The carrier completes the packet via MCP
- When the packet is completed, the system imports carrier details: factoring, remit info, preferred regions, W9, insurance, etc.
- If the carrier already exists, MCP will disable the existing profile, await the new packet, and import updates

5. Monitoring & Risk Assessment
- The system continuously monitors MCP’s risk assessment status (e.g. Authority, Safety, Insurance status, etc.) for each monitored carrier, typically every ~4 minutes
- If a carrier is marked as “blocked” in MCP, the same status is applied in Salesforce / FTM
- Conversely, blocked status in FTM may restrict actions in MCP
6. Data Mapping & Sync Behavior
When carrier data is imported from MCP, the following data points are typically included:
- Agreements & Equipment Types
- Insurance details & certificates
- Factoring companies & remit address info
- Dispatcher & Driver contact data
- Preferred regions, payment terms, shipment types
- W9 & Tax IDs
The Overwrite Setting allows you to control how updates from MCP are handled:
- If overwrite = true → MCP data will replace existing data in your carrier profiles
- If overwrite = false → existing data is preserved; MCP data only fills gaps or on-demand syncs
7. On-Demand Sync & Manual Updates
- In the Carrier’s profile, there is a “Sync Carrier Data” button to force update from MCP
- Useful for when data has changed in MCP and you want to pull updates without waiting for scheduled monitoring
8. Document Download
Method: saveCarrierDocumentFuture()
Annotation: @future(callout=true)
- Invoked asynchronously to download the insurance document or certificate file.
- Calls MCP API
/api/v1/Carrier/GetDocument?name={blobName}. - Saves returned binary content as a Salesforce
ContentVersionfile.
9. Email Notification
Method: sendCarrierInsertedEmail()
- Sends an automated email to a predefined contact notifying that a new carrier has been added.
- Includes carrier name, DOT number, and a direct Salesforce record link.
Key Classes and Responsibilities
| Class Name | Purpose |
MCPWebhookService | REST endpoint for incoming webhook events from MCP. |
MCPAuthenticationService | Handles OAuth2 authentication to obtain access tokens. |
MCPHttpRequest | Generic HTTP client wrapper for calling MCP endpoints. |
MCPEventController | Core logic for processing webhook events, fetching carrier data, updating Salesforce, and handling documents & notifications. |
Security
- Signature Verification: Each webhook request is validated via HMAC-SHA256 using a shared secret (
YOUR_WEBHOOK_SECRET). - Token Handling: Access tokens are generated on-demand from MCP and not persisted in Salesforce.
- Callout Security: All external endpoints must be added to Salesforce Remote Site Settings or Named Credentials:
○ https://api.mycarrierpackets.com/
Salesforce Object Mapping
| MCP Field | Salesforce Field (Carrier) |
LegalName | Name |
DOTNumber | FreightTM__USDOT_Number__c |
MCNumber | FreightTM__MC_MX_FF_Number__c |
DBAName | FreightTM__Title__c |
Phone | FreightTM__Phone__c |
Email | FreightTM__Email__c |
City | FreightTM__City__c |
State | FreightTM__State_Province__c |
Zipcode | FreightTM__Zip_Code__c |
Country | FreightTM__Country__c |
Address1 | FreightTM__Address__c |
SCAC | FreightTM__SCAC_Code__c |
FactoringCompanyName | Factoring_company_name__c |
OverallRisk | Risk_assesment__c |
TotalPowerUnits | Total_power_units__c |
W9.FullName | W9_Name__c |
W9.Address | W9_address__c |
W9.CityStateZipCode | W9_city__c |
W9.EIN | FreightTM__Federal_ID__c |
Deployment
Here is how to move from Sandbox to Production:
- Set up all custom fields (e.g. Preferred Regions, Factoring, Insurance, W9, etc.) in Sandbox
- Configure integration source & named credentials with MCP credentials
- Add UI elements: “Sync Carrier Data” button, Carrier profile screens
- Deploy Apex/Flow logic + overwrite settings, mapping behavior
- Validate with test data: sending Intellivite, updating carrier in MCP, confirming sync reflects in Salesforce
- In Production, swap sandbox credentials / endpoints to live MCP credentials
Deployment Prerequisites
- Add Remote Site Setting:
https://api.mycarrierpackets.com - Configure Named Credential (optional but recommended) for secure token handling.
- Store
YOUR_WEBHOOK_SECRETsecurely (Custom Metadata or Protected Custom Setting). - Deploy Apex classes and test classes.
- Register the Salesforce webhook URL in MCP Dashboard:
https://<your-domain>.my.salesforce.com/services/apexrest/mcp/webhook
Troubleshooting
| Issue | Possible Fix |
| Carrier not imported after completing Intellivite | Confirm matching key (MC / DOT / SCAC) and that the inbound profile is monitored |
| Overwrite setting causing unintended changes | Toggle overwrite off or limit fields that are overwritten |
| Risk assessment not updating | Verify monitoring is enabled and polling frequency is correct |
| Manual sync not visible or not working | Check profile permissions and button layout settings |
Error Handling & Logging
- Extensive
System.debug()statements track each processing step. - All exceptions are caught, logged, and prevented from halting subsequent webhook executions.
- HTTP responses and status codes are logged for traceability.
Email Notification Template
- Subject:
New Carrier Added: {!Carrier.Name} - Body:
- 1.
Hello, - 2.
- 3.
A new carrier has been added to the system: - 4.
{!Carrier.Name} - 5.
DOT Number: {!Carrier.FreightTM__USDOT_Number__c} - 6.
- 7.
You can view the carrier details here: - 8.
{!RecordLink} - 9.
- 10.
— Automated Notification
- 1.
Need Help?
For guidance, screenshots, or assistance with setup or deployment, contact the FTM integration team at [email protected]
