Amazon Integration
- Author: bwhtech
- Repository: https://github.com/bwhtech/amazon_integration
- GitHub stars: 3
- Forks: 0
- License: MIT
- Category: Integrations
- Maintenance: Actively Maintained
- Frappe versions: develop
Install Amazon Integration
bench get-app https://github.com/bwhtech/amazon_integration
Add the Frappe Gems badge to your README
Maintain Amazon Integration? Paste this into your README:
[](https://frappegems.com/gems/apps/bwhtech/amazon_integration)
About Amazon Integration
Amazon Integration
Amazon Seller Central integration for ERPNext — an SP-API client, marketplace pricing driven by your own cost model, and the safety machinery to let both run unattended against a live account.
> Status: work in progress. The pricing and feed path is in place and covered by tests; order > sync, FBA inbound, packing/receiving and the operational reports are still landing. Interfaces > may change. Do not point this at a production Seller Central account yet.
Why
Pushing prices and stock to Amazon is money-bearing and irreversible — FBA ships automatically, and a shipped order cannot be recalled. Most integrations treat the API call as the hard part. It isn't. The hard part is everything that has to be true before the call goes out, and being able to stop it afterwards.
So this app is built around a loop rather than an endpoint:
readiness → preview → push → monitor → freeze → roll back
- Readiness — which SKUs are not safe to publish, and why. The readiness reports import the same validators the pusher enforces, so a green report and a failed push cannot disagree.
- Preview — the exact payload, before it goes anywhere.
- Guards — a purchase cost of zero, a missing cost row, a min below cost, or a price move beyond your deviation threshold blocks that SKU. Blocked SKUs never reach the payload.
- Kill switch — one flag freezes all outbound writes. It is enforced inside the SP-API client itself, and re-checked between the document upload and feed creation.
- Dry Run / Live gate — pricing sync starts in Dry Run and must be explicitly approved.
What's here
| Area | |
|---|---|
| SP-API client | LWA auth, throttle-aware retry/backoff, and Orders, Finances, Shipping, Catalog Items, Listings, FBA Inventory, Reports, Feeds, Fulfillment Inbound |
| Marketplace SKU mapping | Proxy SKU maps Item + UOM → seller SKU + ASIN, so one item can list in several pack sizes with independent stock and pricing |
| Cost model | A Cost Type tree of absolute, relative, VAT and purchase-cost components. Ships empty — the structure is yours to populate |
| Pricing | price = numerator / (denominator − margin), with per-strategy cost sets and a high-price commission adjustment |
| Strategy selection | FBA → SFP → Backorder → Default, chosen per SKU from live stock and pending restock dates |
| Feed pipeline | JSON_LISTINGS_FEED with PATCH operations, Stock-Only or Stock + Prices publishing modes, and submission logging |
| Safety layer | Push-block validators, price deviation guard with per-SKU audited unblock, dry run |
| Warehouse ops | Walk-route pick sorting, all-or-nothing picking |
| Sourcing | Multi-supplier price and stock with automatic rank-by-price, supplier lead times |
Requirements
Frappe v17 and ERPNext v17.
Installation
cd $PATH_TO_YOUR_BENCH
bench get-app https://github.com/bwhtech/amazon_integration --branch develop
bench --site install-app amazon_integration
Then set your SP-API credentials in Amazon SP API Settings and your outbound controls in Amazon Integration Settings. Nothing publishes until you enable it: pricing sync ships disabled, in Dry Run mode, with publishing mode set to Stock Only.
Tests
bench --site run-tests --app amazon_integration
Tests never call Amazon. The SP-API suite is mocked at the HTTP boundary and verified to make zero outbound calls.
Contributing
This app uses pre-commit for formatting and linting (ruff, eslint, prettier, pyupgrade):
cd apps/amazon_integration
pre-commit install
License
MIT
Not affiliated with, endorsed by, or sponsored by Amazon. "Amazon" and "Amazon Seller Central" are trademarks of Amazon.com, Inc.
Related Integrations apps for Frappe & ERPNext
- Insights — Open Source Business Intelligence Tool
- Raven — Simple, open source team messaging platform
- Frappe Whatsapp — WhatsApp cloud integration for frappe
- Frappe Assistant Core — Infrastructure that connects LLMs to ERPNext. Frappe Assistant Core works with the Model Context Protocol (MCP) to expose ERPNext functionality to any compatible Language Model
- Biometric Attendance Sync Tool — A simple tool for syncing Biometric Attendance data with your ERPNext server
- Frappe React Sdk — React hooks for Frappe
- Frappe Js Sdk — TypeScript/JavaScript library for Frappe REST API
- Mcp — Frappe MCP allows Frappe apps to function as MCP servers