跳至内容

用 Odoo + Claude 构建内部 Slack 机器人,实时查询 ERP 数据

让运维和财务可以用自然语言直接向受控的 Odoo 只读 API 提问
2026年6月24日
用 Odoo + Claude 构建内部 Slack 机器人,实时查询 ERP 数据
Dasolo
| 还没有评论

Odoo + Claude:构建在 Slack 内直接查询 ERP 的内部机器人

Odoo Claude Slack 机器人 在 Slack 中以自然语言接收请求,并将其映射为受控的 Odoo search_read 模板,同时保持记录规则和权限完整。

>This guide walks through the manual process today, the Odoo to Claude to Odoo data flow, and a concrete scenario with inputs and outputs you can hand to an integrator. We focus on AI ERP chatbot Slack and Claude Odoo API bot with Claude as the LLM. GPT-4 may appear in comparisons, but the patterns below assume Anthropic API structured outputs. Every step names Odoo models and fields so your team can estimate effort without vague AI buzzwords.

>Dasolo deploys these patterns with Anthropic Claude on EU-hosted middleware, but the Odoo field names and triggers apply regardless of hosting region. You will see Odoo Claude Slack bot referenced in manual, data flow, and practice sections so SEO and operator clarity stay aligned. Treat Claude as a structured worker that returns JSON your middleware validates, not as a chat window your team must babysit for every field write.

本页导航

当前的人工操作流程


>Ops leaders ping finance on Slack for AR aging and inventory snapshots. Finance exports from Odoo, screenshots pivot tables, and replies twenty minutes later. Ad-hoc SQL or broad admin access is not an option, so simple questions wait behind ticket queues. AI ERP chatbot Slack demos fail when bots hallucinate numbers because they are not grounded in live search_read results. Multiple companies in one database make wrong-company answers costly if record rules are bypassed.

>Odoo Claude Slack bot must translate natural language to governed Odoo queries, not raw database access. Warehouse asks finance for customer credit status via Slack; finance exports aged receivable PDF because no safe self-serve query exists. Project managers ping developers for task status; developers context-switch from Odoo Project to answer headcount hours questions. Wrong answers from memory about stock levels cause oversell when Shopify still shows inventory from stale cache. IT resists giving broad Odoo access to Slack users who only need read-only operational answers.

>Rate limit per Slack user to prevent accidental expensive queries during channel jokes. Stakeholders ask for ROI on Odoo Claude Slack bot before funding middleware. Track minutes saved per record type for two weeks in a spreadsheet column next to Odoo list view. Operations worry AI will bypass approval chains. Document which fields are draft-only in your data map before the first production webhook fires.

>Training slides still describe the old manual flow six months after go-live because nobody updated internal wiki pages when Claude drafts became standard practice. IT security asks whether customer emails leave the EU. Answer with architecture diagram showing Anthropic region config and redaction rules before pilot approval.

数据流:Odoo → Claude → Odoo


>Trigger: Slack app mention or DM with bot scope in allowed channels list. Odoo read: User mapping slack.user to res.users determines company_ids and groups. Tool layer exposes search_read templates for stock, AR, PO, and project tasks. Claude task: Parse intent to tool call JSON with model, domain, fields, limit, and natural language formatter instructions. Write back: Middleware executes Odoo XML-RPC or JSON-RPC with user creds, passes rows to Claude for formatted Slack blocks, returns message.

>No write operations in v1. Human review: Sensitive queries require confirm button in Slack before showing partner-level AR detail. Architecture matches how Dasolo ships Odoo Claude Slack bot with separate read service account per Slack workspace. Slack user maps to res.users via email; unmapped users get onboarding message with OAuth link to approve Odoo profile binding. Tool registry lists allowed models stock.quant, purchase.order.line, account.move.line open, project.task with field allowlists.

>Claude never receives raw SQL; middleware builds domain arrays from intent JSON only. Write operations disabled in v1; future v2 uses explicit confirm button per create call with sudo elevated service user. Response formatter uses Slack blocks with max row count twenty; overflow offers link to Odoo list view filtered domain. Offer explain domain button in Slack reply so power users learn what Odoo filter ran under the hood. Middleware runs on queue workers with exponential backoff when Anthropic returns 529 overloaded errors, so Odoo webhooks never block user saves.

>Structured output validation uses pydantic or jsonschema in middleware; invalid Claude JSON posts to discuss.channel with raw text for developer inspection. Prompt templates version as v1, v2 files in git; production reads active version from environment variable for controlled rollout of Odoo Claude Slack bot tuning. Odoo audit log on write captures uid from API user so compliance can answer who authorized AI field changes during quarterly review. Staging environment replays production anonymized payloads weekly so prompt edits are tested before promotion without touching customer records. Feature flags per company_id in multi-company databases let you pilot on one entity while others keep manual process unchanged.

