How it works

Follow these 15 simple steps to start syncing Odoo orders to Shopify automatically

odoo logo icon

Order Created

App connector: Odoo • Time to complete: 1 minute
Why this matters: This trigger monitors your Odoo system for new sales orders and kicks off the Shopify sync workflow. Without this automation, you'd need to manually recreate every Odoo order in Shopify, leading to data inconsistencies and wasted time on double data entry.

The trigger checks your Odoo system every hour for newly created sales orders. When new orders are detected, it captures the basic order information and passes it to the next step for detailed retrieval. You can adjust the hourly schedule if you need more or less frequent syncing based on your order volume.

Retrieve order details

App connector: Odoo • Time to complete: 0 minutes (Auto-configured)
Why this matters: The trigger provides basic order information, but this step fetches the complete order record with all details needed to create a matching Shopify order. Without these full details, the workflow couldn't accurately replicate pricing, taxes, and customer information.

The step retrieves the full sales order from Odoo using the order ID from the trigger. This includes the order total, currency, tax calculations, customer ID, and all other order-level data. The complete order details get used later when creating the Shopify order with accurate financial information.

Retrieve Customer

App connector: Odoo • Time to complete: 0 minutes (Auto-configured)
Why this matters: To create or update the customer in Shopify, you need their complete contact information and addresses. This step fetches the full customer record from Odoo so the workflow can sync name, email, phone, and address details to Shopify.

The step retrieves the customer (partner) record from Odoo using the customer ID from the order. This includes the customer's complete name, email, phone, street address, city, state/province, postal code, country, and any notes. These details get used to either create a new Shopify customer or update an existing one, and to populate billing and shipping addresses on the Shopify order.

List Order Lines

App connector: Odoo • Time to complete: 0 minutes (Auto-configured)
Why this matters: Orders typically contain multiple products, and each line item needs to be included in the Shopify order. This step retrieves all order lines (product line items) from Odoo so the workflow can match them to Shopify products and create corresponding line items.

The step queries Odoo for all order lines associated with this sales order, searching by the order name. Each order line includes the product ID, quantity, unit price, and product name. These lines get processed in the next loop to fetch product details and match them to Shopify variants.

Loop Over Odoo Order Lines

App connector: Loop • Time to complete: 0 minutes (Auto-configured)
Why this matters: With potentially many products in an order, this loop ensures each line item gets individually processed to retrieve product details needed for matching to Shopify. Without this loop, the workflow could only handle single-item orders.

The loop iterates through all order lines retrieved in Step 4, processing one product at a time. For each line item, the loop passes the product ID to the next step to fetch full product variant details including the SKU that's critical for matching to Shopify.

Retrieve Product Variant

App connector: Odoo • Time to complete: 0 minutes (Auto-configured)
Why this matters: Each order line references a product by ID, but you need the product's SKU to match it to the corresponding Shopify variant. This step fetches the complete product variant record including the SKU (default_code in Odoo) for matching.

The step retrieves the full product variant from Odoo using the product ID from the current order line being processed. Most importantly, it gets the "default_code" field which is Odoo's SKU, along with the product name and other details. This SKU gets used in the custom code step to find the matching Shopify product variant.

Loop End & Create List Of Odoo Product Variants

App connector: Loop • Time to complete: 0 minutes (Auto-configured)
Why this matters: After retrieving product details for each order line, this step compiles them all into a single list that the custom code step can use for processing. It ensures all product variants are available together for the matching logic that happens next.

The Loop End step pairs with the Loop from Step 5 and uses a special "return: map" feature to collect all the product variant records retrieved during the loop iterations. Instead of just closing the loop, it creates an array called "items" containing all the Odoo product variants, which gets passed to the custom code for SKU matching.

Custom: Format Odoo Order Lines

App connector: Code • Time to complete: 0 minutes (Auto-configured)
Why this matters: This is the most complex step in the workflow. It transforms Odoo data into the format Shopify needs, extracts customer address components, adds SKUs to order lines, queries Shopify's GraphQL API to find matching product variants by SKU, and creates a final dataset ready for Shopify order creation.

The custom code performs several critical functions:

  1. Extract customer address details: Parses the state/province from Odoo's formatted state field and handles the street2 (address line 2) field
  2. Add SKUs to order lines: Matches each order line to its product variant to include the SKU (default_code)
  3. Query Shopify for matching variants: For each SKU, makes a GraphQL query to Shopify to find the corresponding product variant
  4. Match and enrich order lines: Combines Odoo order line data with Shopify variant IDs, creating a complete dataset with both systems' identifiers

The code outputs:

  • customer.state: Extracted state/province for addresses
  • customer.street2: Second address line
  • order_lines[]: Array of order lines with Odoo details plus Shopify product and variant IDs

This matching process ensures that when the Shopify order is created, it references the correct Shopify products even though the order originated in Odoo.

Get Customer By Email

App connector: Shopify • Time to complete: 0 minutes (Auto-configured)
Why this matters: Before creating or updating a customer in Shopify, you need to know if they already exist. This step searches Shopify for a customer with the same email address as the Odoo customer to prevent duplicate customer records.

The step queries Shopify's customer database filtering by the email address from the Odoo customer record. It limits the search to return just 1 customer since emails should be unique. If a matching customer exists, the workflow updates their information; if no customer exists, the workflow creates a new customer record.

Path - No Existing Customer

App connector: Paths • Time to complete: 0 minutes (Auto-configured)
Why this matters: This rule determines if the workflow should proceed down the new customer creation path. It checks whether the customer search returned no results, and if so, continues to create a new Shopify customer.

