cancel
Showing results for 
Search instead for 
Did you mean: 

Want to replicate data on both the versions i.e. Staged and Online using Data hub, is it possible?

0 Kudos

I am working on price replication and have created CustomPriceRow item type in Hybris extending 'PriceRow' OOB Item. I want to replicate data to both Staged and Online version of CustomPriceRow type through Data hub, So want to know if it is possible and if yes then please guide me further.

Accepted Solutions (0)

Answers (1)

Answers (1)

Slava
Advisor
Advisor
0 Kudos

Arman, I think it is possible. I'm not sure, if it's a good idea, because Staged version exists for a reason and Hybris ECP has functionality to promote content of Staged catalog to Online. However, if you want to do it from DataHub, you will need to create another target system in the extension configuration file defining your current target system model (It maybe inside a jar file because that's how extensions are distributed). Extract that xml file. Inside that file you should see something like this:

     <targetSystem>
         <name>...</name>
         <type>HybrisCore</type>
         <exportURL>...</exportURL>
         <userName>...</userName>
         <password>...</password>
         <exportCodes>
             <exportCode>
                 $catalogVersion=catalogversion(catalog(id[default=apparelProductCatalog]),version[default='Staged'])[unique=true,default=apparelProductCatalog:Staged]
             </exportCode>
             <exportCode>
                 $baseProduct=baseProduct(code,catalogVersion(catalog(id[default='apparelProductCatalog']),version[default='Staged']))
             </exportCode>
         </exportCodes>
         <targetItems>
                     ...
         </targetItems>
    </targetSystem>

Copy the entire content of the targetSystem element and paste it after the closing tag. Give the pasted target system a different name, change the exportCodes to point to correct catalog, let's say Online instead of Staged. Pack this config file into the jar file and start testing. You should be able to publish to either of the target systems or to both of them at the same time.