2024 Feb 26 8:48 AM - edited 2024 Feb 26 9:17 AM
Hi,
one requirement of my project is the only synchronisation of priceRow because them are imported from an external system, while the products (and other items) must follow the canonical way.
I tried to create a new syncJob with the impex below;
I understood that for select items and attributes that are needed to be sync I must work on attributeDescriptor but I don't know how.
$solPrefix = myProject
INSERT_UPDATE CatalogVersionSyncJob ; code[unique=true,path-delimiter=!] ;sourceVersion(catalog(id),version) ;targetVersion(catalog(id),version) ; syncPrincipals(uid) ; removeOnExit ; sessionUser(uid) ; syncLanguages(isocode)
; sync $solPrefixPriceRow:Staged->Online ;$solPrefixProductCatalog:Staged ;$solPrefixProductCatalog:Online ; syncuser ; true ; syncuser ; en,it
INSERT_UPDATE SyncAttributeDescriptorConfig ; syncJob(code)[unique=true,path-delimiter=!] ; attributeDescriptor(enclosingType(code),qualifier)[unique=true] ; includedInSync ; copyByValue
; sync $solPrefixPriceRow:Staged->Online ; priceRow:products ; false ; false
# ; sync $solPrefixPriceRow:Staged->Online ; Category:products ; false ; false
the run of the impex return the error:
INSERT_UPDATE SyncAttributeDescriptorConfig;syncJob(code)[unique=true,path-delimiter=!];attributeDescriptor(enclosingType(code),qualifier)[unique=true];includedInSync;copyByValue
,,,,error finding existing item : column='attributeDescriptor' value='priceRow:products', | column 2: could not resolve item for priceRow:products;sync myprojectPriceRow:Staged->Online;priceRow:products;false;false
That I need to put on attributeDescriptor for select only priceRow?
And (in general) how works the multivalue referenced types?
Anyone have tips?
Marco
Request clarification before answering.
If your prices are coming from an external source then do you really need them to be catalog version aware? In more recent versions of SAP Commerce prices are decoupled from products and linked by a 'soft' relationship on product code.
You can have you prices imported from an external source and they immediately become the current price for products in both the staged and online catalogs.
To answer your actual question, I'm not really sure what you are trying to achieve with your SyncAttributeDescriptor config but the attributeDescriptor needs to define a valid attribute. There is no 'products' attribute on the 'PriceRow' type. If I understand your question correctly, I think you'd be better using the 'rootTypes' attribute on the CatalogVersionSyncJob to just sync PriceRow types and potentially mark the 'product' (note no 's') attribute as includedInSync=false so that it doesn't try and sync the linked product.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you got the point right.
to answer at your question: no, we don't need strictly the prices versioned but we decided to keep them as them are, consider that there are also others business requirement. One other solution keep in analysis at the beginning was write the prices directly on online catalogue, but it was not the solution chosen.
about the impex: I want create another CatalogVersionSyncJob to synchronise only the priceRow items. I don't know what I need to put on the attributeDescriptor for do that.
this insert below works fine
INSERT_UPDATE CatalogVersionSyncJob ; code[unique=true,path-delimiter=!] ;sourceVersion(catalog(id),version) ;targetVersion(catalog(id),version) ; syncPrincipals(uid) ; removeOnExit ; sessionUser(uid) ; syncLanguages(isocode)
; sync $solPrefixPriceRow:Staged->Online ;$solPrefixProductCatalog:Staged ;$solPrefixProductCatalog:Online ; syncuser ; true ; syncuser ; en,it
the insert of SyncAttributeDescriptorConfig below fail
INSERT_UPDATE SyncAttributeDescriptorConfig ; syncJob(code)[unique=true,path-delimiter=!] ; attributeDescriptor(enclosingType(code),qualifier)[unique=true] ; includedInSync ; copyByValue
; sync $solPrefixPriceRow:Staged->Online ; XXXXXX:YYYYYYY ; false ; false
what can I put on attributeDescriptor to create the respective items for update ONLY priceRows?
User | Count |
---|---|
21 | |
16 | |
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.