Skip to content

External Integrations & Webhooks

Complete reference for all external API and webhook configurations required for the Odoo 15 ERP system.


Quick Reference

Integration Odoo Setting Location External Portal
Xero Accounting > Configuration > Xero developer.xero.com
JustCall SMS Settings > JustCall SMS > Configuration justcall.io
Google Chat Settings > Google Chat Google Chat Spaces
reCAPTCHA .env file google.com/recaptcha
REST API OAuth Settings > Technical > OAuth N/A

Domain Configuration

When changing your production domain, update all integrations below.

Current Production Domains

Service Domain Purpose
Odoo ERP erp.austinjdx.com Main ERP system
Landing Page austinjdx.com Public website
Field PWA service.austinjdx.com Field technician app
Documentation docs.austinjdx.com This documentation

Xero Integration

Xero accounting integration for invoice synchronization.

Odoo Configuration

Location: Accounting > Configuration > Xero Connections

Field Description Example Value
Connection Name Display name Production Xero
Company Odoo company Your Company
Client ID From Xero portal ABC123...
Client Secret From Xero portal secret...
Redirect URI OAuth callback URL https://erp.austinjdx.com/xero/callback
Webhook Key Signature verification webhook-key...
Down Payment Product Product for DP detection Down Payment
Payment Journal Bank/cash journal Bank
Sales Account Code Xero sales account 400
Deposit Account Code Xero deposit account 835

Xero Developer Portal

URL: https://developer.xero.com/app/manage

Setting Value
Redirect URI https://erp.austinjdx.com/xero/callback
Webhook URL https://erp.austinjdx.com/xero/webhook

Webhook Events

Configure these webhook events in Xero:

  • INVOICE.UPDATED - Payment notifications

Troubleshooting

Issue Solution
OAuth redirect error Verify Redirect URI matches exactly in both Odoo and Xero portal
Webhook not receiving Check webhook URL is accessible from internet
Token expired Click "Disconnect" then "Connect to Xero" to re-authorize

JustCall SMS

SMS/MMS integration with unified inbox and multi-line support.

Odoo Configuration

Location: Settings > JustCall SMS > Configuration

Field Description Example Value
API Key From JustCall dashboard your-api-key
API Secret From JustCall dashboard your-api-secret
Webhook Base URL Public URL for webhooks https://erp.austinjdx.com
Webhook Secret Optional signature verification your-secret
Default Line Default line for sending Sales Line

JustCall Dashboard

URL: https://app.justcall.io/settings/webhooks

Setting Value
Webhook URL https://erp.austinjdx.com/justcall/webhook/sms

Webhook Events

Configure these events in JustCall:

Event Description
sms.received Incoming SMS messages
sms.sent Outgoing SMS confirmation
sms.delivered Delivery status updates

Phone Lines

Location: Settings > JustCall SMS > Phone Lines

Field Description Example
Name Display name Sales Line
Phone Number (E.164 without +) 15125551234
Type Line purpose sales / support / operations
Is Default Default for sending True/False

Troubleshooting

Issue Solution
Webhook not receiving Check URL: curl https://erp.austinjdx.com/justcall/webhook/test
SMS not matching partners Run: env['justcall.sms'].action_match_all_partners()
Missing messages Run manual sync: env['justcall.sms'].sync_from_api(hours=48)

Google Chat

Team notifications to Google Chat spaces.

Odoo Configuration

Location: Settings > Google Chat

Field Description Example Value
Company Odoo company Your Company
Webhook URL From Google Chat space https://chat.googleapis.com/v1/spaces/...
Enable FSM Notifications FSM stage changes True
Enable Sales Notifications Sales order confirmations True
Enable Invoice Notifications Invoice posting True
Enable PO Notifications Purchase order confirmations True

Google Chat Space Setup

  1. Open Google Chat space
  2. Click Space name > Apps & integrations > Webhooks
  3. Click Add webhook
  4. Name it (e.g., "Odoo Notifications")
  5. Copy the webhook URL
  6. Paste into Odoo configuration

No Domain Dependency

Google Chat webhooks are URLs FROM Google. They don't depend on your Odoo domain and don't need updating when you change domains.

Notification Events

Event Trigger
FSM Stage Change FSM order moves to new stage
Sales Confirmation Sale order confirmed
Invoice Posted Customer invoice posted
PO Confirmation Purchase order confirmed

