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.createdevent-bus topic (priority 60). Each new lead is pushed to Odoo by thepush_leadhandler. - Odoo webhook push —
push_leadPOSTs the lead (email, first/last name, company, phone, message, source) as JSON to the configuredwebhook_url, with an optionalAuthorization: Bearer <api_key>header and a 30-second timeout. On success it stampspushed_at; on failure it records the error inpush_error(truncated to 2000 chars) and logs a warning. - Redpanda topic consumption — the manifest declares that the extension
consumes
vectis.leads.created.v1(event typelead.created, consumer groupvectis-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¶
- Once installed (or dev-linked in development), the extension is discovered at startup; per-channel enablement is managed under Settings > Extensions.
- 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. - For event-bus-bridged delivery, the standalone event consumer must be
running so the
vectis.leads.created.v1topic 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
enabledis truthy andwebhook_urlis set. - Idempotent — a lead that already has
pushed_atset 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
Settingrows; the push is not per-channel.
Source: ext_odoo_leads/extension.py — in the enterprise-extensions repo.