February 02, 2015

Fixing title of Siebel Open UI

It is one of the well known problems of Siebel Open UI. Browser title of Open UI application is not static and is not set by AOM's "ApplicationTitle" parameter.  


There are numerous other problems with it other than being static, like:
1.Title shows "-the end-"  if the application is refreshed by browser refresh button.
Title showing as -the end- in home screen
2. Dynamic title for every view, which does not contains application name.  
Home page is showing Contact Home Title on navigating back.
3. Home Page View does not show the title correctly if user navigates back from any other screen tab.
Activity home screen show Account Home Title
4. Home Page of screen tabs shows first record information. 

Contact Home shows record details.

Solutions: 


1. Update Title property for all the views in application with correct title or a static title. 

This solution requires changing lot of objects in repository and does not fixes issues with home page views.
read more on bookshelf

2. Update the document title using Open UI Postload event. 

Although this will cause title to title to flicker from the original title to a static title, but it is the only solution which is as close as to the HI application title. 

Change you postload.js or create new custom js and add following script to the application. 

 If(typeof (SiebelAppFacade.ChangeTitle) == "undefined") {
Namespace('SiebelAppFacade.ChangeTitle');

(function(){
SiebelApp.EventManager.addListner( "postload", OnPostload, this );
function OnPostload( ){
try{
document.title="Siebel Call Center";
}
catch(error)
{
SiebelJS.Log("Error caught in postload: "+error);
}
}
}());}


However this solution does not help in case of record navigation. Choose wisely. Hope it helps.

January 30, 2015

Mouseless Siebel?

I am fan of keyboard shortcuts and I don't like applications which are dependent on mouse clicks and one of such application is Siebel especially Open UI. Many shortcuts of HI does not work in Open UI as browser overrides like Control +N and Cntrl + Arrow Keys.

This forced me to find this alternative and I found the Mouseless browsing add-in for Firefox.

It is not exactly command line interface but it is the closest you can get in Siebel Open UI, once this plugin in enabled you can browse entire Siebel application with keyboard shortcuts with this plugin.

Install Mouseless Browsing Firefox add-in (by Rudolf Noe) from following URL:
https://addons.mozilla.org/en-us/firefox/addon/mouseless-browsing/

It works with both Siebel dedicated and thin client. Some screenshots:

Siebel Open UI Home Page with Mouseless Plugin

Invoking Navigate Menu

Siebel Open UI Sitemap

Navigating in Siebel Open UI Using keyboard shortcuts.



This plugin indexs all the links on web page and assign a sequence number to it which becomes the keyboard shortcut for it. The shortcut is displayed along with every clickable link. Incase you are in a editable field you can still use the shortcut by pressing Ctrl Key.




I am using it from past week and hasn't faced any issues yet. Give it a try and let me know how you like it.



April 24, 2014

Does HeartBleed effects Siebel?

Does HeartBleed effects Siebel?

Siebel Heartbleed?
Heartbleed and Siebel?
Heartbleed is an OpenSSL implementation vulnerability which was discovered earlier this month and has global impact. It was discovered by OpenSSL, who in turn credits Riku, Antti and Matti at Codenomicon and Neel Mehta of Google Security.

By exploiting this flaw users could steal the private keys and can do all sorts of nasty stuff like man in the middle or forging attacks which seems to be possible only in theory.

It was the worst nightmare for the system engineers and many are still in process to determine the impact to their machines and patching them. According to the list all major web service provider (amazon to google ) were impacted.

As a Siebel customer how does it impacts you? Do you need to worry about your customer's or partner's accounts? 

Answer is a Yes!

Although this problem only impacts the Open SSL implementation on Linux environments, Oracle has still not certified Siebel CRM product as safe from the bug.
Read oracle link for HeartBleed certification:
http://www.oracle.com/technetwork/topics/security/opensslheartbleedcve-2014-0160-2188454.html

Do you need to worry, even if Siebel is not interfaced with any other system?

