WS-DataFlowManager (EN)

WS-DataFlowManager (EN)

Product data export

Activation and name of the template

The export of product data using a template is activated by copying the corresponding template file into the output directory of the export file. The name of this file is fixed and is "export-template.txt".

As soon as umlauts are used in the export-template.txt as column headings or in the fixed output fields, the coding of the template must be Unicode or Ansii.

Furthermore, a file with the name "lastexport.ini" is also created in this directory. This file contains the time stamp and a consecutive number of the last export. This data is needed for a possible image transfer, as well as for the creation of a version number for the file, which is required for some file formats.

Supported tags

"EXP-" tags

Tags with the "EXP-" prefix refer to shop-wide data that is not contained in the shop.config or other "normal" configuration files.

Tag

Description

Tag

Description

~EXP-ShopId~

The ID of the shop

~EXP-Counter~

A counter that is incremented on each export.

"WSINI-" tags

Tags with the prefix "WSINI-" are used to insert parameters from shop.config into the export file. The tags are formed according to the scheme ~WSINI-(section,parameter)~.

Example:
~WSINI-(Currency-Txt,Name)~ inserts the currency of the subshop

"PR-" tags

Tags with prefix "PR-" are used to insert (unchanged) product data.

Generally, tags are formed from the prefix + the technical field names, it can be used to insert any standard fields and free fields (provided that the format in which the data is stored internally is suitable for export).

Example:
~PR-Descr~ inserts the product description

For PR tags formed from technical field names, additional options can be specified. This allows the field content to be modified again before output. In doing so, the individual statements are given as attributes to the tag. The options can also be used with the section tags.

The following options are possible:

Attribute

Description

Example

Attribute

Description

Example

maxlength

The content will be shortened to the specified maximum length if the content is longer.

Shorten the description to a maximum of 100 characters:

~PR-Descr(maxlength:100)~
or
~PR-Descr(100)~

search / replace

In the content, all strings matching "search" are replaced with the content specified in "replace". The found positions are removed from the content if "replace" is empty / not specified.

Important: Spaces are also taken into account!

To replace commas, %%comma%% must be specified as a placeholder instead of the character.

Replace all places in the description where "net" is written with "gross":

~PR-Descr(search:net,replace:gross)~

Remove the word "hello" from the description:

~PR-Descr(search:hello,replace:)~

trimend

Removes all specified characters at the end of the content.

Important: Spaces are also taken into account!

Shorten the end of the description by all '\', ' ' and '$'

~PR-Descr(trimend:\ $)~

toupper

Prints the whole content in capital letters.

~PR-Descr(toupper)~

tolower

Outputs the entire content in lowercase.

~PR-Descr(tolower)~

compare

Compares the entire content with the specified text.

{PR-New(compare:yes)}1{/PR-New(compare:yes)}

Several attributes can also be combined. For this, there must be a comma between the attributes.

Example:
~PR-Descr(maxlength:100,trimend:\ ,toupper)~

In addition to the PR tags formed from technical field names, there are also the following special tags:

Tag

Description

Tag

Description

{@PR-Articles}

Loop over all product data

{@PR-SearchItems}

Loop for the search items. To determine the individual terms, the searchitems field is split into individual words. All characters that are not letters or numbers are used as separators here.

{PR-DepVariations}

Parenthesis that is displayed when the "Export dependent variations (as standalone products)" option is enabled and a product has dependent variations.

{@PR-DepVariations}

Loop for names and values of dependent variations. Within the loop the tags ~PR-DepVariationName~, ~PR-DepVariationValue~, ~PR-DepVariationIdx~ and {last} can be used

The entire loop should also be parenthesized with {PR-DepVariations}...{/PR-DepVariations}, since the loop tags are not replaced if a product has no variants.

This loop is only useful if the "Export dependent variations (as standalone products)" option is enabled.

{PR-DepVarProducts}

Bracketing is shown if the loop contains {@PR-DepVarProducts} entries, i.e. a product has dependent variations and the "Export dependent variations (as standalone products)" option is not enabled.

{@PR-DepVarProducts}

In this loop the product data of dependent variations can be inserted

Example:

{@PR-DepVarProducts} <Name>~PR-Name~</Name> {/@PR-DepVarProducts}

Within the loop all "simple" product data tags can be used, i.e. no tags that require conversions, need loops, etc.

The loop can be inserted multiple times, e.g. if a list of product numbers is to be generated first and then a list of product names.

This loop is useful only if the "Export dependent variations (as standalone products)" option is not enabled.

{PR-DistinctDepVarField}

