odoo-shopify-integration – skill Lập trình cho agent AI
Kết nối Odoo với Shopify: đồng bộ sản phẩm, tồn kho, đơn hàng và khách hàng qua Shopify API và API bên ngoài hoặc module connector của Odoo.
Cài skill odoo-shopify-integration bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/odoo-shopify-integration-15bbe.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /odoo-shopify-integration – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/odoo-shopify-integration-15bbe.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $odoo-shopify-integration – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/odoo-shopify-integration-15bbe.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /odoo-shopify-integration – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/odoo-shopify-integration-15bbe.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /odoo-shopify-integration – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc 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 evaluating a connector and designing a custom integration. Verify each connector's actual publisher, support, license and version compatibility; do not assume an official Enterprise connector. Select Shopify and Odoo API versions supported by the deployed systems before implementation.
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 (draft; reviewed confirmation)
Customer ───────push──────> res.partner (created if new)
Fulfillment <──────push────── Delivery Order validatedExamples
Example 1: Safe order-import procedure
Implement these steps in an authorized test database before writing production data:
1. Authenticate to Odoo with a dedicated least-privilege integration account;
load secrets from approved secret storage, never inline them in source.
2. Validate the webhook as below before parsing or trusting order/customer fields.
3. Store a unique mapping of shop + Shopify order ID to Odoo order ID. Enforce it
transactionally so retries and concurrent deliveries cannot create duplicates.
4. Resolve customers and variants from durable external-ID mappings. Email and
SKU are optional, editable and potentially non-unique; missing or ambiguous
mappings go to review rather than choosing the first match.
5. Validate quantities, currency, discounts, taxes, shipping, refunds and company
context. Reconcile totals with Shopify; do not blindly convert prices to binary
floats or rely on Odoo defaults for fiscal treatment.
6. Create a draft sale order. Confirm, invoice or fulfill only under the selected
business policy and granted authority. Track failures and reconcile later events.
Example 2: Authenticate an HTTPS webhook before processing (Python)
This helper illustrates raw-body authentication only; it is not a deployable
receiver or a complete idempotent queue. The receiver must enforce a body-size
limit, expected shop/topic and payload schema, then durably enqueue verified
messages with delivery/order deduplication before returning success.
import base64
import hashlib
import hmac
def valid_shopify_hmac(raw_body: bytes, supplied_header: str, app_secret: bytes) -> bool:
expected = base64.b64encode(
hmac.new(app_secret, raw_body, hashlib.sha256).digest()
)
return bool(app_secret) and bool(supplied_header) and hmac.compare_digest(
expected, supplied_header.encode("utf-8")
)
# In the receiver: read the original request bytes before any JSON parsing.
# Reject invalid/missing X-Shopify-Hmac-SHA256 with HTTP 401.
# Only after verification: parse and validate JSON, then durably enqueue it.
# Store X-Shopify-Webhook-Id under a unique constraint to deduplicate delivery.See [Shopify webhook verification and duplicate handling](https://shopify.dev/docs/apps/build/webhooks/verify-deliveries). Use the same app secret that signed the delivery; do not log it or full customer payloads.
Best Practices
- ✅ Do: Use Shopify's webhook system for real-time order sync instead of polling.
- ✅ Do: Reconcile shop-scoped variant mappings; enforce any SKU uniqueness assumption explicitly before using it as a secondary key.
- ✅ 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.
- Maintain explicit Shopify variant-to-Odoo variant mappings scoped to the shop. Use SKUs only after checking uniqueness and handling changes; neither a product ID nor a SKU alone identifies all cross-system variants.
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.
Skill liên quan
- odoo-woocommerce-bridge – Đồng bộ Odoo với WooCommerce: sản phẩm, tồn kho, đơn hàng và khách hàng qua WooCommerce…
- omp-delegate – Giao tác vụ lập trình cho Oh My Pi (`omp`) chỉ khi người dùng yêu cầu rõ ràng, trong khi…
- openapi-spec-generation – Tạo và duy trì đặc tả OpenAPI 3.1 từ mã nguồn, đặc tả thiết kế trước (design-first) và…
- openapi-spec-generator – Tạo đặc tả OpenAPI 3.x và Swagger 2.0 hoàn chỉnh, sẵn sàng cho production từ mô tả bằng…
- openclaw-github-repo-commander – Quy trình siêu cấp 7 bước để kiểm toán, dọn dẹp, review PR và phân tích đối thủ cho repo…
- opencode-delegate – Giao tác vụ lập trình cho OpenCode CLI chỉ khi người dùng yêu cầu rõ ràng, trong khi bộ…
- orchestrate-batch-refactor – Lập kế hoạch và thực hiện các đợt refactor lớn với các gói công việc có tính đến phụ…
- papers-skill – Kỹ năng cho quy trình nghiên cứu học thuật: tìm kiếm trên Semantic Scholar (hơn 200…