Import & Export
Bulk-load and extract records with CSV/Excel handlers. This guide follows version 3.1.7 (03acdf712c).
For field definitions, see Properties, Tags & Segments.
Module layout
backend/core-api/src/modules/import-export/:
graphql/schema/{import,export,common}.ts, resolvers,db/models/{Imports,Exports}.ts,trpc/{import,export,templates,index}.ts,workers/,utils/,routes.ts.- Shared worker interface:
backend/erxes-api-shared/src/core-modules/import-export/(index.ts,worker.ts).
Each run stores contentType, config, status, and history. Per-entity column handling lives in each module's meta/import-export/ directory, so contacts, products, and plugin entities can define their own headers and validators.
Running a job
- Download the template for the target content type (
trpc/templatesor the UI export dialog). - Fill required columns (for products,
codeandcategoryId; for contacts, the configured search fields) and keep custom-field codes exact. - Start the import, then poll the
Importsrecord forstatusandhistoryerrors. - For exports, use
getExportHeaders/getExportDatahandlers or the UI action, then download from the generated file link.
Large jobs run through the import-export worker started via startImportExportWorker({ pluginName, config, app }) in each service's meta. Do not edit the stored file mid-run.
Verify
- Import a 5-row sample and confirm all rows and error rows are reported.
- Export the same filter and diff the round-tripped columns.
- Confirm tenant isolation: imports in one subdomain never affect another.
Source references
Was this helpful?