Skip to content

How to Connect Instagram to Odoo: Social Commerce Integration

DeployMonkey Team · March 23, 2026 10 min read

Why Connect Instagram to Odoo?

Instagram has evolved from a photo-sharing app into a full commerce platform. With Instagram Shopping, product tagging, checkout, and DM-based selling, brands generate significant revenue directly on Instagram. But managing inventory, order fulfillment, and customer data across Instagram and Odoo manually is unsustainable at scale.

Integrating Instagram with Odoo centralizes your product catalog, ensures inventory accuracy across channels, and gives you a unified view of orders regardless of where they originate.

Integration Scope

FeatureIntegration TypeAPI Required
Product catalog syncOdoo to InstagramCommerce API
Order importInstagram to OdooCommerce API
Inventory syncOdoo to InstagramCommerce API
DM lead captureInstagram to OdooMessaging API
Post performanceInstagram to OdooGraph API
Comment monitoringInstagram to OdooGraph API

Prerequisites

  • Instagram Business or Creator account
  • Facebook Business Manager account
  • Facebook Commerce Manager (for Instagram Shopping)
  • Meta Developer account with app created
  • Odoo with Sales, Inventory, and optionally eCommerce modules

Step 1: Set Up Meta Developer App

  1. Go to developers.facebook.com
  2. Create a new app (type: Business)
  3. Add the Instagram Graph API product
  4. Add the Instagram Basic Display API if needed
  5. Generate a long-lived access token

Step 2: Sync Product Catalog

Instagram Shopping pulls products from a Facebook Commerce catalog. You can populate this catalog from Odoo:

import requests

def sync_product_to_fb_catalog(product, catalog_id, access_token):
    requests.post(
        f'https://graph.facebook.com/v18.0/{catalog_id}/products',
        params={'access_token': access_token},
        json={
            'retailer_id': str(product['id']),
            'name': product['name'],
            'description': product['description_sale'] or product['name'],
            'availability': 'in stock' if product['qty_available'] > 0 else 'out of stock',
            'price': f"{product['list_price']} USD",
            'url': f"https://your-store.com/product/{product['id']}",
            'image_url': product['image_url'],
            'brand': product.get('brand', 'Your Brand'),
        }
    )

Step 3: Import Instagram Orders

When customers purchase through Instagram Checkout, orders appear in Commerce Manager. Use the Commerce API to fetch and create Odoo sale orders:

def fetch_instagram_orders(access_token, commerce_account_id):
    resp = requests.get(
        f'https://graph.facebook.com/v18.0/{commerce_account_id}/orders',
        params={
            'access_token': access_token,
            'fields': 'id,buyer_details,items,shipping_address,estimated_payment_details',
        }
    )
    return resp.json()['data']

def create_odoo_order(order, odoo_models, db, uid, key):
    buyer = order['buyer_details']
    
    # Find or create partner
    partner_id = find_or_create_partner(buyer, odoo_models, db, uid, key)
    
    # Create sale order
    order_lines = []
    for item in order['items']['data']:
        product_id = find_product_by_retailer_id(item['retailer_id'])
        order_lines.append((0, 0, {
            'product_id': product_id,
            'product_uom_qty': item['quantity'],
            'price_unit': float(item['price_per_unit']['amount']),
        }))
    
    odoo_models.execute_kw(db, uid, key, 'sale.order', 'create', [{
        'partner_id': partner_id,
        'order_line': order_lines,
        'origin': f"Instagram Order {order['id']}",
    }])

Step 4: Capture DM Leads

Use the Instagram Messaging API to monitor DMs for purchase intent and create CRM leads:

# Webhook handler for Instagram DM events
def handle_instagram_message(data):
    messaging = data['entry'][0]['messaging'][0]
    sender_id = messaging['sender']['id']
    message_text = messaging.get('message', {}).get('text', '')
    
    # Create lead from DM
    if contains_purchase_intent(message_text):
        create_crm_lead(sender_id, message_text)

Inventory Sync

Keep Instagram product availability accurate by syncing stock levels from Odoo. Run a scheduled job that checks Odoo inventory and updates the Facebook catalog:

  • Product in stock in Odoo and marked out of stock on Instagram: update to available
  • Product out of stock in Odoo: mark unavailable on Instagram to prevent overselling
  • Run sync every 15-30 minutes for active catalogs

Performance Tracking

Pull Instagram post metrics into Odoo for unified marketing analytics:

  • Reach and impressions per post
  • Engagement rate (likes, comments, shares, saves)
  • Click-through rate on product tags
  • Story views and swipe-ups

Store these metrics in a custom Odoo model and display them alongside revenue data for ROI analysis.

DeployMonkey + Instagram

DeployMonkey instances support the webhook endpoints and scheduled actions needed for Instagram commerce integration. Our AI agent can help configure product catalog sync and order import workflows.