Testing BC Export
This guide walks you through testing the Business Central export system.
Prerequisites
Before testing:
- ✅ API Connections configured (SOAP and OData)
- ✅ Connections tested successfully
- ✅ Database schema updated
- ✅ Orders imported via Order Sync
Manual Testing
Test 1: Insert Line Items
- Navigate to GSM Middleware → Control Panel
- Locate the "Business Central Export" widget
- Check "Pending Insert" count (should be > 0)
- Click "Run Insert Now"
- Verify result:
✓ Complete
Processed: 10, Success: 10, Failed: 0
Test 2: Verify Line Items
- Wait 2-5 minutes (allow BC to process)
- Check "Pending Verify" count
- Click "Run Verify Now"
- Verify sales order numbers retrieved
Cron Testing
Test the cron scripts manually:
php wp-content/plugins/gsm-middleware/cron/bc-insert-items.php
Expected output:
[2026-03-17 12:00:00 UTC] GSM BC Insert Items starting...
Processed: 15, Success: 15, Failed: 0
[2026-03-17 12:00:08 UTC] GSM BC Insert Items complete in 8s.
Database Verification
Check that orders were processed:
SELECT number, imported, verified, nav_sales_order_number
FROM rm_order
WHERE verified = 1
ORDER BY verified_date DESC
LIMIT 10;
Success Criteria
✅ Insert operation completes without errors
✅ Verify operation retrieves sales order numbers
✅ Database flags update correctly
✅ Orders appear in Business Central
✅ Cron jobs execute automatically
Next Steps
- Monitor Operations - Track export status
- Troubleshooting - Handle any issues