Probably Yes, with stolen private key (which are usually common for most of the systems in an organisation) hackers can hack other systems. Try to answer these questions for your implementation then plan your strategy:

  1. Is siebel available to customers online? 
  2. Does siebel use SSL?
  3. Have you implemented Siebel on Windows or Linux? OOB Windows is safe from Heartbleed.
  4. Does your implementation communicates with other systems over SSL? for integrating any banking transactions? 
  5. Any third party client used to integrate with SSL? Putty or etc?

How to be safe?

  • Upgrade the Open SSL version : https://access.redhat.com/site/solutions/781793
  • Change your security certificates and keys.
  • Ask your users to change passwords.
  • Subscribe to security updates from Oracle : http://www.oracle.com/technetwork/topics/security/alerts-086861.html
For those who are unware of the bug refer:


Hope it helps.

February 14, 2014

Quiz: How to change the destination field of MVG?

This could be one of the most difficult Siebel Configuration Interview Question, it took me some time to understand it and found it quite amusing. Let us see how many of us could answer this. :)

Requirement: To change the destination field of an MVG. Siebel Provides option to change the source field of an MVG so that child records for some other key field can be fetched.

From Siebel tools help: 
MVG Source field Definition

Source Field (O)
Specifies the name of a source field that Siebel CRM uses to link the child business component with the source business component. The source business component is the business component that includes the object definition for the multivalue link. If the source field is different from the Id, then the Source Field property is required.

Requirement is to change the destination field, please bear in mind the MVG is based on M:M relation using a inter table. 


Update:  Sorry guys to being so late in responding to the comments.


Answer to the question is: Source Field and Destination Field of the M:M links can be modified just like 1: M link. Siebel supports having source and destination fields as well as inter-table on a link, this makes the links most configurable.



I have explained all the links in my latest post : Links Demystified

February 01, 2014

Siebel - Twitter Integration - Part 1: Authentication

This is post is second in series of Siebel Twitter Integration and will talk about logging in to twitter as an application.

Twitter has support two form of authentication, O-Auth Authentication and Application only authentication. For pulling tweets in Siebel we need Application only authentication, luckily which is technically easier than O-Auth and have more generous rate limits.






Before starting with Siebel configuration follow these steps:
  1. Create account on http://dev.twitter.com by agreeing to terms and conditions.
  2. Request to create your access token, and copy your Consumer Key and Consumer Secret.

Now copy paste following code to your repository, I prefer client side scripting as it easy to change.

StringToBase64 encoder

http://www.siebel-tech.com/2013/07/escript-base64-encoder/
This is piece of code is required for encoding the Client Key and Client Secret to Base64 before sending it to twitter. Developers at siebel-tech.com has done wonderful work in converting String to Base64, which saved me lot of time. Thanks Iain.

function StringToBase64(Inputs, Outputs)
{
  // *************************************************************************
  // Purpose: Encodes to a Base64 string
  // Author: Iain Ollerenshaw
  // Date: 30-Jul-2013
  //
  // Inputs: InString - string to be encoded
  // Outputs: Base64String - string in Base64
  //
  // Modification History
  //
  // Date          By                Details
  // 25-Jul-2013   Iain Ollerenshaw   Created
  // 2-Feb-2014    Jim  Updated
  // **************************************************************************

  try
  {

    // Define the Base64 codex
    var sCodex = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
    var sOutput = "";
    var sInput = Inputs.GetProperty("InString");
    var iLen = sInput.length;
    // Parse input string
    var iPos = 0;
    while (iPos < iLen)
    {
      var sChr1 = sInput.charCodeAt(iPos);
      iPos++;
      var sChr2 = sInput.charCodeAt(iPos);
      iPos++;
      var sChr3 = sInput.charCodeAt(iPos);
      // Shift bytes
      var iEnc1 = sChr1 >> 2;
      var iEnc2 = ((sChr1 & 3) << 4) | (sChr2 >> 4);
      var iEnc3 = ((sChr2 & 15) << 2) | (sChr3 >> 6);
      var iEnc4 = sChr3 & 63;
      if (isNaN(sChr2))
      {
        iEnc3 = iEnc4 = 64;
      }
      else if (isNaN(sChr3))
      {
        iEnc4 = 64;
      }
      sOutput +=(sCodex.charAt(iEnc1) + sCodex.charAt(iEnc2)+ sCodex.charAt(iEnc3) + sCodex.charAt(iEnc4));
      iPos++;
    }
    Outputs.SetProperty("Base64String", sOutput);  }
  catch(e)
  {    throw(e);  }
}

