HaulHub
Enabling the Haul Hub Integration
Navigate to Admin Settings (Gear Icon) > API Info
Click on the "Show" button to access the Webhooks Dashboard.
Click the "+ Add Endpoint" button to build the webhook.
In the Message Filtering options, select
ticket.created
,ticket.updated
, andticket.voided
.Build the Endpoint URL following this layout:
https://haulhub.fast-weigh.workers.dev/send?FW_GRAPHQL_SERVER=FWT&FW_API_KEY=<insert_fast-weigh_api_key_here>&HH_API_KEY=<insert_haulhub_api_key_here>
You can find your API Key and GraphQL server (the first part of the GraphQL Endpoint URL) on the API Info Page.
It should look something like this when you are finished:
https://haulhub.fast-weigh.workers.dev/send?FW_GRAPHQL_SERVER=FWT&FW_API_KEY=11111-11111-1111-11111&HH_API_KEY=2222222-22222-22222-22222
Hit the Create button to create the new webhook.
Check the "Certified" checkbox on any order that you want tickets to flow to HaulHub.
Customizing Payload
The following query parameters can optionally be appended to the webhook URL to modify the payload sent to HaulHub (e.g. <webhook URL>&DOT_CODE=OrderUDF1
):
&DOT_CODE=
: Can be given the value of one of the following (e.g.&DOT_CODE=OrderUDF2
)OrderUDF1
|OrderUDF2
|OrderUDF3
DOT_CODE
can also be hard coded into the webhook URL<webhook URL>&DOT_CODE=01023436C3A3FABCD
If set, the
dot_code
of the payload will use the assigned Order UDF field. If NOT set, thedot_code
will be blank
&MAX_GVW=
: Can be given the value of one of the following (e.g.MAX_GVW=TicketUDF2
)TicketUDF1
|TicketUDF2
|TicketUDF3
If set, the
max_gvw
of the payload will use the assigned Ticket UDF field. If NOT set, themax_gvw
will use the Truck'sWeightCapacity
if it exists, else it will be blank
&JOB=
: Can be given the value ofOrderDeliveryLocation
If set, the
job
of the payload will use the Delivery Location of the Order. If NOT set, thejob
will use the Order'sDescription
field
&JOB_NUMBER=
: Can be given the value of one of the following (e.g.JOB_NUMBER=OrderUDF3
)OrderUDF1
|OrderUDF2
|OrderUDF3
If set, the
job_number
of the payload will use the assigned Order UDF field. If NOT set, thejob_number
will use the Ticket'sJob
field, or if that is blank, the Order'sDefaultJob
field
&MATERIAL_NUMBER=
: Can be given the value of one of the following (e.g.MATERIAL_NUMBER=OrderUDF1
)OrderUDF1
|OrderUDF2
|OrderUDF3
|DOTName
|PricingDescription
If set to an OrderUDF, the
material_number
of the payload will use the assigned Order UDF field. If set to DOTName, thematerial_number
of the payload will use the Product'sDOTName
field. If set to PricingDescription, thematerial_number
of the payload will use the OrderProduct'sDescription
field (the Product Pricing Description in Fast-Weigh). If NOT set, thematerial_number
will use the Product'sProductID
field
&PRODUCT_CODE=
: Can be given the value of one of the follow (e.g.PRODUCT_CODE=DOTName
)DOTName
|PricingDescription
If set to DOTName, the
product_code
of the payload will use the Product'sDOTName
field. If set to PricingDescription, theproduct_code
of the payload will use the OrderProduct'sDescription
field (the Product Pricing Description in Fast-Weigh). If NOT set, theproduct_code
will use the Product'sProductID
field
It may look something like this when you are finished:
https://haulhub.fast-weigh.workers.dev/send?FW_GRAPHQL_SERVER=FWT&FW_API_KEY=11111-11111-1111-11111&HH_API_KEY=2222222-22222-22222-22222&DOT_CODE=0123436C3A3FABCD&PRODUCT_CODE=DOTName
Some DOTs require a Agency Code. This value will be provided by Haul Hub if applicable and is typically mapped to the DOT_CODE field.
Haulhub Javascript Payload
slip_number: ticket.TicketNumber,
dot_code: DOT_CODE ?? '',
dispatched_at: formattedDateTime,
last_updated: formattedDateTime,
timestamp: formattedDateTime,
gross_amount: ticket.GrossWeight,
tare_amount: ticket.TareWeight,
net_amount: ticket.NetWeight,
quantity_uom_code: 'ton',
gross2_amount: ticket.GrossWeight! * 2000,
tare2_amount: ticket.TareWeight! * 2000,
net2_amount: ticket.NetWeight * 2000,
uom2: 'lbs',
client_id: ticket.Order.Customer.CustomerID,
client_name: ticket.Order.Customer.CustomerName,
comments: ticket.Note,
contract_number: ticket.Order.PONumber,
customer_name: ticket.Order.Customer.CustomerName,
deputy: ticket.Operator,
dispatch_number: ticket.TicketNumber,
job: ticket.Order.Description,
job_number: ticket.Job ? ticket.Job : ticket.Order.DefaultJob,
line_item_description: ticket.OrderProduct?.Product.ProductDescription,
line_item_quantity: ticket.NetWeight,
loads_today: totalTickets,
material_number: ticket.OrderProduct?.Product.ProductID,
phase_code: ticket.Phase,
plant_id: ticket.OrderProduct?.Yard.YardName,
plant_name: ticket.OrderProduct?.Yard.YardDescription,
product_code: ticket.OrderProduct?.Product.ProductID,
purchase_order_number: ticket.Order.PONumber,
quantity_shipped_today: totalNetWeight,
supplier: ticket.OrderProduct?.Yard.Location.Region.RemitName,
supplier_code: ticket.OrderProduct?.Yard.WarehouseCode ?? ticket.OrderProduct?.Yard.Location.Region.RegionName,
tonnage: ticket.NetWeight,
void: ticket.Void,
weighmaster: ticket.Operator,
fleet_id: ticket.Truck.Hauler.HaulerID,
fleet_name: ticket.Truck.Hauler.HaulerName,
truck_id: ticket.Truck.TruckID,
license_1: ticket.Truck.LicenseNum,
audit_log: [],
Last updated