on ‎2024 Mar 14 4:57 PM
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
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 7 | |
| 7 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.