Get Description / Set Description

This is a small piece of code which helps to get the description of any LOV value, I have used LOV as scratch pad to store access token in this example, I will explain to store an maintain these in custom Twitter dashboard. I thought of saving them in system preferences first, but it only has 100 char limit thus had to switch over to LOV Description column.

function GetDescription (sType,sName)
{
var boListOfVal = TheApplication().GetBusObject("List Of Values");
var bcListOfVal = boListOfVal.GetBusComp("List Of Values");
bcListOfVal.ClearToQuery();   
bcListOfVal.ActivateField("Description");
bcListOfVal.SetSearchSpec("Name",sName);
bcListOfVal.SetSearchSpec("Type",sType);
bcListOfVal.ExecuteQuery();
if(bcListOfVal.FirstRecord()){
return(bcListOfVal.GetFieldValue("Description"));
}else return("none");
}


function SetDescription (sType,sName,sDesc)
{
var boListOfVal = TheApplication().GetBusObject("List Of Values");
var bcListOfVal = boListOfVal.GetBusComp("List Of Values");
bcListOfVal.ClearToQuery();   
bcListOfVal.ActivateField("Description");
bcListOfVal.SetSearchSpec("Name",sName);
bcListOfVal.SetSearchSpec("Type",sType);
bcListOfVal.ExecuteQuery();
if(bcListOfVal.FirstRecord()){
bcListOfVal.SetFieldValue("Description",sDesc);
bcListOfVal.WriteRecord();
}
}
LOVs look like:

Main code for Twitter login is as follows:


//Get Consumer Key and consumer Secret from LOV Description
var sConsumerKey = GetDescription("TWITTER_TOKEN","ConsumerKey");
var sConsumerSecret = GetDescription("TWITTER_TOKEN","ConsumerSecret");

//Encode Key and Secret into Base64
var inp = TheApplication().NewPropertySet();
var op = TheApplication().NewPropertySet();
inp.SetProperty("InString",sConsumerKey + ":" + sConsumerSecret);
StringToBase64(inp,op);


//Use EAI HTTP Transport to call Twitter API to login.
var httpSvc= TheApplication().GetService("EAI HTTP Transport");
var httpIn = TheApplication().NewPropertySet();
httpIn.SetProperty("HTTPRequestURLTemplate","https://api.twitter.com/oauth2/token?grant_type=client_credentials");
httpIn.SetProperty("HTTPRequestMethod","POST");
httpIn.SetProperty("HTTPIsSecureConn","TRUE");
httpIn.SetProperty("HTTPContentType","application/x-www-form-urlencoded;charset=UTF-8");
httpIn.SetProperty("HDR.Authorization","Basic " + op.GetProperty("Base64String"));
httpIn.SetProperty("HDR.Accept-Encoding","identity");
httpIn.SetProperty("HDR.User-Agent","something");
httpSvc.InvokeMethod("SendReceive", httpIn, Outputs);


//Transcode the JSON response into UTF-8
var oTransService = TheApplication().GetService("Transcode Service");
var oTransOutputs = TheApplication().NewPropertySet();
Outputs.SetProperty("ConversionMode", "EncodingToString");
Outputs.SetProperty("TargetEncoding", "UTF-16");
Outputs.SetProperty("SourceEncoding", "UTF-8");
oTransService.InvokeMethod("Convert", Outputs, oTransOutputs);
var sResponse = oTransOutputs.GetValue();


//Convert the JSON response to property set
var oJSONConverter = TheApplication().GetService("EAI JSON Converter");
oJSONConverter.InvokeMethod("JSONToPropSet",oTransOutputs,Outputs);

//extract access_token and clip
var token = Outputs.GetChild(0).GetProperty("access_token");
token = token.substring(1,token.length-1);


//Save the token for future use
SetDescription("TWITTER_TOKEN","EncodedTokenCredentials",token);


This access token will be used in all the future communications with twitter as authorization code.
Post version: Draft :) keep checking for more updates on explanations over the HTTP transport.