Your First Shop App

This tutorial walks you through building a minimal shop integration that creates a sales channel, registers a webhook for article updates, and logs incoming product changes. By the end, you will have a working foundation to build upon.

Step 1: Set Up the Project

Start by cloning the demo app and installing dependencies:

git clone https://github.com/vario-software/vario-app-demo.git my-shop-app
cd my-shop-app
npm install

Add your app credentials to app-client.json:

{
  "appIdentifier": "your-app-identifier",
  "clientId": "your-client-id",
  "clientSecret": "your-client-secret",
  "appJWK": { "...your JWK..." }
}

Step 2: Update the App Manifest

Edit app-manifest.json to declare the permissions your shop app needs:

{
  "appVersion": "1.0.0",
  "label": "My Shop Integration",
  "description": "Connects My Shop Platform with VARIO ERP",
  "shortName": "my-shop",
  "rootUrl": "https://your-app-domain.com/",
  "pcInstallationUrl": "https://your-app-domain.com/ui/install.html",
  "pcInstallationDeletionUrl": "https://your-app-domain.com/ui/uninstall.html",
  "pcManifestUrl": "https://your-app-domain.com/manifest",
  "requirements": {
    "permissions": [
      { "resource": "article", "verb": "read" },
      { "resource": "sales-channel", "verb": "create" },
      { "resource": "sales-channel", "verb": "read" },
      { "resource": "eav", "verb": "create" },
      { "resource": "eav", "verb": "read" },
      { "resource": "eav", "verb": "update" }
    ]
  },
  "uiIntegrations": {
    "integrations": [
      {
        "id": "navigation",
        "pointOfIntegration": "navigation.root",
        "url": "/ui/index.html",
        "iconClass": "fas fa-store",
        "msgKey": "My Shop"
      }
    ]
  }
}

Step 3: Set Up the Installation Migration

Create a migration that sets up a sales channel backend and registers a webhook for article updates.

Create the file backend/services/maintenance/migrations/1/index.js:

Step 4: Update the Installation Orchestrator

Edit backend/services/maintenance/install/install.js to call your migration:

Step 5: Add the Webhook Handler

Create backend/routes/webhooks.js to handle incoming article updates:

Step 6: Wire Everything Together

Update backend/index.js to register all routes:

Step 7: Test It

  1. Start your app locally (see Local Development for tunneling setup)

  2. Register your app in the VARIO Cloud Admin Center

  3. Install the app — this triggers the installation flow and runs your migrations

  4. Edit an article in VARIO ERP — the webhook fires and your handler logs the update

Check your console output. You should see log messages like:

Last updated

Was this helpful?