reCAPTCHA

Google reCAPTCHA v3 for spam protection on landing page forms.

Environment Configuration

File: .env (production server)

# reCAPTCHA v3
RECAPTCHA_SITE_KEY=your-site-key
RECAPTCHA_SECRET_KEY=your-secret-key

Google reCAPTCHA Console

URL: https://www.google.com/recaptcha/admin

Setting Value
reCAPTCHA Type v3
Domains austinjdx.com, erp.austinjdx.com

Adding New Domains

When changing domains:

  1. Go to reCAPTCHA Admin Console
  2. Select your site
  3. Click Settings (gear icon)
  4. Add new domain to "Domains" list
  5. Save changes

REST API OAuth Clients

OAuth2 clients for external application integrations.

Odoo Configuration

Location: Settings > Technical > OAuth > Applications

Field Description
Name Application name
Client ID Generated automatically
Client Secret Generated automatically
Redirect URIs Allowed callback URLs
Scopes Permissions granted

Creating OAuth Client

  1. Go to Settings > Technical > OAuth > Applications
  2. Click Create
  3. Enter application name
  4. Add redirect URIs (one per line)
  5. Save to generate Client ID and Secret

API Key Authentication

Location: Settings > Users > [User] > Preferences > API Keys

  1. Select user
  2. Go to Preferences tab
  3. Under API Keys, click New API Key
  4. Enter description
  5. Click Generate Key
  6. Copy key (shown only once)

Domain Migration Checklist

When migrating to a new domain (e.g., austinjdx.com to erp.austinjdx.com):

1. Update .env File

# Update domain settings
DOMAIN_ERP=erp.austinjdx.com
DOMAIN_LANDING=austinjdx.com
DOMAIN_PWA=service.austinjdx.com
DOMAIN_DOCS=docs.austinjdx.com

2. SSL Certificates

# Request new certificates
./production_deploy.sh init-ssl

3. External Integrations

  • Xero Developer Portal
    • Update Redirect URI
    • Update Webhook URL
  • Xero in Odoo
    • Update Redirect URI field
    • Reconnect to Xero (Disconnect → Connect)
  • JustCall Dashboard
    • Update Webhook URL
  • JustCall in Odoo
    • Update Webhook Base URL
  • reCAPTCHA Console
    • Add new domain to allowed list
  • OAuth Clients
    • Update redirect URIs for any external apps

4. DNS Configuration

Ensure DNS records point to your server:

Record Type Value
erp.austinjdx.com A Your server IP
service.austinjdx.com A Your server IP
docs.austinjdx.com A Your server IP

5. Verify Configuration

# Check nginx config
./production_deploy.sh configure-nginx

# Restart services
./production_deploy.sh restart

# Test endpoints
curl -I https://erp.austinjdx.com
curl -I https://erp.austinjdx.com/xero/callback
curl -I https://erp.austinjdx.com/justcall/webhook/test

Webhook Endpoints Reference

All webhook endpoints exposed by the Odoo ERP:

Endpoint Method Integration Purpose
/xero/callback GET Xero OAuth2 callback
/xero/webhook POST Xero Payment notifications
/justcall/webhook/sms POST JustCall Incoming SMS
/justcall/webhook/test GET JustCall Webhook connectivity test

Security Best Practices

  1. Use HTTPS - All webhook URLs must use HTTPS
  2. Webhook Secrets - Configure signature verification where available
  3. API Key Rotation - Rotate API keys periodically
  4. Minimal Permissions - Create dedicated API users with limited access
  5. Monitor Logs - Check webhook logs for unusual activity

Troubleshooting

Webhook Not Receiving Data

# Check webhook is accessible
curl -X POST https://erp.austinjdx.com/justcall/webhook/sms \
  -H "Content-Type: application/json" \
  -d '{"test": true}'

# Check Odoo logs
docker compose logs odoo | grep -i webhook

OAuth Redirect Errors

  1. Verify redirect URI matches EXACTLY (including trailing slash)
  2. Check HTTPS certificate is valid
  3. Ensure domain is accessible from external service

API Connection Failed

# Test API endpoint
curl -X GET "https://erp.austinjdx.com/restapi/1.0/object/res.partner" \
  -H "X-API-Key: your-api-key"

# Check Odoo is running
./production_deploy.sh health