Skip to main content

Setting Up the Onfleet Integration

A step-by-step guide to connecting your Distru account to Onfleet, including the API keys you'll need, delivery window setup, and driver syncing.

Written by Ana Lumbi

This article walks you through everything you need to connect your Distru account to Onfleet so your sales orders can be pushed into Onfleet for routing.

New to the integration? Read first

for an overview of what it does and its rules and limits.

Before you start: The Onfleet integration is enabled for your account by the Distru team; it isn't self-serve yet. This article covers what you'll need to gather and hand over so we can turn it on for you.

What You'll Need

To enable the integration, you'll provide credentials from both systems:

Your Distru API key

Your Onfleet API key and secret

The Company ID — or just the account name — of each Distru account you want connected

🔎 Where's my Company ID?
In Distru, go to Settings — your Company ID is shown in the bottom-left corner. (Or just give us the account name and we'll look it up for you.)

Setting Up the Integration

Step 1: Enable and generate your Distru API key

In Distru Settings > Integrations > Distru API, have an admin generate an API key named “Onfleet”. This is what lets the integration read your orders and write delivery updates back.

💡 Tip: If you don't see API settings or aren't sure whether the API is enabled for your plan, your CSM and AM can confirm and help you turn it on.


Step 2: Get your Onfleet API key and secret

In Onfleet, go to Settings → API & Webhooks and copy your API key and your secret. Both are required. (You don't need to touch the webhook settings — the Distru team handles those.)

Step 3: Provide your credentials to Distru

Send your Distru API key, your Onfleet API key and secret, and the Company name for each Distru account you want connected to your CSM or via live chat. The Distru team uses these to enable and configure the integration on your account.

Connecting more than one account? You can connect multiple Distru accounts to a single Onfleet account; just include the Company ID for each one (we can look for it if you give us the name). You cannot connect multiple Onfleet accounts to one Distru account.

Step 4: Confirm the custom fields appear

Once the integration is enabled, a custom field called "Onfleet Integration" appears on your sales orders with three options:

• Create Task: sends the order to Onfleet as a delivery task

• Don't Create Task: no task is created (also the default when left blank)

• Populate Transfer Template: writes the driver's name into a METRC Transfer Template after a driver is assigned in Onfleet (driver name only — not vehicle info). Optional, and METRC-only.

You'll also see two additional custom fields, Complete After and Complete Before, which set the delivery time window sent to Onfleet.

Configuring Delivery Windows

Delivery windows tell drivers when a stop should happen. You can set them two ways:

• Per order: fill in the Complete After and Complete Before fields on an individual sales order.

• Per customer (recommended for recurring routes): set default delivery windows on a company so the time fields pre-populate automatically on that customer's orders.


Distru applies windows in priority order: an order-level time window overrides the company default, and if neither is set, the task is created with just the delivery date and no time window.

⚠️ Reminder: Set a delivery date on the order so the task lands on a findable day in Onfleet.


About Drivers

Drivers use the Onfleet mobile app and log in with their phone number, so each driver needs a phone-number login in Onfleet to pick up and complete tasks. Driver setup happens in Onfleet, not in Distru. If you use the optional Populate Transfer Template step (METRC-tracked accounts only), assign the driver to the task in Onfleet first, then set the order's Onfleet Integration field to Populate Transfer Template and choose a Transfer Type. Distru will write the driver's name into the transfer template.

You're Ready to Go 😎

Once the integration is enabled and your drivers are synced, set a sales order's Onfleet Integration field to Create Task and save. The order will appear in Onfleet as a delivery task, ready for routing.

For a full explanation of how orders, statuses, and Transfer Templates flow between the two systems, see

Need Help?

🧯 If you have questions about setting up Onfleet, reach out to your CSM or contact us via live chat. We're happy to walk you through it 🪄

Did this answer your question?