Skip to main content
Version: 0.0.0

SFTP Export: In-house TMS Integration

This page contains information on how to integrate your In-house TMS with Chaine using a SFTP File export of loads.

For this integration, Chaine will provide you with an SFTP server credentials, server information and a folder path where you can upload your load files. The load files should be in CSV format and should contain all the fields that are required to create a load in Chaine (see below).

When to send a load in a CSV file

There are two strategies that can be utilized when sending loads in a CSV file:

  1. Send the entire load object with all the fields every time there is a change to the load: We recommend that you send the entire load object with all the fields below.
  2. Send all open loads and loads recently marked delivered every X minutes: If it is difficult to send a load whenever there is a change, you can send all the "active" loads (loads that have not delivered), and loads that have been marked delivered in the last 24 hours. This will ensure that all loads are up to date in Chaine. Chaine automatically handles the logic to update the load status based on the information in the CSV file. If a load hasn't changed, Chaine will not update the load.

| Note: If you find it hard to map to the exact field names, don't stress that too much. We can always do a custom field mapping for your file exports. You can just do a dump of all the files every X minutes, or if you have the ability to export a file whenever there is a change, that will work too. If needed, we'll map the fields to reduce the work from your end. If there is anything else we can do to make it easier on your end, just let us know and we'll handle it!

Load Object

Below is the load object and fields to send in a CSV fields. Not all fields are required, but the more fields you send, the more features you can utilize in Chaine.

If a load has multiple stop, you can send the other stops in the same CSV file as per the stopN example below. For us to process the other stops, it is required to send the totalStops. The best practice is to do the following:

  • Origin and Destination are required always required. Origin will be sequence 1 and Destination will be stop sequence as "totalStops"
  • If there are other stops, you can send them as stopN where N is the sequence number of the stop. For example, if there are 3 stops, you will have send the origin properties, destination properties, and stop2 properties.
  • We will only process the other stops if you provide the totalStops field.
  • When sending appointments, you can send either the fields suffixed with "Appointment" in the format "YYYY-MM-DDTHH:MM:SSZ" or the fields suffixed with "AppointmentDate" and "AppointmentTime" in the format "YYYY-MM-DD" and "HH:MM:SS" respectively.
  • If the stop is an appointment, only send the "Appointment" (or "AppointmentDate" & "AppointmentTime") fields (i.e. originAppointment, destinationAppointment, stopNAppointment OR originAppointmentDate, originAppointmentTime, destinationAppointmentDate, destinationAppointmentTime, stopNAppointmentDate, stopNAppointmentTime).
  • If the stop is FCFS, send the "LatestAppointment" fields along with the "Appointment" fields

For boolean values, you can send the following for true/false irrespective of the case:

  • true: 1, t, true, yes, y
  • false: 0, f, false, no, n
