When you integrate Click-to-Call and Commerce Service Center with an external CTI system, you need to provide the CTI system with a URL that accesses the Click-to-Call information. Before you can configure the Commerce Service Center portion of the configuration, ensure that your external CTI system can produce a hash that Commerce Service Center will be able to reproduce.

The hash key can be set manually or set in a system repository. By default, hash keys are not available in clear text in a configuration file. Hash keys that are set in a system repository can be obtained using the C2CTools property from the Dynamo Server Admin.

One you have the hash key, generate a script. For example:

  * Generates the URL that is used to spawn a CSC instance passing the required
  * parameters for a Click To Connect Session
  * @param pURL
  *    The initial part of the CSC URL e.g. http: //foo: 8080/agent/main
  * @param pUsername
  *    The username of the CSC user
  * @param pCallerID
  *    The caller id of the customer
  * @return The fully qualified URL
public URL generateURL(String pURL, String pUsername, String pCallerID) throws \
MalformedURLException, UnsupportedEncodingException {

// hashKey is the secret key used to salt the hash, this secret key is also
//configured within CSC and should be identical to what is used here.
final String hashKey = "mySecretKey";

// hashingAlgorithim is the algorithm used to create the hash. The algorithm
//should be the same as is configured within CSC in order for CSC to recreate the
final String hashingAlgoritim = "SHA1";

// hashText is the information that the hash is created from, the Agent username,
//customer telephone number and the hashKey.
String hashText = pUsername + pCallerID + hashKey;
String clickToCallURLString = "";
String hashString = "";

 * Create hash of the username, callerID and the hashKey. The Hashing algorithm
 * used is SHA1, matching the hashing algorithm that CSC is configured to use.
try {
  MessageDigest m = MessageDigest.getInstance(hashingAlgoritim);
  m.update(hashText.getBytes(), 0, hashText.length());
  hashString = new BigInteger(1, m.digest()).toString(16).trim();
} catch (NoSuchAlgorithmException nsae) {

 * The URL is created from the initial CSC URL e.g http: //foo: 8080/agent, the
 * clickToCallInit parameter, the Agent username, the hash value, and the
 * telephone number of the shopper who initiated the Click-to-Call session
clickToCallURLString += pURL + "?clickToCallInit=true&username="
  + URLEncoder.encode(pUsername, "UTF-8") + "&hash="
  + URLEncoder.encode(hashString, "UTF-8") + "&UserTelephoneNumber="
  + URLEncoder.encode(pCallerID, "UTF-8");

URL clickToCallURL = new URL(clickToCallURLString);

return clickToCallURL;

Once you have verified that your CTI system can produce the necessary hash and URL, create a script that integrates your system. The script should:

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices