Contentserv Documentation
BMEcat Designer
Introduction
This module provides standard-compliant imports and exports of BMEcat 1.2 and BMEcat 2005 files.
It builds on top of the ETIM classifications offered as a Cloud Stream. Those classifications include ETIM 7.0 and ETIM 8.0.
The BMEcat Designer module replaces the functionality of the (old) BS Data Designer.
Installation & Setup
Install the ETIM Classification via Cloud Stream
First, install the Cloud Stream with the respective ETIM classification. The Cloud Stream contains the Contentserv classes, attributes, value lists, and data quality rules of the classification.
To reduce the size of the cloud streams, there are separate cloud streams for different sections. This way, you can only install the sections that are needed.
An overview of the classifications is available here: https://contentserv.atlassian.net/wiki/spaces/BSO/pages/3518201860
Install the BMEcat Designer module for your Cloud Tenant
You can install the module via the Cloud Console.
Check out the module from SVN
Trunk: https://svn.contentserv.com/development/bs/trunk/BSLive/modules/bmecat/
CS21: https://svn.contentserv.com/development/bs/CS21/BSLive/modules/bmecat/
Supported Standards
ETIM 8.0 and ETIM 7.0
Cloud Streams are available for ETIM 7.0 and ETIM 8.0 classification standards. If you don’t want to install the entire classification, we also provide Cloud Streams for individual sections.
The Cloud Streams contain the Contentserv classes, attributes, value lists, and data quality representing the ETIM classification.
The classification primarily comes in English.
Value list values are also translated into German.
Attribute- and class labels primarily have the form “Feature name | Feature id”. An English and a German dictionary are available to translate the labels into “Feature name” (without Feature id).
Please refer to [link to documentation will be added here when available] and https://contentserv.atlassian.net/wiki/spaces/BSO/pages/3518201860 for complete information on the ETIM classifications.
When project dictionaries are received via Cloud Stream, they are merged into the existing project dictionaries, as is described here: https://contentserv.atlassian.net/wiki/spaces/DOCU/pages/3781165101
BMEcat 2005 and BMEcat 1.2
Import and export are supported both for BMEcat 2005 and BMEcat 1.2.
BMEcat Import
Import Overview
The BMEcat import is implemented as an Active Script (“BMEcat Import“).
Products are imported from a BMEcat file in the Contentserv MAM.
The BMEcat version is read automatically from the file.
The classification is read from the file and you can select which classification you want to import.
You can configure three different modes:
Updating existing products in the Contentserv PIM
Creating a new catalog: New Contentserv products will be created in a selected folder. They can be imported in a flat structure or optionally, the hierarchy defined in the BMEcat file can be built.
Creating new products and updating existing products
The configuration of the first section of the import script looks like this:
Adding classification to existing products
Let’s assume that products in Contentserv already exist. They have a classification different from the ETIM classification (classes and attributes in Contentserv).
You import in update mode if you want to add the ETIM classification to existing products.
You can choose if the label of the products should also be updated or if the old name should be kept.
Standard field mapping and identifying existing products
For the standard fields of the BMEcat catalog, a mapping to Contentserv attributes can be configured.
This mapping can define how to find the products in Contentserv that correspond to products from the BMEcat file. Just select one or multiple features of the BMEcat standard fields (e.g., the EAN number) and configure which fields in Contentserv they must match:
Setting a filter on which products should be updated.
A filter can be used to update only products in a specific root folder or with specific workflow states:
Enabling the ETIM classification
You have to select Import Products and Import Classification Values to import an ETIM classification (note that classes are assigned at the product level):
The ETIM Class are assigned to the product
The feature values from the BMEcat file are set
This is what the import might look like when the script is started:
Creating new products
To create new products from the BMEcat file, use the mode Create new products.
You must select a folder into which the products are imported.
The rest of the configuration works just like the configuration for updating existing products.
Creating the tree structure for new products
With the current implementation, the structure for the whole BMEcat file can be imported. Importing only the structure for a limited set of products is not supported (yet).
Mapping standard fields
Because the standard fields in a BMEcat catalog don’t correspond to any fields in the ETIM standard, a different mapping is required:
Among the standard fields, the supplier id and the short description play a unique role:
The supplier id is used to identify products, for example, when a catalog contains relations between products.
The short description, by default, is used as the label for new products.
Importing Media Files
If the BMEcat catalog comes with images, the images must be placed in a MAM folder. Select the Import Media option and select that folder in the configuration. The images will then be linked to the products of the catalog.
Importing User-Defined Features (UDFs)
When a catalog contains UDFs, those feature systems can be activated individually. Their fields have to be mapped to Contentserv attributes.
Importing References
A mapping is required to set the attributes that can store the references from the catalog.
The attribute mapped to the supplier in the standard field mapping identifies referenced products.
BMEcat Export
Export Overview
The BMEcat Export works as an Active Script.
In the basic configuration, you select the exported BMEcat version. A BMEcat 2005 export can include multiple languages (while BMEcat 1.2 has only one language).
The actual product data written to the catalog uses the ETIM classifications from the Cloud Stream. This means that for most data a mapping from Contentserv attributes to ETIM features (and how they are added to the catalog) is not required.
The generated BMEcat file can be stored in a MAM folder.
After the basic configuration, individual sections of the BMEcat must be configured. We’ll go through them one by one.
Header
This information goes to the HEADER tag of the catalog. General information about the exported data must be provided here. Much information here can be entered directly, and a mapping to the PIM is not required.
Article Selection
Here you select which products (or channel items) are exported. Items can be selected by picking multiple folders or via a Favorit.
Article | Details
This section contains BMEcat standard fields. Because those fields are not part of the ETIM specification, a separate mapping to Contentserv attributes that hold this information of the article can be provided.
Article | Features Classification
You can select the ETIM version that’s used for the export here. This must correspond to an ETIM classification that’s installed via Cloud Stream, and that’s used with the exported products.
You can choose if ETIM features that belong to a class but are not maintained in the PIM are ignored or if they are exported with a specific value. A standard convention here is to export those values with a “-“ (Minus) to indicate that a feature does belong to a feature group but does not have a value for a specific product.
Article | References
To include reference articles with the BMEcat, the PIM attributes that hold those references must be selected.
ETIM-specific UDX features
UDX features for ETIM can be activated at the beginning of the script. They span multiple sections, and a separate mapping to a PIM attribute for each feature is required.
Other Sections
Other sections in the configuration - like Price Details, Logistic Details, Hierarchy Options, etc. - can be configured similarly (activating functions with a checkbox and providing some information directly and other information via a mapping to a Contentserv attribute).
Plugin Interface
In some instances, providing a simple mapping from a Contentserv field to an ETIM feature is not enough. Usually, that’s the case when some logical steps are required to find a piece of information. For example, the relevant prices might be in a PIM table instead of a simple price attribute for Price Details. In those cases, it is possible to implement a custom plugin that overwrites the default behavior for individual features.
The following is a sample plugin that adds a configuration field and overwrites the default price information. You must place the plugin in plugins/bmecatexport/
<?php
class SampleBmecatExporter extends CSBmecatExporterPlugin
{
/**
* {@inheritdoc}
*/
public function getPluginName()
{
return 'Sample BMECat Export Plugin';
}
/**
* {@inheritdoc}
*/
public function prepareEditorForArticlePriceDetails(CSGuiEditor $oEditor, int $iActiveScriptRecordID): void
{
$this->_oActiveScriptRecord = CS::getRecord('ActiveScript', $iActiveScriptRecordID);
$aAdditionalOptions['SectionTitle'] = '9|' . CS::translate('Article | Price Details');
$aPriceTypes = CSBmecat::getArticlePriceTypes(CSBmecat::BMECAT_VERSION_2005, CSBmecat::BMECAT_SPECIFICATION_ETIM);
$oEditor->addField(
'SamplePriceTypes',
CS::translate('Price Types'),
$aPriceTypes,
'',
false,
array_merge(
$aAdditionalOptions,
array('multiple' => false, 'noEmptyOption' => true, 'onChange' => 'saveWithoutClose();')
)
);
$aPriceDetails = CSBmecat::getArticlePriceDetailsFields(CSBmecat::BMECAT_VERSION_2005, CSBmecat::BMECAT_SPECIFICATION_ETIM);
foreach ($aPriceDetails as $sField => $aDetails) {
$oEditor->addField(
'Sample_' . $sField,
CS::translate($sField),
'caption',
'',
false,
$aAdditionalOptions
);
}
}
/**
* {@inheritdoc}
*/
public function addBMEcatArticlePriceDetails(
SimpleXMLElement $oArticle,
CSPmsProduct $oProduct,
int $iActiveScriptRecordID
): void
{
$this->_oActiveScriptRecord = CS::getRecord('ActiveScript', $iActiveScriptRecordID);
$details = $oArticle->addChild('ARTICLE_PRICE_DETAILS');
$price = $details->addChild('ARTICLE_PRICE');
$price['price_type'] = $this->_oActiveScriptRecord->getValue('SamplePriceTypes');
$aPriceDetails = CSBmecat::getArticlePriceDetailsFields(CSBmecat::BMECAT_VERSION_2005, CSBmecat::BMECAT_SPECIFICATION_ETIM);
foreach ($aPriceDetails as $sField => $aDetails) {
$price->addChild($sField, $this->_oActiveScriptRecord->getValue('Sample_' .$sField));
}
}
}
The Plugin can then be selected and activated for individual sections:
Similarly, you can overwrite other sections (e.g. Logistic Details or ETIM UDX Features) with a plugin.
For more specific questions on customizing a BMEcat export, please get in contact via our support, and we’ll be happy to help.
Links and Resources
Contentserv Classifications available via Cloud Stream: https://contentserv.atlassian.net/wiki/spaces/BSO/pages/3518201860
All Rights Reserved 2023