FieldDescriptionExample ValueRequiredFor Chaine Product
shipmentIDUnique identifier for the shipment used in your TMS123456NoAll
shipmentNumberShipment number123456YesAll
shipmentStatusCurrent status of the shipmentCarrier assignedYesAll
carrierCostTotalTotal cost for the carrier1000NoAll
customerChargeTotalTotal charge for the customer1200NoBooking
carrierIDUnique identifier for the carrier1234NoAll
carrierDOTNumberDepartment of Transportation number for the carrier123456YesTracking
carrierMCNumberMotor Carrier number for the carrier123456YesTracking
carrierSalesRepIDSales representative ID for the carrier in your TMS. This is used when a carrier sales rep accepts a carrier offer, and we need to send the carrier sales rep's id back to your TMS for assignment.1234NoAll
carrierSalesRepEmailEmail of the carrier's sales representativecarrierrep@123logistics.comYes (when available)All
customerSalesRepEmailEmail of the customer's sales representativecustomerrep@123logistics.comYes (when available)All
customerSalesRepIDSales representative ID for the customer1234NoAll
commodityType of commodity being shippedCommodityYesBooking
customerIDUnique identifier for the customer123456NoAll
customerNameName of the customerCustomer NameNoAll
distanceDistance of the shipment100YesBooking
doNotPostFlag indicating whether the load should be postedfalseYesBooking
dispatcherEmailEmail of the dispatcher (the carrier's dispatcher, not internal)dispatch@yourcarrier.comYesTracking / Copilot
driverPhonePhone number of the driver234567890YesTracking / Copilot
equipmentLengthLength of the equipment in feet53YesBooking
equipmentTypeType of equipmentVanYesBooking
isHazmatFlag indicating if the load is hazardous materialfalseYesBooking
isHotLoadFlag indicating if the load is urgentfalseNoBooking
isOversizedFlag indicating if the load is oversizedfalseNoBooking
isPartialFlag indicating if the load is a partial loadfalseNoBooking
isTempControlledFlag indicating if the load is temperature controlledfalseNoBooking
loadPostDescriptionDescription of the load postingThis load requires tarps and must pickup no later than 8amNoBooking
teamRequiredFlag indicating if a team is requiredfalseNoBooking
maxTemperatureMaximum temperature for the shipment20NoBooking
minTemperatureMinimum temperature for the shipment20NoBooking
modeMode of transportationTruckloadNoAll
proofOfDeliveryReceivedFlag indicating if proof of delivery has been receivedfalseNoCopilot
specialInstructionsSpecial instructions for the shipmentWhen you arrive at the destination, please call the customer at 123-456-7890NoTracking
teamWorkspaceIDUnique identifier for that can be used for offices/teams/groups if you need to split the loads up into different chaine workspaces under your "enterprise"1234NoAll
teamWorkspaceNameName of the sub workspace. If you provide subWorkspaceID, this must be provided or else it will default to subWorkspaceIDSub Workspace NameNoAll
maxCarrierRateMaximum rate for the carrier1100NoBooking
targetCarrierRateTarget rate for the carrier1000NoBooking
totalStopsTotal number of stops for the shipment3YesAll
trailerNumberNumber of the trailer123456NoTracking
truckNumberNumber of the truck123456NoTracking
weightWeight of the shipment in pounds40000YesBooking
originAddressLabelLabel for the origin address. Either this or the other Address fields is required.123 Main St, New York, NY 10001YesAll
originAddressCityCity of the origin addressNew YorkYesAll
originAddressPostalCodePostal code of the origin address10001YesAll
originAddressStateCodeState code of the origin addressNYYesAll
originAddressStateState of the origin address. Send the State or StateCodeNew YorkYesAll
originAddressStreetStreet of the origin address123 Main StYesAll
originAddressLatitudeLatitude of the origin address (in decimal degress format)40.7128YesNo
originAddressLongitudeLongitude of the origin address (in decimal degress format)-74.0060YesNo
originAppointmentAppointment time for the origin address. Either this or the other appointment fields are required when available.2022-01-01T00:00:00ZYes (if available)All
originAppointmentDateAppointment date for the origin address2022-01-01Yes (if available)All
originAppointmentTimeAppointment time for the origin address00:00:00Yes (if available)All
originLatestAppointmentLatest appointment time for the origin address (if the appointment is FCFS)2022-01-01T00:00:00ZNoAll
originLatestAppointmentDateLatest appointment date for the origin address (if the appointment is FCFS)2022-01-01NoAll
originLatestAppointmentTimeLatest appointment time for the origin address (if the appointment is FCFS)00:00:00NoAll
originTimezoneTimezone of the latest appointment time for the origin address (if the appointment is FCFS)America/New_YorkNoAll
originStopSequenceThe sequence number for the origin stop1NoAll
destinationAddressLabelLabel for the destination address. Either this or the other Address fields is required.123 Main St, New York, NY 10001YesAll
destinationAddressCityCity of the destination addressNew YorkYesAll
destinationAddressPostalCodePostal code of the destination address10001YesAll
destinationAddressStateState of the destination address. Send the State or StateCodeNew YorkYesAll
destinationAddressStateCodeState code of the destination addressNYYesAll
destinationAddressStreetStreet of the destination address123 Main StYesAll
destinationAddressLatitudeLatitude of the destination address (in decimal degress format)40.7128YesAll
destinationAddressLongitudeLongitude of the destination address (in decimal degress format)-74.0060YesAll
destinationAppointmentAppointment time for the destination address Either this or the other appointment fields are required when available.2022-01-01T00:00:00ZYes (if available)All
destinationAppointmentDateAppointment date for the destination address2022-01-01Yes (if available)All
destinationAppointmentTimeAppointment time for the destination address00:00:00Yes (if available)All
destinationLatestAppointmentLatest appointment time for the destination address (if the appointment is FCFS)2022-01-01T00:00:00ZNoAll
destinationLatestAppointmentDateLatest appointment date for the destination address (if the appointment is FCFS)2022-01-01NoAll
destinationLatestAppointmentTimeLatest appointment time for the destination address (if the appointment is FCFS)00:00:00NoAll
destinationTimezoneTimezone of the latest appointment time for the destination address (if the appointment is FCFS)America/New_YorkNoAll
destinationStopSequenceThe sequence number for the destination stop3NoAll
stopNSequenceThe sequence number for the Nth stop2NoAll
stopNAddressLabelLabel for the Nth stop address123 Main St, New York, NY 10001NoAll
stopNAddressCityCity of the Nth stop addressNew YorkNoAll
stopNAddressPostalCodePostal code of the Nth stop address10001NoAll
stopNAddressStateState of the Nth stop address. Send the State or StateCodeNew YorkNoAll
stopNAddressStateCodeState code of the Nth stop addressNYNoAll
stopNAddressStreetStreet of the Nth stop address123 Main StNoAll
stopNAddressLatitudeLatitude of the Nth stop address (in decimal degress format)40.7128NoAll
stopNAddressLongitudeLongitude of the Nth stop address (in decimal degress format)-74.0060NoAll
stopNAppointmentAppointment time for the Nth stop address2022-01-01T00:00:00ZNoAll
stopNAppointmentDateAppointment date for the Nth stop address2022-01-01NoAll
stopNAppointmentTimeAppointment time for the Nth stop address00:00:00NoAll
stopNLatestAppointmentLatest appointment time for the Nth stop address (if the appointment is FCFS)2022-01-01T00:00:00ZNoAll
stopNLatestAppointmentDateLatest appointment date for the Nth stop address (if the appointment is FCFS)2022-01-01NoAll
stopNLatestAppointmentTimeLatest appointment time for the Nth stop address (if the appointment is FCFS)00:00:00NoAll
stopNTypeType of the Nth stop (e.g., "Pick", "Drop", or "Both")PickNoAll
stopNTimezoneTimezone of the latest appointment time for the Nth stop address (if the appointment is FCFS)America/New_YorkNoAll

We make integrating with Your TMS's simple. Most TMS's have an export functionality where the entire load object can be exported as-is any time there is a change to the load. This is the preferred method of integration.

We recommend that you send the entire load object with all the fields to this end-point. Our workflow automation features can be created on any field in your TMS, and which will give your users an unlimited amount of possibilities when creating workflow rules. Chaine will map your entire load object with all the fields to our internal load object and update the load accordingly in our system. This functionality allows customers to utilize the complete suite of features.

The flow is:

  1. A load is created, updated or deleted in your TMS
  2. The entire load object with all the fields is exported to Chaine via a webhook you provide. For deleted, you can simply send the unique load ID and action type of delete.
  3. Events are then published back to a webhook you specify (depending on the functionality that is determined to be updated back in the TMS for the integration).

License

Apache 2.0