OXO ERP connector
Keep customers, the product catalog, price lists and orders in step with an OXO ERP over its /api/v1.
The OXO ERP connector plugin (oxo-erp-connector) reads customers, products and the chosen price lists from an OXO ERP and keeps them in the CRM. When you turn on sending orders, READY orders go to OXO ERP and their status comes back.
Install and settings
Install it under Admin → Plugins → OXO ERP connector and enter the OXO ERP API key (oxo_ followed by 40 characters).
| Setting | Default | Effect |
|---|---|---|
url | none | The OXO ERP address, starting with https://. |
syncMinutes | 15 | Minutes between syncs, 5 to 1440. |
defaultCountry | CZ | Two-letter country code for customers without a country in OXO ERP. |
currency | CZK | Currency of the imported catalog. |
dryRun | on | While on, a sync only counts what it would create or change and keeps that as a report. |
priceLists | empty | The OXO ERP price lists to import, by id, separated by commas. |
sendOrders | off | Send READY orders to OXO ERP. |
timeZone | UTC | Time zone for times shown in the admin section and emails. |
Customers
Each sync reads the customers OXO ERP changed since the last run. A customer lands on the account it is already linked to; otherwise on one account with the same country + IČO, then the same DIČ, then the same name + zip; otherwise a new account is created, without an owner. Two or more candidates are a conflict: nothing is linked until the CRM data is fixed.
A first match by IČO, DIČ or name + zip is not linked straight away. The customer is listed under Link proposals (sidebar, Plugins group; managers and admins) with the matching account and the reason, and managers and admins get an email once per sync that adds proposals. Until someone decides, the account is left as it is.
- Confirm links the two on the next sync (queued at once). Confirm is refused if another OXO ERP customer was linked to the account in the meantime.
- Reject means they are different companies: the next sync creates a new account for the customer, without an owner, and this pair is never proposed again.
Confirm and Reject are both refused once the customer is linked or the account was deleted; reload the page. A sent order links the account to the customer OXO ERP answers with and closes that customer's open proposal. Before an order for an unlinked account goes out, the connector applies OXO ERP's own matching rule (an active customer by IČO, else by name and zip, the oldest first). If that rule picks a customer a manager rejected for this account, the order is not sent: it fails with a message naming the customer. Fix the customer in OXO ERP, or the account's IČO, name or zip in the CRM. If OXO ERP still answers with a rejected customer (for example one created in the meantime), the order stays sent, the CRM does not link the two, and admins get an email.
Upgrading to 0.2.0: existing links stay as they are. Customers that are not linked yet and match an account now wait under Link proposals instead of being linked on the next sync.
Account external_ref
Every account the connector creates, or links after a confirmed proposal, gets an external_ref, so other systems (for example a customer portal that reads the CRM over MCP with crm_search_accounts) can find the OXO ERP customer:
- the Odoo partner id as a plain number, for example
812, when OXO ERP has one for the customer; - otherwise
oxo:<id>with the OXO ERP customer id, for exampleoxo:6.
An external_ref that is already set is never changed. When it differs from the value above, the plugin log gets a warning and the account stays as it is. When another account (not deleted) already holds the value, the account is left without one and the log names both accounts. A linked customer that is no longer in OXO ERP's customer list is logged too.
A proposed account gets no external_ref until the proposal is confirmed; the sync that links the pair writes it. Accounts linked before version 0.1.1, or linked by a sent order, get their external_ref on the next normal sync; no separate step is needed. In a dry run the sync only counts them. The run summary in the admin section shows the number as "external_ref filled".