实际演示场景


场景示例:仓库经理查询某 SKU 的未收货采购单行

>User asks: what is on order for SKU WL-4421 and when arrives. Bot resolves product_id, queries purchase.order.line in purchase state, returns vendor, qty, and date_planned in Slack table. Follow-up question filters to Vendor Acme only. Claude reuses prior context but runs fresh query with tightened domain, avoiding stale hallucinated inventory counts. CFO asks total open AR for top five partners by balance; bot returns table with partner name, amount_residual, and link to filtered accounting view. Ops asks which MOs are late today; bot queries mrp.production state not done date_planned_start before today company TZ.

>User asks ambiguous inventory question; bot clarifies warehouse location before second query executes. Document expected latency from trigger to draft output. Most teams target under ninety seconds for email and transcript workflows, under five minutes for PDF extraction. Run parallel shadow mode for two weeks: Claude writes to test fields while humans work normally, then compare quality before cutover.

边缘情况:跨公司查询被阻止

>User asks AR for subsidiary they lack access to. Bot returns permission explanation without leaking row counts from other company_id. Record rules on res.users company_ids enforce boundary before Claude formats any numeric answer. UAT checklist: trigger on test record, verify JSON log, confirm draft fields, approve write, confirm chatter audit entry, rollback test data. Go-live criteria for Odoo Claude Slack bot: ninety percent agent or rep satisfaction on first ten production runs and under five percent JSON validation failure rate.

主要收益


    >
  • 节省时间:代理和业务人员审阅 AI 生成草稿,而不是每小时重复在 Odoo 中手动录入相同字段。
  • 一致性:Odoo Claude Slack 机器人在不同班次与地点应用统一的分类与格式化规则。
  • 速度:触发器在创建事件发生时即时运行,减少了依赖日终批处理的等待时间,从而缩短从接收问题到采取行动的时间。
  • 扩展性:新增工作流只需克隆提示架构与 webhook,而不是重建基础设施。
  • 可审计性:每次 Claude 调用都记录输入、输出与人工覆写操作,并关联到业务记录上。
  • 治理:对面向客户或财务的写操作保留人工审批,以满足合规要求。
  • 入职培训:新员工可将 AI 生成的草稿当作模板,从而比阅读过时的 PDF 操作手册更快掌握流程。
  • 集成:同一套中间件模式可服务后续工作流,无需另寻第三方合同(除 Anthropic API 使用外)。

实施注意事项


>Data quality: Garbage partner names, missing product internal references, and empty helpdesk descriptions produce weak AI output. Clean master data first. Human review: Start with draft-only writes for four weeks. Measure override rate before expanding auto-apply on low-risk fields. API and cost: Batch nightly jobs for scoring and reporting. Reserve real-time Claude calls for high-value triggers. Cache product catalog snippets where prompts repeat. Security: Store Anthropic keys in middleware secrets, not in Odoo JavaScript. Scope Odoo users per workflow with least privilege. Change management: Show reps the time saved on one Odoo Claude Slack bot workflow before announcing ten more. Rotate Slack signing secret and Odoo API keys quarterly with documented runbook. Log every query with user_id and domain JSON for security audit without logging full row payloads containing PII.

为什么选择 Dasolo 作为你的 AI 合作伙伴


>Dasolo builds AI agents and integrates Claude with Odoo daily for Benelux and EU operators who need record rules, GDPR-aware logging, and French or Dutch rollout training. We implement Odoo Claude Slack bot with rollback paths, prompt versioning, and observability your IT team can audit without reading data science notebooks. Our team connects Helpdesk, Sales, Purchase, and Documents modules to the same middleware patterns so you do not maintain eleven separate scripts. We document prompt versions, test fixtures, and rollback steps in your repo so internal IT is never dependent on tribal knowledge. Whether you start with Odoo Claude Slack bot or a sibling workflow from our roundup, the integration playbook is the same.

与 Dasolo 预约你的 AI 评估


预约 Dasolo 的 AI 评估,我们会为你评估哪些 Odoo Claude Slack 机器人 工作流应优先上线,以及哪些数据清理能尽快解除阻塞。

>安排你的 AI 评估

总结


>Odoo Claude Slack bot works when Claude sits on a governed Odoo loop with human gates, not as a side chat window. Pick one trigger this sprint, measure time-to-complete and override rate for thirty days, then clone the pattern for the next AI ERP chatbot Slack use case.

>安排你的 AI 评估

>Ship one workflow, measure override rate and cycle time, then expand Odoo Claude Slack bot to adjacent triggers on the same Odoo model. Your integrator should deliver a test fixture JSON pack so regression tests run on every prompt or model version change.

用 Odoo + Claude 构建内部 Slack 机器人,实时查询 ERP 数据
Dasolo 2026年6月24日
分析这篇文章
登录 留下评论