Odoo & Onfleet Integration

Integration Setup

Our implementation is a bi-directional, multi-organization available bridge for Onfleet and Odoo.  After the module is installed the first thing you must do is add your Onfleet API key to Odoo.

You can find or create one by going to the Onfleet dashboard and clicking the gear icon in the upper right hand corner.  Afterwards find the "API & Webhooks" section of the menu and create your API key.


Then head over to Odoo and go to "Settings > Users and Companies > Companies".  In Enterprise Edition, you can just start typing "Companies" in the main app menu.



Once you have made it to your company page, click on the "Onfleet" tab.  You'll see an imput for the API Key, paste it in and save the record.

 

Once the record has been saved; click on the 'Test Connection' button and you should see the Onfleet data populate.  This is a confirmation that the connection has been successful.  You can enter different API keys for different companies on the same installation if desired, the routing to the correct Onfleet API for that company will happen automatically.

Creating a team

Teams can be created in two different ways.  The first is from the employee form, under the Onfleet tab.  From the main menu, click on the "Employees" app and then select any existing employee or create a new one.

Onfleet requires that a user is always assigned to a team.  At the very bottom of the "Onfleet" tab you'll be able to create a new team, or select from existing teams for the Employee.

Your other option is to select the Onfleet app from the main app menu, which will let you create teams or import your existing teams from Onfleet:


Teams will automatically be created in Onfleet as soon as they are created in Odoo.  Be mindful that teams will also be removed from Onfleet if they are removed in Odoo automatically.  Now that we have a team we can link our Employees to Administrator, or Driver users.


Creating Users in Onfleet

All existing users from Onfleet will automatically pull into Odoo (via a CRON).  It will attempt to match users by phone number first, then by name.  Be mindful that the names have to be an exact match to work.  "John E Doe" in Odoo will not match with "John Doe" in Onfleet.

To make an Administrative user, set the "Access Level" to either "Standard" or "Super".  Otherwise, by default, we will assume they are a regular user/driver.  This is not something that can be changed after the record is linked.  If this must be changed; first click the "Unlink Ofleet" button, then change the value and click the "Link Onfleet" button again.

To push an existing Odoo user to Onfleet go to their record in the Employee app and look for the button "Link Onfleet". 

One the user has been linked you should see the Onfleet data pop up in their "Onfleet" tab:


After the link is successful, you can see their Onfleet ID number as well as a number of other details on the user.  Pay attention to the 'Sync' section to see what platform has the most up to date information.  Anytime a linked record is updated in Odoo, it will auto-push the data to Onfleet.  Onfleet data is pulled in on a CRON, which by default only happens once a day.  If there is a suspected mis-match in data, the "Details" button will show exactly what information Onfleet said it had at the last sync time:

One very important thing to note in regards to employee updates.  Onfleet dictates that phone numbers may not be updated from an outside platform.  That may ONLY occur from the Onfleet dashboard.  However, if the number is updated in Onfleet it will update the user in Odoo on the next update.



Creating Hubs/Warehouses

Onfleet calls them hubs, Odoo calls them warehouses.  Head over to the warehouse configuration in the "Stock" app.  Once your there you will see a familiar button to "Link" up to.

Once the link is complete, you will see the onfleet data populate in the form: