Odoo Sylius integration

Sylius Connector

Sylius takes the order. Odoo ships it and keeps the stock right.

Sylius 2 and Odoo 19

What it does

Orders from your Sylius store come into Odoo as sales orders with the buyer, both addresses, promotions, shipping and taxes. Odoo writes stock and channel prices back to Sylius and ships the Sylius shipment with the tracking number when the parcel leaves the warehouse.

You give Odoo the store address and the email and password of a Sylius administrator who may use the API. Odoo signs in, keeps the token and signs in again when it expires. Test Connection also reads the channels of the store, so each channel can get its own sales team, warehouse and pricelist.

Import Orders reads the orders placed since the last run, by button or every 15 minutes. Each one becomes a sales order with its variant lines, promotions as line discounts, the shipping charge as a line, and the Odoo tax of the same rate. Prices that include tax are turned into net prices first, so the Odoo total matches the Sylius total. Open orders are read again, so a cancellation or a payment in Sylius reaches Odoo.

A small table per store says what each Sylius order state does: new, fulfilled and cancelled can each confirm, keep a quotation, cancel or be ignored. Tick Confirm Only When Paid and orders wait until the payment is paid or authorized.

Validating the delivery ships the Sylius shipment with the tracking number. If the store cannot be reached at that moment, the delivery still validates and the scheduler tries again. Cancelling in Sylius is a button on the cancelled Odoo order, never automatic.

Who it is for

  • Merchants running a Sylius 2 shop with stock in Odoo. The storefront is Sylius, but purchasing, the warehouse and invoicing live in Odoo. Paid or new Sylius orders come in as sales orders, and the stock Odoo holds is written back to each linked variant.
  • Shops selling through several Sylius channels. A B2B channel and a retail channel can each get their own sales team, warehouse and pricelist. Prices from each channel's pricelist are written to that channel's pricing on the variant.
  • Teams that ship from Odoo and want Sylius to show it. When the warehouse validates the delivery of a Sylius order, the matching Sylius shipment is marked shipped with the tracking number. If the store was down, the scheduler tries again later.
  • Developers migrating products between the two systems. Variants are paired with Odoo products by code and Internal Reference, taxons become product categories, and Odoo products can be created in Sylius from a list action.

Setting it up

  1. In Sylius, make sure the administrator account Odoo will use has API access (ROLE_API_ACCESS) on the Admin API at /api/v2/admin.
  2. In Odoo go to Sales > Sylius > Stores, create a store with its https address, choose email and password or an existing token, and press Test Connection.
  3. Set the Locale and Main Channel Code, the Warehouse, Pricelist, Shipping Product and a Fallback Customer for orders without one.
  4. On the Channels tab press Load Channels and decide per channel whether to import orders and send prices, and which team, warehouse and pricelist it uses.
  5. On the Orders tab choose what happens to new, fulfilled and cancelled Sylius orders, and tick Confirm Only When Paid if unpaid orders should wait as quotations.
  6. Press Import Products and Import Taxons, check Sales > Sylius > Variants and Stock for the Odoo against Sylius quantities, then press Import Orders.
  7. Turn on Scheduled Order Import and Scheduled Stock Push to run both every 15 minutes as the Run As user.

Sylius Connector: questions

Which Sylius versions work?

It talks to the Sylius 2 Admin API under /api/v2/admin and signs in with a JWT that it renews by itself. Older Sylius 1 stores without the new API Platform endpoints are not covered.

How are products matched?

By the variant code in Sylius and the Internal Reference in Odoo. A product without an Internal Reference can't be created in Sylius, and you can switch off Create Missing Products if unknown codes should stop the import instead.

What stock number is sent?

You choose on hand, letting Sylius subtract its own holds, or free stock, which is on hand less Odoo reservations, for the warehouse set on the store. Sylius on hand and on hold are shown only for comparison.

How are taxes handled?

Each tax line is matched by rate to a percentage sales tax of the company that is not price included, and prices entered with tax included in Sylius are converted. Create those taxes in Odoo before the first import.

Will cancelling in Odoo cancel the Sylius order?

Not automatically. Cancel in Sylius is a button on the sales order. In the other direction, a cancelled Sylius order cancels the Odoo order as long as nothing has been delivered yet.

Does it need Enterprise?

No. It depends on sale_stock, stock_delivery and Discuss, which are all in Community. Each store record belongs to one company and record rules keep its data in that company.