Bracketing is shown if the loop contains {@PR-DistinctDepVarField} entries, i.e. a product has dependent variations and the "Export dependent variations (as standalone products)" option is not enabled.

{@PR-DistinctDepVarField(...)}

This loop allows to output the different values for a single product attribute, whose name must be specified as a parameter.

Example:
A product has three dependent variants where the free field "Color" is filled. For two variants this field has the value "red", for one the value "green".

The loop

{@PR-DistinctDepVarField(Farbe)} ~PR-Farbe~ {/@PR-DistinctDepVarField(Farbe)}

would now be replaced by the values
red
green.

This loop is only useful if the option "Export dependent variations (as standalone products)" is not enabled.

{PR-DepVarNames}

Bracketing that is shown if the loop would contain {@PR-DepVarNames} entries, i.e. a product has dependent variations and the "Export dependent variations (as standalone products)" option is not enabled.

{@PR-DepVarNames}/
{@PR-DepVarValues}

These two loops are for inserting the names and values of the dependent variations for a product.
Inside the loop the tags ~PR-DepVariationName~ (name of the variation) and ~PR-DepVariationValue~ (value of the variation) can be used.

These loops can be used only if the "Export dependent variations (as standalone products)" option is not enabled.

Example:

{@PR-DepVarNames} ~PR-DepVariationName~ {@PR-DepVarValues} ~PR-DepVariationValue~ {/@PR-DepVarValues} {/@PR-DepVarNames}

Result for a product with variations "color and size" with values "red" and "green" or "L" and "XL":
color
red
green
size
L
XL

{PR-DepVarField}

Bracketing for {@PR-DepVarField(...)} Loops

{@PR-DepVarField(...)}

Loop that can be used to insert variant values in a nested manner.

This loop can only be used if the "Export dependent variations (as standalone products)" option is not enabled.

Example:

{PR-DepVarField} {@PR-DepVarField(Farbe)} ~PR-DepVariationValue(Farbe)~ {@PR-DepVarField(Größe)} ~PR-DepVariationValue(Größe)~ price: ~PR-Price~ {/@PR-DepVarField(Größe)} {/@PR-DepVarField(Farbe)} {/PR-DepVarField}

Result for a product with the variants "color and size" with the values "red" and "green" or "L" and "XL":
red
L
price: 10,000
XL
price: 15,000
green
L
price: 10,000
XL
price: 15,000

{LastDepVarField}

Bracketing that appears when the last entry in the current variant value list is reached in the {@PR-DepVarField} loop.

{PR-DepVarAttribute1...N}
~PR-DepVarAttribute1...N~

Bracketing whether the product has the Nth attribute.
The parenthesis can be nested.

Important: The outermost parenthesis must always be {PR-DepVarAttribute1}. Within the section, the attribute name can be output by the single tag.

Example:

// Verarbeitung wenn Produkt mind. 1 Attribut besitzt {PR-DepVarAttribute1} // Schleife über alle Werte des ersten Attributs {@PR-DepVarValues1} // Ausgabe des zweiten Attributs bei mind. 2 Attribute {PR-DepVarAttribute2} // Schleife über alle Werte des zweiten Attributs {@PR-DepVarValues2} ~PR-DepVarAttribute1~: ~PR-DepVarValue1~ / ~PR-DepVarAttribute2~: ~PR-DepVarValue2~ / Preis: ~PR-Price~ {/@PR-DepVarValues2} {/PR-DepVarAttribute2} // Alternative Ausgabe, wenn Produkt nur ein Attribut besitzt {!PR-DepVarAttribute2} ~PR-DepVarAttribute1~: ~PR-DepVarValue1~ / Preis: ~PR-Price~ {/!PR-DepVarAttribute2} {/@PR-DepVarValues1} {/PR-DepVarAttribute1}

Result for a product with the variants "color and size" with the values "red" and "green" resp. "L" and "XL":
Color: red / Size: L / Price: 10,000
Color: red / Size: XL / Price: 11,000
Color: green / Size: L / Price: 10,000
Color: green / Size: XL / Price: 11,000

Result for a product with the variant "color" with the values "red", "green" and "blue":
Color: red / Price: 10,000
Color: green / Price: 10,000
Color: blue / Price: 10,000

This bracketing can be used only if the "Export dependent variations (as standalone products)" option is not enabled.

{@PR-DepVarValues1...N}

Loop over all active values of the Nth attribute.

Loops over the values of the last attribute; this can be used to output the variant data.

The loop can only be used within {PR-DepVarAttribute1...N}.

{LastDepVarValue}
{!LastDepVarValue}

