Multipart Import

The MultiPart Import API is VARIO ERP's mechanism for importing structured data in bulk. Shop integrations use it primarily for importing orders, but it can also handle products, customers, and other entities.

How It Works

MultiPart Import uses a two-step process:

  1. Import Preset β€” A predefined configuration that tells the ERP how to map incoming data fields to entity fields. You create this during installation.

  2. Import Run β€” An API call that submits data against a preset for processing.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Your App     │────►│ MultiPart    │────►│ VARIO ERP    β”‚
β”‚ sends data   β”‚     β”‚ Import API   β”‚     β”‚ creates      β”‚
β”‚ + preset ID  β”‚     β”‚ validates &  β”‚     β”‚ entities     β”‚
β”‚              β”‚     β”‚ maps fields  β”‚     β”‚              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Creating Import Presets

Create import presets during your app's installation migration:

const { Migrator } = require('@vario-software/vario-app-framework-backend/utils/migrator');

const migrator = new Migrator('install');

await migrator.setMigration('create-import-presets', async (methods) =>
{
  // Order import preset
  await methods.createMultipartImportPreset({
    name: 'My Shop Order Import',
    entity: 'account-order'
    // ... additional configuration
  });
});

Updating Import Presets

If your import format changes (e.g., new fields added in a later version), update the preset:

Running an Import

Submit data to the import API:

Import Data Format

The data you submit must match the field mapping defined in your import preset. The general structure is an array of objects, where each object represents one entity to import:

circle-exclamation

Handling Import Results

The import API returns information about the import run, including success/failure status and any validation errors:

Batch Processing

For large imports, split your data into batches to avoid timeouts and memory issues:

Common Entity Types

Entity
Description

account-order

Customer orders (sales orders)

product

Products/articles

Last updated

Was this helpful?