Skip to main content

Business Central Export Overview

The Business Central Export system automatically pushes orders from your middleware database to Microsoft Dynamics 365 Business Central using SOAP web services.

What It Does

After orders are imported from BigCommerce or WooCommerce into the middleware tables, the BC Export system:

  1. Inserts line items into Business Central via SOAP
  2. Verifies that Business Central processed the orders
  3. Retrieves Sales Order numbers from Business Central
  4. Tracks export status with imported/verified flags

How It Works

sequenceDiagram
participant EC as E-Commerce
participant OS as Order Sync
participant DB as Middleware DB
participant INS as BC Insert
participant BC as Business Central
participant VER as BC Verify

EC->>OS: Order placed
OS->>DB: Import order<br/>(imported=0, verified=0)
INS->>DB: Query pending orders
DB-->>INS: Orders WHERE imported=0
INS->>BC: SOAP Create (line items)
BC-->>INS: Success
INS->>DB: Mark imported=1
Note over BC: Processing...<br/>(1-5 minutes)
VER->>DB: Query imported orders
DB-->>VER: Orders WHERE imported=1
VER->>BC: SOAP Read (verify status)
BC-->>VER: SalesOrderNo + Completed
VER->>DB: Mark verified=1<br/>Store SalesOrderNo

Key Concepts

Order States

StateFlagsDescription
Imported to Middlewarefully_import_from_website=1
imported=0
verified=0
Order Sync completed
Inserted to BCimported=1
verified=0
Pushed to Business Central
Verified in BCimported=1
verified=1
BC confirmed processing

Operations

Insert Line Items

  • Runs: Every 10 minutes
  • Action: Push pending orders to Business Central
  • Method: SOAP Create on AutoShoppingCartImport endpoint
  • Updates: Sets imported=1 and imported_date in database

Verify Line Items

  • Runs: Every 10 minutes
  • Action: Check Business Central processing status
  • Method: SOAP Read on AutoShoppingCartImport endpoint
  • Updates: Sets verified=1, stores nav_sales_order_number

Timeline

Typical order export timeline:

  • T+0 min: Customer places order
  • T+30 min: Order Sync imports to middleware
  • T+40 min: BC Insert pushes to Business Central
  • T+45 min: Business Central creates Sales Order
  • T+50 min: BC Verify confirms and retrieves SO number

Total: ~50 minutes from order placement to BC verification

Prerequisites

Before using BC Export:

  1. Database Environment configured and active
  2. Order Sync running and importing orders
  3. SOAP Connection to Business Central configured
  4. Cron Jobs installed on server

Quick Start

  1. Configure API Connections - Set up SOAP and OData connections
  2. Test Manually - Trigger operations from Control Panel
  3. Install Cron Jobs - Automate the export process
  4. Monitor Operations - Track export status and logs

Features

  • ✅ Automated export every 10 minutes
  • ✅ Manual triggers via Control Panel
  • ✅ Live/Test environment switching
  • ✅ Comprehensive error logging
  • ✅ Retry logic for failed operations
  • ✅ Real-time status monitoring
  • ✅ Sales order number tracking

Next Steps

Continue to Setup Guide to configure your first API connection.