Odoo Connectors: Connector Configuration

Repository Versions:

Purpose
This document outlines the processes associated with one of Hibou's Connector modules. A connector allows you to synchronize your products, pickings, and sale orders between a third-party program and your Odoo database.

Getting Started

First things first, we need to install the module! Navigate to the Apps application and search for the connector you'd like to use. When ready, click the Install button.

Odoo CMS - a big picture

Good to Know!

Most module requires the Invoicing, Products & Pricelists, Delivery Costs, Sales and Warehouse Management, and Connector for E-Commerce modules. However, if you do not already have these modules installed, Odoo will install them for you during this module's installation.

All `connector` modules require a significant number of OCA modules as well as python packages. For the easiest time, use the bundled/linked versions of all of the libraries found in this repository and Hibou's maintained Docker Images.

Editing Configuration Files

Configuration Files: Your Odoo configuration (typically at /etc/odoo/odoo.conf ) will need a couple of things to function properly.

Add `queue_job` as a server wide module like so

server_wide_modules = web,dbfilter_from_header,queue_job

Configure the number of queue workers by appending a section like this to the end of your file.

[queue_job]
channels = root:1,root.magento:1,root.opencart:1, root.walmart:1

Important!

Make sure that you restart your Odoo installation after getting all of the requirements and configuration in order.

Gathering API Credentials

Hibou will have several discussions with you leading to this point in the connector process, but generally speaking, API access to the third party will be required. An API (Application Programming Interface) compiles data to a table that Odoo can access and interpret to gather the relevant order information.

Some third parties will have unique requirements surrounding the amount of data pulled and returned via the connector. Some of the more established third parties will have an API user interface that requires registration and the use of test/production credentials.

If your third party requires registration, complete the set-up and gather this information for use in the connector. You will be granted API keys when it is complete. 

Process

Navigate to the Connectors app.

Odoo - Sample 1 for three columns

Creating a Backend

Once there, select the connector, followed by Backends from the navigation ribbon. Click Create to start a new Backend. Backends are essentially channels that the imported orders flow through to assess and match data. Title the Backend as appropriate for its use case. The one below is a sample of our test record.

Odoo CMS - a big picture

Once the new record is opened, you will need the following data:

  • Base URL: The URL of the website you're pulling data from via the API connection.

  • RestAdmin Token: The password that allows Odoo to connect to the API. 

  • Warehouse: Select the warehouse the products will be delivered from. 

  • Analytic Account: If desired, set an analytic account to track order data for reporting.

  • Fiscal Position: If the taxes are collected prior to import, create and set an appropriate fiscal position.

  • Sales Team: If desired, set a salesteam to track order data for reporting.

  • SalePrefix: Set the prefix for the order number as it is imported for grouping/filtering purposes.

Product Defaults

  • Product Category: If there is not a matching product in your Odoo database, the connector will create a new one. Set the desired category for the new product record here.

 Import Sale Orders after Order ID: ##

This is a partition that indicates what range of orders are encapsulated in this job. 

Click Save

You are ready to import orders. Note that orders will not be imported directly, as they will have to be compared against Odoo's record requirements using the information stored in this backend record. Instead, orders will appear in the Job Queue, which can be configured to flag a variety of exceptions such as incorrect tax data or fields that don't meet the parameters set. Incomplete or missing phone numbers, zip codes, etc. are good examples of order data that will be flagged in the job queue for resolution.