For the complete documentation index, see llms.txt. This page is also available as Markdown.

Getting Started

This page highlights the shop-specific directories and files in a VARIO Cloud app. For the general app structure, see the VARIO App Framework and VARIO App Demo.

Shop-Specific Layout

my-shop-app/
β”œβ”€β”€ api/
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ article.js                # Article lookup endpoints
β”‚   β”‚   β”œβ”€β”€ webhooks.js               # ERP webhook handlers
β”‚   β”‚   └── cronWebhooks.js           # Cron/scheduled webhook handlers
β”‚   └── services/
β”‚       β”œβ”€β”€ inbound/
β”‚       β”‚   β”œβ”€β”€ order/                # Order import (fetch β†’ transform β†’ import)
β”‚       β”‚   β”‚   β”œβ”€β”€ index.js
β”‚       β”‚   β”‚   β”œβ”€β”€ fetch.js
β”‚       β”‚   β”‚   β”œβ”€β”€ transform.js
β”‚       β”‚   β”‚   └── import.js
β”‚       β”‚   β”œβ”€β”€ product/              # Product import (optional)
β”‚       β”‚   └── multiPartImporter.js
β”‚       β”œβ”€β”€ outbound/
β”‚       β”‚   β”œβ”€β”€ article/              # Product sync (fetch β†’ transform β†’ import)
β”‚       β”‚   β”‚   β”œβ”€β”€ index.js
β”‚       β”‚   β”‚   β”œβ”€β”€ fetch.js
β”‚       β”‚   β”‚   β”œβ”€β”€ transform.js
β”‚       β”‚   β”‚   └── import.js
β”‚       β”‚   β”œβ”€β”€ article-stock/        # Stock sync
β”‚       β”‚   β”œβ”€β”€ article-price/        # Price sync
β”‚       β”‚   β”œβ”€β”€ article-media/        # Image sync
β”‚       β”‚   β”œβ”€β”€ order-status/         # Order status sync
β”‚       β”‚   └── outbound.js           # Queue processor
β”‚       β”œβ”€β”€ maintenance/
β”‚       β”‚   β”œβ”€β”€ install/
β”‚       β”‚   β”‚   └── migrations/
β”‚       β”‚   β”‚       └── 1/
β”‚       β”‚   β”‚           β”œβ”€β”€ index.js            # Migration logic
β”‚       β”‚   β”‚           └── static/
β”‚       β”‚   β”‚               └── erp/
β”‚       β”‚   β”‚                   └── eav-groups/  # EAV group JSON files
β”‚       β”‚   β”œβ”€β”€ queue.js              # Queue read/write helpers
β”‚       β”‚   β”œβ”€β”€ salesChannelParameter.js  # Per-channel config helpers
β”‚       β”‚   └── context.js            # setSalesChannel helper
β”‚       └── platform/                 # Platform API client
β”‚           └── client.js
β”œβ”€β”€ ui/                               # Frontend (channel config UI)
└── manifest.json

Key Conventions

Inbound services follow a fetch β†’ transform β†’ import pattern:

  • index.js β€” orchestrates the flow and creates the MultiPart Import

  • fetch.js β€” retrieves data from the external platform API

  • transform.js β€” maps platform data to the VARIO import format

  • import.js β€” sends the transformed data to the ERP via MultiPart Import

Outbound services follow a fetch β†’ transform β†’ import pattern:

  • index.js β€” orchestrates the flow

  • fetch.js β€” retrieves article/stock/price data from the ERP via VQL

  • transform.js β€” maps ERP data to the platform's API format

  • import.js β€” sends the transformed data to the platform API

Migrations in maintenance/install/migrations/<version>/ run during app installation. They set up sales channels, EAV groups, webhooks, and default parameters. See Core Concepts.

EAV group definitions are stored as JSON files under static/erp/eav-groups/ and loaded by the migration script.

Last updated

Was this helpful?