For example, to return a Customer Journey, instantiate the Customer Management Service Connection with following code:
var _csconfig = new AvayaDataStoreClient.Config.CsConfiguration();
_csconfig.isGuest = guestUsage;
if (!guestUsage){
var token = $('#token').val();
_csconfig.serverInfo.token = token;
}
_csconfig.serverInfo.hostName = clusterIP;
_csconfig.serverInfo.isSecure = false;
_csconfig.enabled = true;
var _customerManagementClient = new AvayaDataStoreClient(_csconfig);
var _cminstance = _customerManagementClient.createDataStoreService(_csconfig,'CustomerManagement');
An example of the Get Customer Journey Operation is detailed below:
Get Customer Journey from work request id
JS file:
var workReqId = $('#workReqId').val();
_cminstance.getCustomerJourney(workReqId);
//etc
HTML template:
//index.html
//Settings panel
// display div for the required operation(s)
Get Customer Journey
The Sample Application Client included allows a user to verify that a Data Store instance has been set up correctly for the Customer Management Service. All API operations supported by the Customer Management Service can be executed using the sample client provided. The client is a standalone HTML/JavaScript implementation of the Customer Management Service APIs in the Data Store SDK. It can be opened by double clicking on index.html beneath the Customer Management sample directory.
For example, to save a context to the Context Store, instantiate the Context Store Connection with following code:
var _csconfig = new AvayaDataStoreClient.Config.CsConfiguration();
_csconfig.isGuest = guestUsage;
if (!guestUsage){
var token = $('#token').val();
_csconfig.serverInfo.token = token;
}
_csconfig.serverInfo.hostName = clusterIP;
_csconfig.serverInfo.isSecure = false;
_csconfig.enabled = true;
var _contextStoreClient = new AvayaDataStoreClient(_csconfig);
var _csinstance = _contextStoreClient.createDataStoreService(_csconfig,'ContextStore');
An example of the Create Context Operation is detailed below:
ServiceResponse response = contextStore.postContext(context, lease,sid, aliasId(s),rid, touchpoint); Post a Context object to Context Store. The Context will expire after a specified lease period. Given aliasId(s) will be assigned to the Context (up to three aliasIds per Context)
JS file:
var contextId = $('#workReqId').val();
var sid = $('#sid').val();
var rid = $('#rid').val();
var touchpoint = $('#touchpoint').val();
var lease = $('#lease').val();
var rules = $('#rules').val();
var shortId = $('#shortId').val();
var data = '{"contextId":"ABC”,"data":{"key1_name":"value1_data","key2_name":"value2_data"}}';
_csinstance.createContext(data, sid, rid, touchpoint,lease,rules,shortId);
//etc
HTML template:
//index.html
//Settings panel
// display div for the required operation(s)
Create Context
The Sample Application Client included allows a user to verify that a Data Store instance has been set up correctly for the Context Store Service. All API operations supported by the Context Store Service can be executed using the sample client provided. The client is a standalone HTML/JavaScript implementation of the Context Store APIs in the Data Store SDK. It can be opened by double clicking on index.html beneath the Context Store sample directory.
For example, to return a Customer Journey, instantiate the Customer Journey Service Connection with following code:
var _csconfig = new AvayaDataStoreClient.Config.CsConfiguration();
_csconfig.isGuest = guestUsage;
if (!guestUsage){
var token = $('#token').val();
_csconfig.serverInfo.token = token;
}
_csconfig.serverInfo.hostName = clusterIP;
_csconfig.serverInfo.isSecure = false;
_csconfig.enabled = true;
var _customerJourneyClient = new AvayaDataStoreClient(_csconfig);
var _cminstance = _customerJourneyClient.createDataStoreService(_csconfig, 'CustomerJourney');
An example of the Get Customer Journey Operation is detailed below:
Get Customer Journey via customer id
JS file:
var customerId = $('#customerId').val();
_cminstance.getCustomerJourney(customerId);
//etc
HTML template:
//index.html
//Settings panel
// display div for the required operation(s)
Get Customer Journey
The Sample Application Client included allows a user to verify that a Data Store instance has been set up correctly for the Customer Journey Service. All API operations supported by the Customer Journey Service can be executed using the sample client provided. The client is a standalone HTML/JavaScript implementation of the Customer Journey Service APIs in the Data Store SDK. It can be opened by double clicking on index.html beneath the Customer Journey sample directory.