Gigya Job Openings

SAP Commerce Cloud DS

Skip to end of metadata
Go to start of metadata

Overview

For clients who use Gigya's Data Store (DS), synchronization between Hybris and the Data Store is available by activating a separate module on top of the main Gigya Extension for Hybris.

The DS Sync module pulls user data from Gigya's Data Store and maps it into the user account database in Hybris.

Installation and Implementation

The following guide assumes you have installed and implemented the core Gigya extension for Hybris. If you have not, follow the instructions here: SAP Commerce Cloud

1. Install the Extension

  1. Download the main Hybris extension from here.
  2. Copy the gigya-addon folder to ${HYBRIS_BIN_DIR}\custom folder.
  3. Add "gigyads"to localextensions.xml.
  4. Run the following command, replacing yourstorefront with your storefront name:

     

    ant addoninstall -Daddonnames="gigyads" -DaddonStorefront.yacceleratorstorefront="yourstorefront"

2. Map Fields

To map DS fields to Hybris: 

  1. In the HMC tree, open the Gigya Node and select Gigya DS.
  2. Click New in the upper left corner.

  3. Give the mapping a name.
  4. Enter the DS object ID (OID). 
  5. Enter the DS Field type.
  6. Right-click the "Fields" are and select Create Field

  7. In the new window that opens: 
    • Enter the Gigya DS field name. 
    • Enter the names of the Hybris attribute name. 
    • Enter the Hybris type. 

      You can find the name and type of the Hybris attribute in the items.xml file, in the attribute qualifier. In the following example, the name of the attribute is "created" and the type is string:

      <attributes>
          …
        <attribute qualifier="created" type="java.lang.String">
               <modifiers read="true" write="true"/>
               <persistence type="property"/>
        </attribute>
      <attributes/>
  8. Click Save.
  9. Using the search icon, next to Gigya Configuration, select the Gigya configuration or site you would like to apply the mapping to. 
  10. Click Create or Save

Advanced Field Mapping

The Hybris GConnector uses a custom converter whose bean ID is dsConverter. To map DS objects (e.g. JSON objects) from DS to Hybris, you need to extend this converter, by creating a populator which is added to the converter's list of populators. This is advanced configuration, and requires developer expertise in Hybris. 

  1. Define a custom ID and class for yourHybris populator, for example:

    <bean id="gigyaDSMarketingPopulator" class="com.gigya.ds.service.converters.populators.GigyaDSMarketingPopulator "/>
  2. Example structure for a populator: 

    public class GigyaCustomerKidsPopulator implements Populator<GSResponse, GigyaUserModel>
    {
     private static final Logger LOG = Logger.getLogger(GigyaCustomerKidsPopulator.class);
     
     @Override
     public void populate(GSResponse gsResponse, GigyaUserModel customerModel)
     {
       customerMode.setKids(gsResponse.getData().getInt(“kids”));
    //More implementation
    }
    }
  3. In the spring of the extension, assign modifyPopulatorList as a parent to your bean. For example, if the name of your bean is gigyaDSMarketingPopulator, the code would look like this: 

     

    <bean parent="modifyPopulatorList">
       <property name="list" ref="dsConverter"/>
       <property name="add" ref="gigyaDSMarketingPopulator"/>
    </bean>

Schedule Data Sync

The data in the mapped fields is synced automatically every time a user logs in. In addition, it is synchronized at periodic intervals, defined by two Hybris cron jobs. The cron jobs involved with updating data between Gigya's Data Store and Hybris is dsToHybrisSyncCronJob . By default, it is configured to run every 30 minutes, but you can change the frequency as you wish. To do so: 

  1. In the HMC tree, open the Gigya Module Cronjob folder. Right-click the relevant job and select Edit or Edit in new tab
  2. Select the desired frequency. 
  3. If the frequency you need is not in the list, either enter a cron expression or select Free Interval. Select the appropriate values from the dropdowns. 

 

 

 

 

 

  • No labels