Salesforce to ERPNext migration: object mapping, automation rebuild and a phased cutover
Short answer
Moving from Salesforce to ERPNext means three jobs: moving the data, rebuilding the logic and re-pointing the integrations. Accounts become ERPNext Customers or Frappe CRM Organizations, Opportunities become Opportunities or Deals, Cases become Issues or Frappe Helpdesk tickets, and custom objects become custom DocTypes in a Frappe app you own. Data loads in dependency order through ERPNext’s Data Import tool or the REST API, keeping every Salesforce ID so relationships can be rebuilt and checked. Flows, validation rules and Apex cannot be exported and are rewritten as Frappe configuration and Python. Many CRM-to-ERP integrations simply disappear because both live in one database. Run it in six phases, with at least two trial loads and a parallel run, and finish before your Salesforce renewal notice date.
Who this guide is for
This guide is for IT leads, Salesforce admins and operations managers at companies of roughly 10 to 500 users who have decided, or nearly decided, to move from Salesforce to ERPNext, Frappe CRM or both. It explains which target to pick, how each Salesforce object and automation maps across, and how we run the move in phases. It is based on Salesforce’s and Frappe’s own documentation; where something depends on your org, we say so rather than guess.
If you are still deciding whether to leave, start with the 70 reasons companies leave Salesforce. If you want us to run it, see Salesforce migration services.
ERPNext, Frappe CRM, or both?
| Option | What it is | Pick it when |
|---|---|---|
| ERPNext CRM module | Lead, Opportunity, Customer, Quotation and Sales Order inside a full ERP (GPL-3.0) | Sales hands straight into quoting, orders, stock and invoicing, and you want one system |
| Frappe CRM | A separate modern sales CRM (AGPL-3.0) with lead capture, deals, email, calls and WhatsApp | Sales teams want a focused CRM; you may or may not run ERPNext yet |
| Frappe CRM + ERPNext | Frappe CRM for the pipeline, linked to ERPNext so a deal creates the customer and quotation | You want the best sales UI and one source of truth for orders and finance |
| Frappe Helpdesk (with either) | Open-source ticketing (AGPL-3.0) | You run Service Cloud cases today |
Sources: ERPNext docs: CRM, Frappe CRM product page, Frappe CRM docs: ERPNext integration, Frappe CRM on GitHub (AGPL-3.0) and Frappe Helpdesk on GitHub (AGPL-3.0). All run on the Frappe Framework (MIT), which exposes every record type through a REST API (Frappe Framework docs: REST API).
Object mapping: Salesforce to ERPNext and Frappe CRM
| Salesforce | ERPNext | Frappe CRM | Notes |
|---|---|---|---|
| Account | Customer (and Prospect) | CRM Organization | Keep the Salesforce Account ID in a custom field on every record |
| Contact | Contact, linked to Customer | CRM Contact | Contacts link to several parties in ERPNext through dynamic links |
| Lead | Lead | CRM Lead | Map lead status values one by one; do not import converted leads as open |
| Opportunity | Opportunity | CRM Deal | Recreate stages and probabilities before loading |
| Product, Price Book | Item, Price List, Item Price | Products on the deal | Items carry stock, tax and accounting settings Salesforce never had |
| Quote, Order | Quotation, Sales Order | Quotation created in ERPNext | Usually migrate open documents only; archive the rest |
| Case | Issue (Support module) | Frappe Helpdesk ticket | Email-to-case becomes an incoming email account |
| Campaign | Campaign | Lead source / campaign fields | Marketing history often stays in an archive |
| Task, Event | ToDo, Event | Tasks, notes | Load open tasks; summarise closed activity |
| EmailMessage | Communication | Email timeline | Large volume; decide a cut-off date |
| Files, Attachments | File, attached to the record | File, attached to the record | Load after parent records exist |
| User, Profile, Permission Set | User, Role, Role Profile, User Permission | User and roles | Permissions are redesigned, not copied |
| Custom object | Custom DocType | Custom DocType | Built in a Frappe app under version control |
Load in dependency order: users, items and price lists, organisations or customers, contacts, leads, deals or opportunities, quotes and orders, cases, then activities and files. ERPNext’s Data Import tool loads CSV or Excel one record type at a time and can insert or update (ERPNext docs: Data Import). For large volumes we load through the REST API from scripts so loads are repeatable.
Fields, picklists and relationships
| Salesforce field type | Frappe equivalent |
|---|---|
| Text, number, currency, date | Data, Int / Float, Currency, Date |
| Picklist | Select field (or a Link to a small DocType if values need attributes) |
| Multi-select picklist | Table MultiSelect or a child table |
| Lookup | Link field |
| Master-detail | Child table (if the child has no life of its own) or Link with deletion rules |
| Formula | Fetch-from field, or a value computed in a server-side hook |
| Roll-up summary | Computed on save of the child, or a report |
| Record type | Separate DocType, or a Select field driving form behaviour |
Salesforce stores relationships as 15- or 18-character record IDs. We keep the original ID on each migrated record and resolve every Link field through an old-ID-to-new-name map, so nothing is matched by name alone.
Rebuilding automation and code
| Salesforce | Frappe / ERPNext | How it moves |
|---|---|---|
| Validation rules | Validation in a server-side hook or Server Script | Rewritten and tested |
| Record-triggered flows | Document event hooks, Server Scripts, Notifications, Assignment Rules | Rewritten; many become simple configuration |
| Scheduled flows and scheduled Apex | Scheduled jobs in a Frappe app | Rewritten |
| Approval processes | Workflow (states, transitions, roles) | Rebuilt as configuration |
| Apex triggers and classes | Python in a custom Frappe app, with whitelisted API methods | Rewritten; no export path exists |
| Lightning components and Visualforce | Client scripts, custom pages or a Vue front end | Redesigned |
| Reports and dashboards | Report Builder, query and script reports, dashboards | Rebuilt from a prioritised list |
Apex only runs on Salesforce, so code is always rewritten (Apex Developer Guide: What is Apex?). The upside is that the result is ordinary Python and JavaScript in your own Git repository. Since Salesforce ended support for Workflow Rules and Process Builder on Dec 31, 2025 (Salesforce Help: Workflow Rules and Process Builder end of support), many orgs face an automation rebuild either way.
Integrations
List every system that reads from or writes to Salesforce, how often and in which direction. Then sort them into three groups:
- Disappear: CRM-to-ERP syncs for customers, quotes, orders and invoices, when ERPNext becomes the system for both.
- Reconnect: email, calendar, telephony, forms and marketing tools that have Frappe integrations or can call the REST API.
- Rebuild: custom integrations, re-pointed to the Frappe REST API with token authentication.
Retire the Salesforce side only after the new integration has run in parallel. Our Salesforce API limits guide explains why the first group often pays for much of the project.
Migration phases
| Phase | What happens | Output |
|---|---|---|
| 1. Discover | Inventory objects, record counts, storage, automation, Apex, integrations, reports and users; read contract dates | Scope, risks and a dated plan |
| 2. Design | Choose ERPNext, Frappe CRM or both; design DocTypes, roles and processes; agree what history to migrate and what to archive | Mapping workbook signed off by owners |
| 3. Build | Configure, build the custom Frappe app, rebuild automation and integrations, set up hosting | A working system in a test site |
| 4. Trial loads | Full export, transform and load at least twice; reconcile counts, totals and sample records | Reconciliation reports |
| 5. Parallel run and cutover | Users work in the new system; freeze Salesforce writes, load the final delta, switch integrations | Go-live with a rollback point |
| 6. Hypercare | Fix issues, train, and keep a verified Salesforce export archived | Stable system and a closed Salesforce org |
How long this takes depends on data volume, the number of custom objects, the amount of Apex and the integrations. We give a dated plan after discovery rather than a generic estimate. Finish before your renewal notice date; see Salesforce renewal terms.
Risks and how to handle them
| Risk | How we handle it |
|---|---|
| Missing data or broken relationships | Keep Salesforce IDs, reconcile counts and totals per object after every load |
| Users rejecting the new system | Involve sales and operations in design, run a pilot team, train during build |
| Logic nobody documented | Read every flow, rule and trigger in discovery; agree with owners what to keep |
| Running out of time before renewal | Work back from the notice date; keep a fallback of renewing a smaller scope |
| Files and history volume | Agree a cut-off; archive the rest in a searchable store |
| Hosting and upgrades with no owner | Agree who owns hosting, backups and upgrades: you, Frappe Cloud or a partner |
Planning a move off Salesforce? See our Salesforce migration services for how we move teams to ERPNext and Frappe CRM with code ownership, or read the 70 reasons companies leave Salesforce.
Frequently asked questions
Can ERPNext replace Salesforce?
For many small and mid-sized companies, yes, especially those that also need quoting, orders, stock and accounting. Very large sales organisations that depend on Salesforce’s AppExchange depth or advanced revenue tools should test carefully first.
Should I use ERPNext CRM or Frappe CRM?
Use the ERPNext CRM module if sales hands straight into ERP processes and you want one system. Use Frappe CRM if sales wants a focused, modern CRM; it links to ERPNext to create customers and quotations from deals.
Can I export Apex code and flows to ERPNext?
No. Apex and flows only run on Salesforce. They are rewritten as Frappe configuration, server-side hooks and Python in a custom app.
How do I keep relationships between records?
Keep each record’s Salesforce ID in a custom field and resolve every lookup through an old-ID-to-new-record map during loading. Reconcile counts and totals after each load.
How long does a Salesforce to ERPNext migration take?
It depends on data volume, custom objects, Apex and integrations. We give a dated plan after a discovery of your org rather than a generic estimate.
Do we lose our data history?
Not if you plan it. Migrate open and recent records, and archive the full Salesforce export in a searchable store before the subscription ends.