ERP Order Sync is an open-source Chrome and Microsoft Edge extension for extracting order data from ERP pages and synchronizing it to a third-party HTTP API.
This project is released under the MIT License.
中文说明见 README.zh-CN.md.
- Extract order rows from the current ERP page table.
- Support configurable table selectors and ERP URL matching rules.
- Map ERP column names to normalized API fields.
- Send orders in batch mode or single-record mode.
- Configure API URL, token, custom headers, and field mappings.
- Enable debug logging and inspect logs inside the extension, without relying on the target page console.
manifest.json: extension manifest for Chrome / Edge.content.js: scrapes order data from the ERP page DOM.background.js: handles settings, sync requests, and debug log storage.popup.html+popup.js: quick actions for scraping and syncing.options.html+options.js: extension configuration page.logs.html+logs.js: dedicated debug log viewer.styles.css: shared UI styles.assets/icons/: publish-ready extension icons.assets/branding/: editable brand assets.docs/: store listing and policy templates.
- Open
chrome://extensions/in Chrome oredge://extensions/in Microsoft Edge. - Enable Developer Mode.
- Click
Load unpacked. - Select this project directory.
Open the extension options page and set:
API URL: the third-party endpoint that receives orders.API Token: optional bearer token.ERP URL Patterns: optional allowlist, one pattern per line.Table Selector: CSS selector for the ERP order table.Sync Mode:batchorsingle.Debug Logging:onoroff.Extra Headers: JSON object with additional request headers.Field Mappings: JSON object that maps ERP headers to normalized fields.
Example field mapping:
{
"orderNo": ["Order No", "order_no", "订单号", "单号"],
"customerName": ["Customer Name", "客户名称", "客户"],
"amount": ["Amount", "Total Amount", "金额", "总金额"],
"status": ["Status", "订单状态", "状态"],
"createdAt": ["Created At", "下单时间", "创建时间"]
}Batch mode:
{
"source": "chrome-extension",
"sourceUrl": "https://erp.example.com/orders",
"orderCount": 2,
"orders": [
{
"orderNo": "SO20260414001",
"customerName": "ACME",
"amount": "1000.00"
}
]
}Single mode:
{
"source": "chrome-extension",
"sourceUrl": "https://erp.example.com/orders",
"order": {
"orderNo": "SO20260414001",
"customerName": "ACME",
"amount": "1000.00"
}
}Generate an unpacked local extension directory and a zip package:
rm -rf dist/erpordersync-0.1.0 dist/erpordersync-0.1.0.zip
mkdir -p dist/erpordersync-0.1.0/assets \
dist/erpordersync-0.1.0/docs \
dist/erpordersync-0.1.0/_locales
cp manifest.json background.js content.js i18n.js \
popup.html popup.js options.html options.js logs.html logs.js styles.css \
README.md README.zh-CN.md LICENSE \
dist/erpordersync-0.1.0/
cp -R assets/icons assets/branding dist/erpordersync-0.1.0/assets/
cp -R _locales/* dist/erpordersync-0.1.0/_locales/
cp docs/PRIVACY.en.md docs/PRIVACY.zh-CN.md docs/STORE_LISTING.en.md docs/STORE_LISTING.zh-CN.md dist/erpordersync-0.1.0/docs/
cd dist
zip -r erpordersync-0.1.0.zip erpordersync-0.1.0Load the unpacked extension from dist/erpordersync-0.1.0.
The zip package is generated at dist/erpordersync-0.1.0.zip.
- Chrome Web Store and Microsoft Edge Add-ons both require raster icons; the required extension icons are included in
assets/icons/. - Before publishing, review the permissions in
manifest.jsonand narrow host permissions to your ERP domains if possible. - For store submissions, prepare screenshots and host a public privacy policy page based on the templates in
docs/.
See:
- GitHub: dennisge/erpordersync