Skip to content

PureGit90/b2b-order-automation-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

B2B Order Intake & Processing — Working Automation Demo

What This Does

Automates B2B order processing from unstructured emails: AI extracts order data (SKUs, quantities, addresses, PO numbers), matches customers in CRM, checks credit limits and inventory availability, then either auto-creates ERP orders or routes exceptions to humans for review.

How It Works

Email receivedClaude AI extracts structured orderCRM customer matchCredit checkInventory checkAuto-fulfill or route exception

Quick Start

# Run with mock AI (no API key needed — demonstrates full pipeline)
python main.py --mock

# Run with live Claude API
export ANTHROPIC_API_KEY=your-key-here
pip install -r requirements.txt
python main.py

# Process a single email
python main.py --mock --index 0

Sample Scenarios

The demo includes 3 realistic B2B order emails that demonstrate different processing paths:

Email Customer Result Why
PO #FF-2026-0412 Freshfields Retail (existing) AUTO-FULFILL All checks pass
New order - urgent Berlin Organic (new customer) HUMAN REVIEW New customer + low stock warning
March batch order Supershop B.V. (existing, 3 locations) AUTO-FULFILL Multi-location order, partial stock on 1 item

What the AI Extracts

From any email format, Claude extracts:

  • Customer name, contact, email
  • PO number (any format)
  • Payment terms
  • New customer flag
  • VAT ID
  • Delivery address(es) with line items grouped by location
  • SKU codes, product descriptions, quantities
  • Special instructions

Demo Limitations

  • Uses mock customer/inventory data (production would query real ERP/CRM APIs)
  • Mock mode available for demo without API key
  • No PDF attachment parsing (production would add OCR via Claude vision)
  • No actual ERP/WMS API calls (production would use REST endpoints)

Production Version Would Add

  • IMAP inbox monitoring (or n8n webhook trigger)
  • Real ERP API integration (SAP, Dynamics, Exact Online)
  • PDF order form parsing via Claude vision API
  • n8n workflow orchestration for fulfillment pipeline
  • Slack/WhatsApp notifications for exceptions
  • Invoice auto-generation on shipment
  • Payment reconciliation module
  • Supplier invoice verification with 3-way match

About

AI-powered B2B order intake automation demo — Claude API + Python + Streamlit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages