Architecture patterns
Connect your systems without the tangle, and know when not to.ERP integration patterns
Patterns for connecting an ERP, a store, a bank and the rest. Each says when to use it, when not to, and how it breaks.
6 patterns. Each names its sources, with the date we read them.
Count the wires
Add systems and watch the links grow.
- 1ERP
- 2Store
- 3Gateway
- 4Bank
- 5WhatsApp
- 6Courier
Counted, not measured. Not every pair needs a link: the explorer lets you count yours.
Start from what is going wrong.
Every new tool means another link to build
Point-to-point vs a hub
We check an API every minute and mostly find nothing
Webhooks vs polling
The same payment was booked twice
Idempotent webhooks
The order saved, but nobody was told
Transactional outbox
A sale on one channel sold the last unit on another
Eventual consistency in stock
The books and the bank disagree at month‑end
Reconciliation as a job
Next: cutover strategies. Need one sooner?
Every pattern is built the same way.
Seven parts in the same order on every page, each read against its sources on a date.
- The problemWhat goes wrong, in plain words, before any solution.
- Use it whenThe conditions where it pays.
- Skip it whenThe size or case where it does not. Every pattern has one.
- Try itA model you can move, with sample data.
- What you give upThe trade-offs, and how it fails, each with its source.
- In ERPNext, Frappe and MedusaThe exact doctype, field, setting or file, at a named version. Medusa where a pattern uses it.
- RelatedThe glossary term, the post and the guide chapter behind it.
- Sources
- The maker's own docs or code, named by version or date.
- Failure modes
- Documented behaviour. None is a MithTech client result.
- Versions
- Frappe and ERPNext at a named release or branch. Medusa at v2.21.2, with one history row at v1.20.11.
- Reviewed
- Each page shows the date it was last read against its sources.
- For machines
- /patterns.json
Questions about the patterns
The one most people ask is answered first. Type to find the rest.