This Action Map imports eCl@ss data from a BMEcat formatted XML-file.
This Action map example is provided as inspiration only. It must be adapted to your Perfion environment to work. Perfion Support does not assist with such adaptations. Please contact your Perfion Partner or your Perfion consultant if you need assistance.
- All lines containing a Command are created as virtuals. This is a recommended best practice
- The XSLT-script in the first line read data from the XML-file and transforms it to the Perfion table format
- The empty From-field in the Category mapping sets a default Category for all imported items via the script
Sample XML-file
The XML-file used in the Action Map example (Coffeemachines.xml) is attached at the bottom of the page.
Sample data for building Action Map
NOTE: Line breaks are omitted if you paste scripts from the table below directly to an action. In stead, paste script to Notepad++ and then copy from there. That will preserve line breaks when you paste into an action.
| Action Map - From | To | Command | Action | Script | Note |
| C:\Perfion Data\ActionSources\BME\Coffeemachines.xml | BMEcat | SELECT.XSLT.ToTable |
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <!-- Main template --> <xsl:template match="PRODUCT" > <xsl:template match="PRODUCT_DETAILS"> <xsl:element name="{$FieldName}"> <xsl:template name="removespaces"> <xsl:value-of select="translate($this, ' ', '')" /> </xsl:stylesheet> |
||
| BMEcat | Importdata | SELECT | |||
| Id | _Value | ||||
| DESCRIPTION_SHORT | ItemName_EN | ||||
| DESCRIPTION_LONG | Description_EN | ||||
| EAN | EANCode | ||||
| PRODUCT_ORDER | #Order | ||||
| A02-ABC314 | WaterTankCapacity | ||||
| A02-AUW193 | NoOfBeanContainers | ||||
| A02-BAI491 | CapacityBeanContainer | ||||
| A02-BBC191 | CableLength | ||||
| A02-BAA739 | PowerW | ||||
| A02-BAA997 | WeightKG | ||||
| A02-CBC510 | WidthCM | ||||
| A02-DAB671 | LengthCM | ||||
| A02-AAC411 | HeightCM | ||||
| Category_EN | Value="Coffee & Tea|Coffee Machines"; | ||||
| Importdata | Product | IMPORT |
Comments
0 comments
Please sign in to leave a comment.