Export Pricefx Objects to IDoc
This template fetches a Pricefx object and converts it to IDoc using defined mapping. The IDoc is then stored at a FTP location.
The template fetches only objects that have changed since the last template run. The last run timestamp is stored in the property export.pfx.objects.{{object.type}}.to.idocs.timestamp
in Advanced Configuration per Pricefx partition. {{object.type}}
is a selected object type in the configuration. If there is no such property for the given object type, all objects are fetched.
Installation
Go to PlatformManager > Marketplace, find Export Pricefx Objects to IDoc, select Deploy and then select a target integration instance and template version.
Configuration Steps
Enter a name for the template deployment and select Pricefx connection (or create a new one).
Choose the SFTP connection (or create a new one).
In Integration Properties:
Define Cron expression determining how often the template will poll Pricefx to find new objects to export. This is set up using the Cron syntax which allows for very detailed scheduling.
Select Pricefx object type which should be exported.
The following object types are supported: Product, Product Extensions, Product References, Customer, Customer Extensions, Sellers, Seller Extensions, Quote, Rebate Agreement, Payout Records, Discounts, Price List Items, Price Grid Items, Competition Data, Company Parameters, BoM Data.Choose the directory in which to place the CSV file. When using the Pricefx FTP area, it is usually /filearea/outbound/.
Define Batch size for fetching items from Pricefx.
Define Root XML element.
Decide if incremental export should be used. If set to yes, the export from the Pricefx object contains only new records. If set to no, all data are exported (even if there was no change).
Enter name of the exported file. You can use the following tokens that will be replaced with actual values:
[object.type] – exported object type
[object.name] – object name for extension objects
[timestamp] – time of the export
Example: export_[object.type][object.name][timestamp].xml
If you leave the field blank, the default file name will be used.Define your own timestamp in the exported file. It uses standard Java date and time pattern.
Decide if .done file should be used. If Yes is chosen, there will be an empty marker file created with the “.done” suffix added to the actual data file. This .done file is a signal saying that the export was completed.
Define mapping between the input and output fields.
Also, decide how empty values should be passed on. You have two options:Send empty value as empty string ""
Send empty value as NULL
Click Next to complete the deployment.
Sample Mapper Definitions
For Products
<pfx:multilevelMapper id="exportPfxProductsToIDocMapper"> <pfx:groovy expression="body.sku" out="MATMAS05.IDOC.E1MARAM.MATNR"/> <pfx:groovy expression="body.label" out="MATMAS05.IDOC.E1MARAM.E1MAKTM.MAKTX"/> <pfx:groovy expression="'E'" out="MATMAS05.IDOC.E1MARAM.E1MAKTM.SPRAS"/> </pfx:multilevelMapper>
For Quotes
You can use multilevelMapper array mapping features to map Quote Line Items. For details see Multilevel Mapper.<pfx:multilevelMapper id="exportPfxQuotesToIDocMapper"> <pfx:groovy expression="body.sku" out="MATMAS05.IDOC.E1MARAM.MATNR"/> <pfx:groovy expression="body.label" out="MATMAS05.IDOC.E1MARAM.E1MAKTM.MAKTX"/> <pfx:groovy expression="'E'" out="MATMAS05.IDOC.E1MARAM.E1MAKTM.SPRAS"/> <pfx:body in="lineItems[].label" out="MATMAS05.IDOC.QLI[].QLI_LABEL"/> <pfx:body in="lineItems[].sku" out="MATMAS05.IDOC.QLI[].QLI_SKU"/> </pfx:multilevelMapper>
Sample IDocs with schemas can be found at Sample IDocs with Schemas.
PlatformManager version 1.75.0