Skip to content

Odoo Leads

The ext_odoo_leads extension pushes captured storefront leads into an Odoo CRM. Core stays provider-agnostic: it stores each lead and publishes a lead.created event; this extension subscribes to that event and POSTs the lead to a configured Odoo webhook handler, stamping the push result back onto the lead row (pushed_at / push_error) so the admin inbox shows CRM sync status. Use it when you want storefront lead captures to flow automatically into Odoo.

At a glance

Extension id odoo_leads
Category marketing
Version 0.1.0
Provides lead.created event subscription, Redpanda topic consumption (vectis.leads.created.v1)
External account Odoo lead-intake webhook URL (optional bearer token)

What It Provides

  • Lead-created subscription — on activation the extension subscribes to the lead.created event-bus topic (priority 60). Each new lead is pushed to Odoo by the push_lead handler.
  • Odoo webhook pushpush_lead POSTs the lead (email, first/last name, company, phone, message, source) as JSON to the configured webhook_url, with an optional Authorization: Bearer <api_key> header and a 30-second timeout. On success it stamps pushed_at; on failure it records the error in push_error (truncated to 2000 chars) and logs a warning.
  • Redpanda topic consumption — the manifest declares that the extension consumes vectis.leads.created.v1 (event type lead.created, consumer group vectis-ext-odoo_leads). The standalone event consumer bridges that topic to the in-process event bus, which delivers it to the push handler. The schema is core-owned (events/schemas/leads/created_v1.json), so the extension ships no schema of its own.

Setup

  1. Once installed (or dev-linked in development), the extension is discovered at startup; per-channel enablement is managed under Settings > Extensions.
  2. Set the extension's settings under Settings (the ext_odoo_leads.* keys below): enable it and provide the Odoo webhook URL, plus an optional bearer token.
  3. For event-bus-bridged delivery, the standalone event consumer must be running so the vectis.leads.created.v1 topic reaches the handler.

Configuration Reference

The manifest declares no config_schema. Settings are stored as global (channel-less) Setting rows under the ext_odoo_leads. prefix:

Key Type Default Description
ext_odoo_leads.enabled boolean string "false" Master on/off; accepts 1/true/yes
ext_odoo_leads.webhook_url string "" The Odoo lead-intake handler URL; no push happens without it
ext_odoo_leads.api_key string "" Optional bearer token sent as Authorization: Bearer …

Operational Notes

  • No URL, no push — pushes are skipped unless enabled is truthy and webhook_url is set.
  • Idempotent — a lead that already has pushed_at set is skipped, so re-delivery of the event does not double-post.
  • Failures are recorded, not raised — any HTTP or network error is caught, stored in push_error, and logged; the lead remains un-pushed and can be retried.
  • Config is global — settings are read from channel-less Setting rows; the push is not per-channel.

Source: ext_odoo_leads/extension.py — in the enterprise-extensions repo.