Sales Channels

Sales channels are VARIO ERP's way of representing connections to external selling platforms. When your app integrates with a shop or marketplace, it registers itself as a sales channel backend and creates one or more sales channels to represent individual platform connections.

Sales Channel Backend vs. Sales Channel

These two concepts work together but serve different purposes:

Sales Channel Backend β€” Represents your app as a sales channel provider. There is exactly one backend per app. It tells VARIO ERP that your app can manage sales channels of a certain type (e.g., ECOMMERCE).

Sales Channel β€” Represents a specific connection to a platform instance. A single app can manage multiple sales channels. For example, a Shopify app might have one sales channel for the German store and another for the US store.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Sales Channel Backend      β”‚
β”‚   "My Shop Platform"         β”‚
β”‚   Type: APP                  β”‚
β”‚                              β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚   β”‚ Sales Channel 1    β”‚     β”‚
β”‚   β”‚ "DE Store"         β”‚     β”‚
β”‚   β”‚ Type: ECOMMERCE    β”‚     β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚                              β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚   β”‚ Sales Channel 2    β”‚     β”‚
β”‚   β”‚ "US Store"         β”‚     β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Creating Sales Channels During Installation

Sales channel setup is part of your app's installation migration. Use the Migrator utility to create the backend and channels:

circle-info

setMigration ensures this code runs only once. If the app is reinstalled, the sales channel backend won't be recreated β€” the migration system tracks which migrations have already been executed.

Channel Types

The validChannelTypes parameter defines what types of channels your backend supports. The most common type for shop integrations is ECOMMERCE. You can support multiple types if your platform serves different use cases.

Querying Sales Channels

After installation, you can query your app's sales channels using the Migrator:

Sales Channel Lifecycle

Sales channels follow a lifecycle managed through webhooks:

  1. Created β€” When a user creates a new sales channel for your app in the VARIO ERP UI, a sales_channel.create webhook fires. Use this to initialize channel-specific resources (register per-channel webhooks, set up default configuration).

  2. Active β€” The channel is operational and data synchronization is running.

  3. Deleted β€” When a user removes a sales channel, a sales_channel.delete webhook fires. Use this to clean up channel-specific resources.

Handling Channel Creation

Register a webhook to react when new channels are created:

Sales Channels and Data Scoping

Sales channels scope your data operations. When you query articles, stock, or prices, you can filter by sales channel to get only the data relevant to a specific platform connection. This is essential when your app manages multiple stores or marketplaces.

For details on how to query channel-specific data, see VQL Queries.

Last updated

Was this helpful?