cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Insert multiple keyword into a Category via Impex

datacol
Explorer
0 Likes
332

Hi everyone,

I am not able to associate multiple keywords to a specific category using an impex.

I wrote my impex by following the idea written in this post in the community:
https://community.sap.com/t5/customer-relationship-management-q-a/how-to-insert-a-keyword-and-relate...

The impex I wrote is:

--------

$productCatalog=dcCommProductCatalog
$productCV=catalogVersion(catalog(id[default=$productCatalog]),version[default='Staged'])[unique=true,default=$productCatalog:Staged]
$lang=Language(isocode)[default='it']
$category=source(code, $productCV)
$keyword=target(keyword, $lang, $productCV)

INSERT_UPDATE Category2KeywordRelation;$category;$keyword;$lang
;271;A pressione:en;
;271;A scomparti:en;

--------

The problem I am facing is that only one of them is kept.

Thanks in advance for any suggestion

 

NB: I'm using SAP Hybris 6.5

 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

Lukasz_support
Associate
Associate
0 Likes

The issue you are facing might be due to missing unique modifier. Given that there are two keywords for same category, impex might create new row and update it with new data.

For newer commerce versions following insert_update works by creating two separate entries:

INSERT_UPDATE Category2KeywordRelation;$category[unique=true];$keyword[unique=true];$lang
;goggles;testa:en
;goggles;testb:en