Check if the last value within {@PR-DepVarValues1...N} has been reached

~PR-DepVarValue1...N~

Output the value from the Nth attribute.

Must be used within {@PR-DepVarValues1...N}

{@PR-C-Links}
{@PR-C-Links2}
{@PR-C-Links3}
{@PR-C-Links4}
{@PR-C-Links5}

Loop for cross-links (accessory products/XLinks).
Within the loop the tags ~PR-Number~, ~PR-ProdIndex~ and {last} can be used.

{@PR-CS-Links}

Loop for crossselling-links.
Within the loop the tags ~PR-Number~, ~PR-ProdIndex~ and {last} can be used.

{@PR-BulkPrices}

The loop with the bulk prices. Inside the loop the tags ~PR-BulkAmount~, ~PR-BulkPrice~, ~PR-BulkPriceNet~, ~PR-BulkPriceGross~ and {last} can be used

~PR-SearchItem~

Search item within the {@PR-SearchItems} loop

~PR-BulkAmount~

Quantity within the {@PR-BulkPrices} loop

~PR-BulkPrice~

Price inside the {@PR-BulkPrices} loop

~PR-BulkPriceNet~

Net price calculated from ~PR-BulkPrice~ inside {@PR-BulkPrices} loop

~PR-BulkPriceGross~

The gross price calculated from ~PR-BulkPrice~ within the {@PR-BulkPrices} loop

~PR-PriceNet~

The net price calculated from ~PR-Price~

~PR-PriceGross~

The gross price calculated from ~PR-Price~

~PR-PriceWithBasketDiscounts~

Determines the price including discount from the discount.dat file and the OrderDiscount data from the shop.config. For discounts of type 1 (quantity-based), a quantity of 1 is implicitly used.

~PR-DepVariationName~

Variation name within the {@PR-DepVariations} loop

~PR-DepVariationValue~

Variation value within the {@PR-DepVariations} loop

~PR-DepVariationIdx~

Consecutive number of the variation within the {@PR-DepVariations} loop

~PR-DeliveryText~

The delivery status text, determined from the inventory at the time of the export

~PR-DeepLink~

The link to call the product

~PR-DeepLinkPath

The path part of the link to call the product

~ENCXML-PR-DeepLink~

The link to call the product (XML encoded)

{PR-CanonicalDeepLink}

Checks whether a canonical link is stored for the product

~PR-CanonicalDeepLink~

Output of the canonical link of the product (if available)

~ENCXML-PR-CanonicalDeepLink~

XML-encoded output of the canonical link of the product (if available)

{@PR-Articles} <url>~n~ <loc> {PR-CanonicalDeepLink} ~ENCXML-PR-CanonicalDeepLink~ {/PR-CanonicalDeepLink} {!PR-CanonicalDeepLink} ~ENCXML-PR-DeepLink~ {/!PR-CanonicalDeepLink} </loc>~n~ <lastmod> ~PR-LastModDate~ </lastmod>~n~ </url>~n~ {/@PR-Articles}

{PR-IsCanonicalDeepLink}

Checks whether the product link and the canonical link of the product match (only necessary for multiple export of products).

~PR-LastModDate~

Date of the last modification to the product

{PR-NamedImageURL(FELDNAME)}

Checks whether named image URLs is active for the specified field.

~PR-NamedImageURL(FELDNAME)~

Output of the named image URL for the specified field (only usable within {PR-NamedImageURL(FELDNAME)}).

{PR-NamedImageURL(Image)} <image:image>~n~ <image:loc> https://doma.in/path/to/file/~PR-NamedImageURL(Image)~ </image:loc>~n~ </image:image>~n~ {/PR-NamedImageURL(Image)}

~PR-Amount

The stock amount

~PR-ParentNumber~

Product number of the master article
(only for dependent variants)

~PR-DeliveryCosts~

The delivery costs for the product based on the default settings / delivery groups configured in the OSB service

~PR-DeliveryCostsGoogleShopping~

The delivery costs for Google Shopping

~PR-RatingVotes

Number of user ratings

~PR-RatingScore~

Average rating (between 1 and 10)

~PR-RatingScore(min, max)~

Average rating (between min and max).
Only either this tag or ~PR-RatingScore~ can be used.

{@PR-RatingVotes}

Loop over all individual ratings for the product

~PR-RatingText~

Written rating text
Only usable within {@PR-RatingVotes}

{PR-RatingText}
{!PR-RatingText}

Check if a text was written during the individual rating.
Only usable within {@PR-RatingVotes}

~PR-RatingSubject~