The step checks if the customer ID from the search "is empty." If no customer was found, the workflow continues down this path to create a new customer record with the Odoo customer's information. If a customer exists, this path stops and the workflow routes to the update path instead.

Create Customer

App connector: Shopify • Time to complete: 0 minutes (Auto-configured)
Why this matters: When the Odoo customer doesn't exist in Shopify yet, this step creates a new customer record so the order has someone to link to. This ensures every Shopify order has a properly associated customer for reporting and communication.

The step creates a new Shopify customer using data from Odoo. It populates:

  • Email from Odoo customer
  • First and last name (split from Odoo's complete_name field)
  • Phone number
  • Customer notes/comments
  • A default address with street, street2, city, state, country, postal code

The custom code output provides the formatted state and street2 fields that Shopify requires.

Path - Has Existing Customer

App connector: Paths • Time to complete: 0 minutes (Auto-configured)
Why this matters: This rule determines if the workflow should proceed down the existing customer update path. It checks whether the customer search found a match, and if so, continues to update that customer's information with current Odoo data.

The step checks if the customer ID from the search "is not empty." If a customer was found, the workflow continues down this path to update their record with any changes from Odoo (like a new address or phone number). If no customer exists, this path stops since the create path already handled it.

Update Customer

App connector: Shopify • Time to complete: 0 minutes (Auto-configured)
Why this matters: When the customer already exists in Shopify, this step updates their information to match the current Odoo data. This ensures customer details stay synchronized across systems even when addresses or contact information changes in Odoo.

The step updates the existing Shopify customer using the customer ID from the search. It updates the same fields as the create step—email, name, phone, notes, and addresses—with current data from Odoo. This ensures the Shopify customer record reflects any changes made in Odoo since they were last synced.

Path - Create Order

App connector: Paths • Time to complete: 0 minutes (Auto-configured)
Why this matters: This path always executes (using the condition "true = true") and serves as the convergence point where both customer paths (create and update) rejoin before creating the Shopify order. This ensures the order gets created regardless of which customer path was taken.

The step uses a always-true condition to ensure this path runs for every order. After either creating or updating the customer in the previous paths, the workflow needs a single path to create the order. This design pattern allows the workflow to handle customer logic separately from order creation while ensuring every order gets created.

Shopify logo icon

Create Order

App connector: Shopify • Time to complete: 0 minutes (Auto-configured)
Why this matters: This is where the Odoo order actually becomes a Shopify order. The step creates a complete order record with all line items, addresses, taxes, and customer details, making the sale visible in Shopify for fulfillment and reporting.

The step creates a new Shopify order with comprehensive details:

  • Order basics: Currency, email, order name from Odoo
  • Line items: Each product with variant ID (from custom code matching), quantity, title, SKU, and price
  • Customer info: Email, first and last name
  • Billing address: Complete address with street, street2, city, state, country, postal code
  • Shipping address: Same format as billing address
  • Tax lines: Tax amount from Odoo order totals
  • Inventory behavior: Set to "bypass" so the order creation doesn't affect Shopify inventory levels

The order uses all the data gathered and transformed in previous steps—matched product variants from custom code, customer details from Odoo, and formatted addresses. The inventory_behaviour is set to "bypass" because Odoo is managing the actual inventory, not Shopify.

Make it your own

Customize this workflow even further:

Sync order status updates back to Odoo
Create a companion workflow that triggers when Shopify order status changes (fulfilled, cancelled) and updates the corresponding Odoo sales order status, maintaining bi-directional synchronization so your ERP always reflects current fulfillment state.
Handle missing product matches with notifications
Add a filter after the custom code step that checks if any order lines have has_shopify_match: "no", then send an alert to your operations team listing which SKUs need to be added to Shopify before the order can sync.
Apply order tags based on Odoo data
After creating the Shopify order, add a step that applies tags based on Odoo order fields—for example, tag orders from specific Odoo sales teams, customer types, or order sources to enable filtered reporting and automated workflows in Shopify.
Store sync records in a data table
Add a step after order creation to log each synced order in a MESA data table with timestamps, Odoo order ID, Shopify order ID, and sync status, creating an audit trail for troubleshooting and reporting on integration health.

Frequently asked questions

What happens if products don't have matching SKUs in both systems?
The custom code will set has_shopify_match: "no" for those line items, but the workflow will still attempt to create the Shopify order. However, those line items won't have valid Shopify variant IDs, which will likely cause the order creation to fail or create incomplete orders. Ensure all Odoo products have SKUs that match corresponding Shopify variants before enabling this workflow.
Does this workflow update existing Shopify orders if I modify an Odoo order?
No, this workflow only triggers when new orders are created in Odoo. If you modify an existing Odoo order, those changes won't sync to Shopify. You'd need to create a separate workflow that triggers on Odoo order updates to handle modifications, or manually update the Shopify order.
Will this affect my Shopify inventory levels when orders are created?
No, the workflow sets inventory_behaviour: "bypass" when creating Shopify orders, which means creating these orders won't decrement your Shopify inventory levels. This is intentional since Odoo is managing the actual inventory. If you want Shopify to manage inventory, you'll need to modify Step 16 to remove or change this setting.
What is a template?
Templates are pre-made workflows by our team of experts. Instead of building a workflow from scratch, these have all the steps needed to complete the task.
Can I personalize a template?
Yes! Every step can be customized to meet your exact requirements. Additionally, you can even add more steps and make it more sophisticated.
Are templates free?
Yes! Our entire library containing hundreds of templates are free to use and customize to your exact needs.

Ready to start syncing Odoo orders to Shopify automatically?

Join thousands who've automated their work and saved an average of 3.5 hours every week.

Start with this template — It's free
7-day free trial • 15 min setup • Cancel anytime