SAP Customer Data Cloud Positions

Using The Web SDK

Skip to end of metadata
Go to start of metadata


This chapter provides the basic knowledge needed to start developing using SAP Customer Data Cloud's JavaScript Web SDK. We highly recommend reading this document before starting to code.

What's in this Guide?

  • Basic Concepts - The guide starts out with some fundamental concepts that are required for developing applications with SAP Customer Data Cloud's JavaScript Web SDK.
  • Basic Tutorial - Continue with a basic example of a web page that uses the SAP Customer Data Cloud service - a basic Facebook app, and a guide for using SAP Customer Data Cloud Web SDK methods.
  • Events - Learn how to handle Events generated by SAP Customer Data Cloud socialize.
  • Advanced Customizations - Advanced customization options that you may apply on your client application.
  • Supported Browsers - Information about SAP Customer Data Cloud's browser support.


Note: In addition to the JavaScript Web SDK, SAP Customer Data Cloud has several mobile SDKs for platforms such as iPhone, Android, and Cordova.



Basic Concepts

An Asynchronous Programming Model

SAP Customer Data Cloud uses an asynchronous programming model in which operations are triggered and then run in the background until they are completed. Upon successful or unsuccessful completion, the operation invokes a callback function, which is provided by the developer, and returns a response object that includes the results of the operation. The callback function should handle the response in an appropriate manner, as determined by the application. 

The SDK Namespaces

The entire range of SAP Customer Data Cloud functionality is provided as methods of one of the following namespaces: gigya.socialize, gigya.accounts, gigya.comments, and gigya.ds, thus all methods are referenced with the gigya. prefix. 


Making Calls

Loading the Web SDK

The first thing you need to do is ensure that you have our Web SDK loaded on every page of your site that you will be using SAP Customer Data Cloud services. This is accomplished by sourcing the SDK from our CDN in the <head> of all your pages. To do this, simply add the following code to your sites header template.

<script type="text/javascript" lang="javascript" src="cdns.<Data_Center>/js/gigya.js?apikey=<A_Valid_API_Key_For_Your_Site>">

Where <Data_Center> is:
  • - For the US data center.
  • - For the European data center.
  • - For the Australian data center.
  • - For the Russian data center.
  • - For the Chinese data center.

If you are not sure of your site's data center, see Finding Your Data Center.


Calling the Method

All the methods in the SAP Customer Data Cloud Web SDK have a common signature:

// e.g., gigya.socialize.showShareBarUI(params)

The "params" object is actually an object that may contain multiple members. We choose to use this object instead of passing parameters in the "classical" way - this provides flexibility in adding new parameters without "breaking" older code. 


Validating the Response

To validate the response returned from our Web SDK APIs, follow this guide.