Written rating subject
Only usable within {@PR-RatingVotes}

{PR-RatingSubject}
{!PR-RatingSubject}

Check if a subject has been written in the individual rating.
Only usable within {@PR-RatingVotes}

~PR-RatingEmail~

E-mail address of the rater
Only usable within {@PR-RatingVotes}

{PR-RatingEmail}
{!PR-RatingEmail}

Check if an email address has been stored with the rating.
Only usable within {@PR-RatingVotes}

~PR-RatingNickname~

Deposited nickname for rating
Only usable within {@PR-RatingVotes}

{PR-RatingNickname}
{!PR-RatingNickname}

Check if a nickname has been deposited with the rating.
Only usable within {@PR-RatingVotes}

~PR-RatingVote~

Single rating
Only usable within {@PR-RatingVotes}

~PR-RatingID~

RatingID
Only usable within {@PR-RatingVotes}

~PR-RatingTimestamp~

Time of rating. Format: YYYY-mm-DD HH:MM:SS
Only usable within {@PR-RatingVotes}

{PR-Inventory}

Section displayed when inventory management has been enabled for a product.

{PR-InventoryState(state)}

Inventory state

Possible values:
- green
- yellow
- red (=red-soft or red-hard)
- red-soft
- red-hard

Several values can be specified comma-separated. (See shop documentation: PR-InventoryState)

Should only be used within {PR-Inventory}.

Example:

{PR-InventoryState(green)} Sofort lieferbar {/PR-InventoryState(green)}

{@PR-DistinctArticles(fieldname)}

Loop for all product data

For each different field value of the product data field passed with the parameter, only the first product found will be output.

Example:
Product data
Index Name IS_ZUSATZ0
0001 Prod1 red
0002 Prod2 green
0003 Prod3 red
0004 Prod4 blue
0005 Prod5 green

Template

Index / Name / Farbe {@PR-DistinctArticles(IS_ZUSATZ0)} ~PR-Index~ / ~PR-Name~ / Farbe: ~PR-IS_ZUSATZ0~ {/@PR-DistinctArticles(IS_ZUSATZ0)}

Result
Index / Name / Color
0001 / Prod1 / red
0002 / Prod2 / green
0004 / Prod4 / blue

~PR-SalesFigures~

Outputs the sales figures of the last 30 days. Outputs the sales figures of the base item for variants.

~PR-SalesRank~

Output of the sales rank based on the order data of the last 30 days. Outputs the rank of the base article for variants.

{PR-ProcessMediaData}

Area is displayed when data comes from the media database. If the current product is a shop product, the area is not displayed

Prerequisite
- media database (KNV/VLB is activated)
- product data has a GTIN

{PR-LoadMediaData}

Area is displayed if media data for the current product could be reloaded. It is also displayed if the current product is from the media database.

Prerequisite
- media database (KNV/VLB is activated)
- product has a field "GTIN" which is filled.

~PR-MediaDataPrice~
~PR-MediaDataATPrice~
~PR-MediaDataCHPrice~

Output of the price of a product, which is in the media database.

(...Price for Germany, ...ATPrice for Austria and ...CHPrice for Switzerland)

Prerequisite
- Media database (KNV/VLB is activated)
- {PR-LoadMediaData} is positive

{PR-MediaDataFixedRetailPrice}
{PR-MediaDataFixedRetailPriceAT}
{PR-MediaDataFixedRetailPriceCH}

Area is displayed if the product is price fixed in the country.

(...Price for Germany, ...PriceAT for Austria and ..PriceCH for Switzerland)

Prerequisite
- Media database (KNV/VLB is activated)
- {PR-LoadMediaData} is positive

{PR-MediaDataRetailPrice}
{PR-MediaDataRetailPriceAT}
{PR-MediaDataRetailPriceCH}

Area is displayed if the product is not priced in the country.

(...Price for Germany, ...PriceAT for Austria and ..PriceCH for Switzerland)

Prerequisite
- Media database (KNV/VLB is activated)
- {PR-LoadMediaData} is positive

~PR-Ekomi-RatingVotes~

Reads from external_data.websale_*_rating_ekomi_shop number of ratings ("NumRatings") for the product

{PR-Ekomi-RatingVotes}

Section displayed if Ekomi is enabled for the shop.

~PR-Ekomi-RatingScore~

Reads the average rating ("AverageRating") for the product from external_data.websale_*_rating_ekomi_shop.

{PR-Ekomi-RatingScore}

Section displayed if Ekomi is enabled for the shop.

{@PR-Ekomi-Ratings}

Loop over the individual Ekomi ratings for a product