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-22222Hit 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|OrderUDF3DOT_CODEcan also be hard coded into the webhook URL<webhook URL>&DOT_CODE=01023436C3A3FABCDIf set, the
dot_codeof the payload will use the assigned Order UDF field. If NOT set, thedot_codewill be blank
&MAX_GVW=: Can be given the value of one of the following (e.g.MAX_GVW=TicketUDF2)TicketUDF1|TicketUDF2|TicketUDF3If set, the
max_gvwof the payload will use the assigned Ticket UDF field. If NOT set, themax_gvwwill use the Truck'sWeightCapacityif it exists, else it will be blank
&JOB=: Can be given the value ofOrderDeliveryLocationIf set, the
jobof the payload will use the Delivery Location of the Order. If NOT set, thejobwill use the Order'sDescriptionfield
&JOB_NUMBER=: Can be given the value of one of the following (e.g.JOB_NUMBER=OrderUDF3)OrderUDF1|OrderUDF2|OrderUDF3If set, the
job_numberof the payload will use the assigned Order UDF field. If NOT set, thejob_numberwill use the Ticket'sJobfield, or if that is blank, the Order'sDefaultJobfield
&MATERIAL_NUMBER=: Can be given the value of one of the following (e.g.MATERIAL_NUMBER=OrderUDF1)OrderUDF1|OrderUDF2|OrderUDF3|DOTName|PricingDescriptionIf set to an OrderUDF, the
material_numberof the payload will use the assigned Order UDF field. If set to DOTName, thematerial_numberof the payload will use the Product'sDOTNamefield. If set to PricingDescription, thematerial_numberof the payload will use the OrderProduct'sDescriptionfield (the Product Pricing Description in Fast-Weigh). If NOT set, thematerial_numberwill use the Product'sProductIDfield
&PRODUCT_CODE=: Can be given the value of one of the follow (e.g.PRODUCT_CODE=DOTName)DOTName|PricingDescriptionIf set to DOTName, the
product_codeof the payload will use the Product'sDOTNamefield. If set to PricingDescription, theproduct_codeof the payload will use the OrderProduct'sDescriptionfield (the Product Pricing Description in Fast-Weigh). If NOT set, theproduct_codewill use the Product'sProductIDfield
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