cancel
Showing results for 
Search instead for 
Did you mean: 

how to create multile traget item with same type, export code , attributes but different data

Former Member
0 Kudos

Hi,

I am facing an issue on product import from ERP system using data hub. I am using CSV adapter for data import. Base product data is coming from ERP system but I am deriving variant product using a composition handler from base product . I need to create a market status target object for base product and variant product but from a single raw input. Please suggest how can I achieve that since target item type , export code and attributes are same but difference in the input data (separate canonical attributes with different data is available for baseproductcode and variant variantproductcode ). In general I need to create two target objects of same type with single raw data.

input data : $baseproductcode , $status
$variantproductcode is derived from $baseproductcode using composition handler

generated impex should look like :

INSERT_UPDATE MarketStatus; code[unique=true];;product(code,$catalogVersion);status
abc;$baseproductcode ; $status

INSERT_UPDATE MarketStatus; code[unique=true];;product(code,$catalogVersion);status
abc;$variantproductcode ; 'active'

I have configured spring configuration - target extension xml with different target items of same type but its generating only one target object.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The key point is to define different "types":

             <item>
                 <type>PriceRow</type>
                 <exportCode>PriceRow</exportCode>
                 <updatable>true</updatable>
                 <canonicalItemSource>CanonicalPrice</canonicalItemSource>
                 <status/>
                 <attributes>
                 ....

             <item>
                 <type>DeletePriceRow</type>
                 <exportCode>PriceRow</exportCode>
                 <updatable>true</updatable>
                 <canonicalItemSource>CanonicalDeletePrice</canonicalItemSource>
                 <status/>
                 <attributes>
                 ....

The source of this is the same price condition from SAP, it's split into two canonical items and from there into two different target "types" in the target system(s). In the end both is an impex statement on PriceRow.

Former Member
0 Kudos

I wan to delete the categories previously assigned and then assign new categories to the product through datahub. How to remove and then assign new value in target datahub extension? What would be the best approach?

Regards, Rasika

Answers (0)