Chuyển đến nội dung
Skillpedia
API và máy chủ (backend)48k · #5353

odoo-shopify-integration

Skill này làm gì

Công cụ này kết nối cửa hàng trực tuyến (Shopify) với hệ thống quản lý (Odoo) của bạn. Nó tự động đồng bộ sản phẩm, tồn kho, đơn hàng và khách hàng giữa hai hệ thống.

Khi nào nên dùng

  • ✓Khi bạn bán sản phẩm trên Shopify và quản lý tồn kho trong Odoo.
  • ✓Để tự động tạo đơn bán trong Odoo khi khách hàng mua trên Shopify.
  • ✓Để giữ số lượng tồn kho trong Odoo luôn cập nhật theo những gì có sẵn trên Shopify.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/odoo-shopify-integration/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/odoo-shopify-integration/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Kết nối cửa hàng Shopify của tôi với Odoo để đồng bộ sản phẩm và tồn kho.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn mô tả cách bạn muốn dữ liệu chảy giữa Shopify và Odoo. Công cụ giúp bạn thiết lập kết nối và cung cấp ví dụ mã để hai hệ thống giao tiếp được với nhau.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Odoo ↔ Shopify Integration

Overview

This skill guides you through integrating Odoo with Shopify — syncing your product catalog, real-time inventory levels, incoming orders, and customer data. It covers both using the official Odoo Shopify connector (Enterprise) and building a custom integration via Shopify REST + Odoo XMLRPC APIs.

When to Use This Skill

  • Selling on Shopify while managing inventory in Odoo.
  • Automatically creating Odoo sales orders from Shopify purchases.
  • Keeping Odoo stock levels in sync with Shopify product availability.
  • Mapping Shopify product variants to Odoo product templates.

How It Works

  1. Activate: Mention @odoo-shopify-integration and describe your sync scenario.
  2. Design: Receive the data flow architecture and field mapping.
  3. Build: Get code snippets for the Shopify webhook receiver and Odoo API caller.

Data Flow Architecture

SHOPIFY                          ODOO
--------                         ----
Product Catalog <──────sync──────  Product Templates + Variants
Inventory Level <──────sync──────  Stock Quants (real-time)
New Order       ───────push──────> Sale Order (auto-confirmed)
Customer        ───────push──────> res.partner (created if new)
Fulfillment     <──────push──────  Delivery Order validated

Examples

Example 1: Push an Odoo Sale Order for a Shopify Order (Python)

import xmlrpc.client, requests

# Odoo connection
odoo_url = "https://myodoo.example.com"
db, uid, pwd = "my_db", 2, "api_key"
models = xmlrpc.client.ServerProxy(f"{odoo_url}/xmlrpc/2/object")

def create_odoo_order_from_shopify(shopify_order):
    # Find or create customer
    partner = models.execute_kw(db, uid, pwd, 'res.partner', 'search_read',
        [[['email', '=', shopify_order['customer']['email']]]],
        {'fields': ['id'], 'limit': 1}
    )
    partner_id = partner[0]['id'] if partner else models.execute_kw(
        db, uid, pwd, 'res.partner', 'create', [{
            'name': shopify_order['customer']['first_name'] + ' ' + shopify_order['customer']['last_name'],
            'email': shopify_order['customer']['email'],
        }]
    )

    # Create Sale Order
    order_id = models.execute_kw(db, uid, pwd, 'sale.order', 'create', [{
        'partner_id': partner_id,
        'client_order_ref': f"Shopify #{shopify_order['order_number']}",
        'order_line': [(0, 0, {
            'product_id': get_odoo_product_id(line['sku']),
            'product_uom_qty': line['quantity'],
            'price_unit': float(line['price']),
        }) for line in shopify_order['line_items']],
    }])
    return order_id

def get_odoo_product_id(sku):
    result = models.execute_kw(db, uid, pwd, 'product.product', 'search_read',
        [[['default_code', '=', sku]]], {'fields': ['id'], 'limit': 1})
    return result[0]['id'] if result else False

Example 2: Shopify Webhook for Real-Time Orders

from flask import Flask, request
app = Flask(__name__)

@app.route('/webhook/shopify/orders', methods=['POST'])
def shopify_order_webhook():
    shopify_order = request.json
    order_id = create_odoo_order_from_shopify(shopify_order)
    return {"odoo_order_id": order_id}, 200

Best Practices

  • ✅ Do: Use Shopify's webhook system for real-time order sync instead of polling.
  • ✅ Do: Match products using SKU / Internal Reference as the unique key between both systems.
  • ✅ Do: Validate Shopify webhook HMAC signatures before processing any payload.
  • ❌ Don't: Sync inventory from both systems simultaneously without a "master system" — pick one as the source of truth.
  • ❌ Don't: Use Shopify product IDs as the key — use SKUs which are stable across platforms.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Câu hỏi thường gặp

“Sync” nghĩa là gì?

Đồng bộ nghĩa là giữ thông tin giống nhau giữa hai hệ thống khác nhau. Ví dụ, khi bạn bán một mặt hàng trên Shopify, tồn kho trong Odoo được cập nhật tự động.

“Webhooks” là gì?

Webhook giống như các thông báo tự động. Khi có điều gì đó xảy ra trên Shopify (như đơn hàng mới), nó gửi thông báo đến Odoo.

API là gì?

API là bộ quy tắc cho phép hai chương trình máy tính giao tiếp với nhau. Nó giống như một người phiên dịch giúp các hệ thống khác nhau trao đổi thông tin.

Chi tiết

Mô tả gốc của tác giả

Connect Odoo with Shopify: sync products, inventory, orders, and customers using the Shopify API and Odoo's external API or connector modules.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5353
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự