Hybris Marketing

Skip to end of metadata
Go to start of metadata



SAP Hybris Marketing is a marketing solution that unifies user data into a centralized hub in order to provide real-time context-based data about individual customers and anonymous visitors, allowing brands to deliver contextual, consistent and relevant experiences throughout a customer journey, regardless of the marketing channel or device.

  • Hybris Data Management: gives you a 360 view of people interacting with your brand, so you can target them within the right context, in real-time.
  • Hybris Marketing Recommendation: delivers timely and highly relevant recommendations to your customers, helping you translate interest into conversion.
  • Hybris Marketing Segmentation: provides high-performing audience segmentation in real-time, so you can personalize campaigns across multiple channels.

The Gigya integration enables you to add Gigya's first-party, permission-based user information into the SAP Hybris Marketing platform, and turn it into actionable data for audience segmentation, targeted marketing and more.

Integration Features

  • Gigya user information is fed in real time into the SAP Hybris Marketing platform, triggered by the login event.
  • Information is transmitted securely between servers.
  • By default, the Gigya data fields transmitted to Hybris include: First Name, Last Name, Email,  Social Network IDs, Mobile phone number, Location, Country, and City. Other fields can be configured based on the customer's needs.

Integration Flow

Use in Combination with SAP Hybris Commerce

Gigya also offers an integration with SAP Hybris Commerce. In websites that use both SAP Hybris Commerce and SAP Hybris Marketing, information can be channeled between the platforms through Gigya, based on the common Gigya UID of the end-user.

For example, Gigya can pass on to Hybris Marketing information about the end-user's purchases, enabling targeting, personalized recommendations and more.

Hybris Marketing, Hybris Commerce, and Gigya - Process Flows


To use the integration in your site, you must have the following set up:


1. Create Gigya App Key + App Secret

For better security and privacy management, we recommend creating a separate Application Key for each application that you allow to access your Gigya information.

To create an App Key for this integration, do the following:

  • In the Gigya console, go to Admin > Manage Applications and click Create New Application.
  • Fill in the name "HybrisMarketing".  If you have a group that has "Full API Access" privileges, add your new application to that group.
  • Click Create. Copy the application key and secret that are displayed on the screen.

If you don't have a user group set up with the appropriate privileges, create one:

  • In the Gigya console, go to Admin > Manage Groups and click Create New Group.
  • Give the group a name and click Create.
  • In the group table, click the Edit icon next to the new group.
  • In the Privileges tab, check the Full API Access privilege and click the Update button.
  • Go to the Members tab and click Add Applications to Group.
  • In the list of applications, check the "HybrisMarketing" application and click Add Applications.

For more information, see the Group Management and Application Management documentation.

2. Provide Credentials to Gigya

Your integration will be configured by Gigya. You will have to provide the following details:

  • Gigya credentials: Application Key and Application Secret
  • Credentials to access Hybris Marketing: User name and password

Please make sure to use Gigya Aplication Key and not Account User Key to avoid rate limit issues.

3. Load the Integration Script in Your Site

Add the following line to your main site code, after the the Gigya and JQuery libraries are loaded.

<script type="text/javascript" src="https://gigya-hm.herokuapp.com/pub/hm.js"></script>

This is the recommended method when the page can handle another action to be performed after the onLogin event. In other cases, such as when a page reloads immediately after login, the site implementation should include the hm function from the script in the right place during the script flow.


The script you load, which can be viewed below, performs the following:

  1. Adds an event listener for the Gigya login event.
  2. On login, the script calls the server-side code that connects to SAP Hybris Marketing, passing the user's Gigya UID.

The UID is used in the server side to get the user's information from Gigya and transmit it into the SAP Hybris Marketing platform.

(function ($) {
    $(document).ready(function () {
        if (window.gigya) {
                onLogin: hm

function hm(eventObj) {
    var transmit = {
        api : gigya.thisScript.globalConf["APIKey"],
        domain : gigya.localInfo.pageDomain,
        UID : eventObj.UID,
        UIDSignature : eventObj.UIDSignature,
        signatureTimestamp : eventObj.signatureTimestamp
    var json_data = JSON.stringify(transmit);
        type: 'POST',
        url: 'https://gigya-hm.herokuapp.com/events/capture.php',
        crossDomain: true,
        data: {
            api : gigya.thisScript.globalConf["APIKey"],
            domain : gigya.localInfo.pageDomain,
            UID : eventObj.UID,
            UIDSignature : eventObj.UIDSignature,
            signatureTimestamp : eventObj.signatureTimestamp
        dataType: 'json',
        success: function(responseData) {
            alert('POST success.' + responseData);
        error: function (responseData, textStatus, errorThrown) {
			alert('POST failed.' + responseData);

Debug and Troubleshooting

You can use the browser console to see if a user who has just logged in was successfully sent to Hybris Marketing: