Channels in ECommerce API

If you just want to use the ECommerce API for supplying data to a single shop, you will be OK with a single channel, like the “My Channel” we invented back in chapter Your first mappings.

If you need to supply data to two different shops you almost certainly need to create a new channel for the new shop. The only exception is if the two shops need (or can live with) getting the exact same data out of Perfion (same products, same categories, same mappings, same everything).

If this is not the case, you need two channels. A channel is simply a way of separating multiple configurations in EC.

To create a channel is easy. Simply go to Feature Data for ECommerceChannel and add the extra channel. This is done with “My other channel” in Figure 1.

 

Figure 1: Another channel named “My Other Channel” has been created

We will get back to what the * (or *-channel) is about.

With this new channel in place, you can now start doing mappings for that channel. Figure 2 below shows four mappings defined for “My Channel” and four other mappings defined for “My Other Channel”.

Figure 2: Two channels both having 4 mappings for the Product-entity

This is basically it! You have now two channels, both have defined mappings for Products and you can now start requesting data from the EC API.

What often happens, is that despite you have two channels that differ, many of the mappings might as well have been shared. Mappings shared across all channels can be marked with the *-mapping making them exist on all channels.

Of the eight mappings in Figure 2 the six are actually the same and can be merged. Only the two mapping of RRP to RetailPrice and UnitPrice, respectively, differs.

Using that, we can make an equivalent configuration using the *-mapping like the one shown in Figure 3.

We saved three mappings (rather it is three lines) in there, and though this may not sound of much, having many mappings in many channels this can be of great benefit.