cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically modify the header of an impex file

0 Kudos

Hi,

is there a way to modify the header of an impex statement based on the values that are imported?

Example:

Given:

 INSERT_UPDATE GenericVariantProduct; code[unique=true];variant
 ;1;size
 ;2;color

Expected:

 INSERT_UPDATE SizeVariantProduct; code[unique=true];variant
 ;1;size

 INSERT_UPDATE ColorVariantProduct; code[unique=true];variant
 ;2;color

So, the values coresponding to the variant header are parsed and following some custom logic the type where the values should be inserted gets modified (GenericVariantProduct -> SizeVariantProduct/ColorVariantProduct)

Thanks, Alex

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Alex, The following could work for you:

 INSERT_UPDATE GenericVariantProduct; code[unique=true];variant
 SizeVariantProduct;1;size
 ColorVariantProduct;2;color

It's not really dynamic, but might work. In case you like to dynamically import and structure data you could have a look at BeanShell script, see https://help.hybris.com/6.3.0/hcd/8bee24e986691014b97bcd2c7e6ff732.html.

Cheers, Tobias

0 Kudos

Hi Tobias,

thanks, i will look at BeanShell to see if there is a way to achieve that.

Cheers, Alex