Tuesday 12 December 2017

Load Employees in Siebel : Reading Data from Excel File using Clib Methods

Hello All,

In my previous posts about Loading Employees in Siebel i described the process through CSV file and IO based approach and Excel based approach. Now in this post lets try to load employees using Clib methods by reading a csv file.

In this post lets achieve the requirement using Clib methods like ,


Sample Code,

   var str;
   var usageAry = new Array();
   var filePath = "C:\\Employee.CSV";  //file path to place CSV file
   var oFile = Clib.fopen(filePath,"rt");  // Open file in read Mode
   var out;
   if(oFile != null)
   while(!Clib.feof(oFile))                  //check for end of file
   str = Clib.fgets(oFile);
   usageAry = str.split(",");               // Delimiter to separate data from the file
   var FirstName = usageAry[0];
   var LastName = usageAry[1];
   var PhoneNumber = usageAry[2];
   var Email = usageAry[3];
   var LoginName = usageAry[4];
   var Position = usageAry[5];
   var Responsibility = usageAry[6];

Now we have values in variables which we can pass to siebel for inserting record, you can use below script.

//Initialize BC and Insert data
   var oBOEmp = TheApplication().GetBusObject("Employee"); 
   var oBCEmp = oBOLdVal.GetBusComp("Employee"); 
   ActivateField("Last Name"); ActivateField("First Name"); ActivateField("Email"); 
   ActivateField("Phone Number");  ActivateField("Login Name");   
   SetFieldValue("Last Name",LastName); SetFieldValue("First Name",FirstName);       SetFieldValue("Email",Email); 
   SetFieldValue("Phone Number",PhoneNumber); SetFieldValue("Login Name",LoginName); 
   //Insert Responsibility Now 
var RespBC = GetMVGBusComp("Responsibility");
var AssocBC = RespBC.GetAssocBusComp();
//   TheApplication().RaiseErrorText(PrRecord + AssocBC);
//search for the responsibility 
SetSearchSpec("Name", Responsibility);
var Respfound = FirstRecord();

//Insert Position Now
var PostnBC = GetMVGBusComp("Position");
var AssocPostnBC = PostnBC.GetAssocBusComp();
//search for the position 
SetSearchSpec("Name", Position);
var PosFound = FirstRecord();
   WriteRecord(); //save record

sample csv file looks like, 

your suggestions and comments are always welcome :-) ,for exact code you can mail me.

Wednesday 22 November 2017

Load Employees in Siebel : Reading Data from Excel File

Hello All,

In my previous post about Loading Employees in Siebel i described the process through CSV file and IO based approach.

In this post lets achieve the requirement with excel file and business service.


  • Excel application installed on the machine (server), so this approach works only in Windows Environment.
  • Accessible location where we need to place the Excel file

Formating the Excel File :

Here we are entering data from 2nd Row.

Now we need to write a business service that reads data row by row and insert data in siebel. Since we are reading data in terms of rows and columns, so 2nd Row 2nd column will fetch value Rahul , and 3rd Row 2nd column will fetch Ankit and this will be our base of iterating through the excel sheet.

Final Code :

  • Reading Excel and Initializing BO and BO

  var ExcelApp = COMCreateObject("Excel.Application"); 
  ExcelApp.Visible = false; 
  var oBOEmp = TheApplication().GetBusObject("Employee"); 
  var oBCEmp = oBOLdVal.GetBusComp("Employee"); 

  • Getting value from Excel columns 
 while(ExcelApp.ActiveSheet.Cells(i,1).Value!= null) 
// Give the fields here 
// Employee Details
   var LastName = ExcelApp.ActiveSheet.Cells(i,1).Value; 
   var FirstName = ExcelApp.ActiveSheet.Cells(i,2).Value;   
   var Email = ExcelApp.ActiveSheet.Cells(i,3).Value;  
   var PhoneNumber = ExcelApp.ActiveSheet.Cells(i,4).Value; 
   var LoginName = ExcelApp.ActiveSheet.Cells(i,5).Value; 

   //Position Details
   var Position = ExcelApp.ActiveSheet.Cells(i,6).Value; 
   //Responsibility Details
   var Responsibility = ExcelApp.ActiveSheet.Cells(i,7).Value;  

  • Setting Fields Value and Invoking New Record     
   SetFieldValue("Last Name",LastName); 
   SetFieldValue("First Name",FirstName);  
   SetFieldValue("Phone Number",PhoneNumber);
   SetFieldValue("Login Name",LoginName); 

  • Closing Excel File 
 ExcelApp = null; 

Refer exact code and sample file here .. You can mail me for any comments or suggestions.

Tuesday 21 November 2017

Read CSV File in Siebel : Working with Multiple Records

Hello All,

In Previous post we created a process to read CSV file and insert Employee data in Siebel Application. The data was simple with employee details, a primary position and a primary responsibility.

Suppose we have a case where we have to insert multiple positions or multiple responsibility with the record, what shall be the changes in that case in our CSV file or is there any other approach for this ?

Well we can handle the above case with our old CSV itself, we just need to make multiple entries for the records as show in screenshot below

here for the same employee data we are making multiple entries of Position and Responsibility and will use Upsert method of EAI Siebel Adapter business service.

For the first row record will be inserted and for the consecutive rows record will be updated.

Second Approach,

Using XSLT Transformation, we can write a XSL file that formats the xml (first convet CSV to XML) in the desired format to group the repeating records. Once formatted the XML can be converted to IO hierarchy and passed to EAI Siebel Adapter.

Both approach are good and depends on users comfort and skill set as second one require good XSL knowledge whereas first one just need data duplication.

for exact code you can mail me ...Happy Learning

<<Previous Post>>                                      <<Next Post>>

Sunday 12 November 2017

Exploring Siebel Vanila Business service : PRM ANI Utility Service

Hello All,

Siebel Application provides a lot of vanilla business services which make it very easy to map any type of requirement/process in the system.

Recently i was working on a Outbound web service where in i needed to provide Input as Hierarchy format based on External IO. So i needed sample IO structure and pass values in the hierarchy.

PRM ANI Utility Service's CreateEmptyPropSet method can be used for this purpose.

This BS takes in Input IO name and using Create Empty Hierarchy method generates empty container hierarchy.

Passing IO Name to Get Blank Hierarchy

Output Blank Hierarchy 

Now Since we have the Input hierarchy container, only thing left is to add nodes in the Input hierarchy (click to see detailed description add elements in the Hierarchy) for this Echo Method of Workflow Utility BS can be used.

value can be set by traversing the hierarchy using .(dot) operator
e.g. IOHierarchy.ListOfRequestReceived.RequestReceived.ACTIVITY_TYPE

Final Hierarchy after setting node values

Now this Hierarchy can be fed as input to Proxy Business service to get the required result.

Load Employees in Siebel From CSV FIle : Read CSV File in Siebel

Hello All,

Recently i got a requirement where i had to load Employees in Siebel Application from CSV/Excel file.

There are various approach to achieve this.

1. Create a Business Service and Read excel file using, click here to view example
 COMCreateObject(Excel.Application), it has limitation that it is supported only with windows

2. Create a CSV file a read data using clib() functons like  
   Clib.fputs(sHello, oFile);
   Clib.fgets (nLen, sHello);

3. Using Macros in Excel which in turn calls VB Script and loads data 

4. And my favourite :-), Read CSV File Business Service.

I will explain Read CSV File and its use in this post.

Business Service : Read CSV File

Method Name
Creates an Hierarchy from CSV file.
Converts a Hierarchy to XML format.                              
Input/Output Parameters 

Method Name 
Name and location of File which needs to be loaded eg. C:\Siebel\8.1\Tools_1\TEMP\Employee.csv 
Deletes a file after reading
Max errors allowed before error out
In (Out): Number of records allowed (processed).
Output Hierarchy converted from CSV file structure

Working Example:

Business Case : Need to Load Employees in Siebel from provided CSV file.

Solution : Workflow with following steps 

1. Prepare CSV file for the data format, 

# IO Name 
Field Value,Field1 Value,Field2 Value,Field3 Value

CSV file should be in the format to include IO name in Header, IC and Fields name in sub header with values following from next line.
Note: IO and IC fields must be properly mapped to CSV else workflow will through data error

2. Read CSV file ,Step to read Data from CSV

Provide the location of CSV file and call Business service, refer screenshot below for more details

3. EAI Siebel Adapter, Step to insert data in Siebel 

Pass the output of Previous step to EAI Siebel Adapter and it will insert the record in Siebel Database.

Any Data Validation/Mapping can be done before this step as this step creates the Employee in system.

for more details please refer, Import Marketing Contact vanilla workflow in Siebel tools.
For sample CSV format you can mail me...Happy Learning

<<Next Post>>                      <<Load Multiple data using CSV method>>

Friday 6 October 2017

Notifications in Siebel Open UI : Part 2

Hello All,

In this article i will show configuration for Facebook like assignment Notification in siebel for Service Request assignment.

Manual notification can be set from Administration Communication --> Message Broadcast screen details about how to set can be viewed in this article http://www.siebelfoundations.com/2017/09/notifications-in-siebel-open-ui.html

Rich Notifications

Detailed Notification 

In this article let's try this to automate this via Workflow Policy. We need to set up a Workflow policy and define action for it.

  • Defining Workflow Action 

  • Defining Message Broadcast in Policy Action

Here Define the Subject, "This is Testing" in my case 
Message Template, here define the message and Field Substitutions
Also in the bottom applet we can define the Recipient of the call ,it can be set to Position or Employee  

  • The Next Step is to define a Workflow Policy and Associate the Action with it
once our workflow policy is defined we need to regenerate triggers and add it to Workflow Monitor Agent.
I will cover the steps to generate trigger in my next post.

Wednesday 13 September 2017

Notifications in Siebel Open UI

Hello All,

In this post lets us discuss some change in Siebel Notifications and Message Broadcast in Open UI.

  • In Siebel HI, scroll messages appeared in the message bar at bottom of the screen.
  • Also, messages can appear in an alert dialog box in the middle of the screen and in the message bar at the bottom of the screen
In Siebel Open UI Notifications and Broadcast Messages are displayed in in notification panes that users access by clicking the Notification icon located at top Right corner, and blinks in different color depending on type of Notification.
It's Much similar to how notifications are displayed in Facebook or Gmail where a highlighted text is displayed above various notification icons.

                                  Sample Facebook Notifications

Notification on Top Right in Siebel 

Notification Summary Detail

These Notification and Messages are Picked from Administration Communication --> Message Broadcast screen. For Custom message(Broadcast Messages) we can explicitly make a record here and can set the visibility of Message to User Specific, Position Specific or Division Specific as shown in below applet and it will appear in Notification Bar.

For Other System Notifications (Report Generation, Call Assignment) an entry is made here in Broadcast Message BC implicitly by Siebel internal processes and is displayed as Notification to user.

I will cover more details of how we can set custom notification on certain events in next article.

Tuesday 29 August 2017

Siebel Open UI Enhancement : Fixing Text Area using jQuery

Hello All,

In this post i will provide some alternate solution to text area type fields which in Open UI have elastic control property.
In HI mode there used to be an icon on Text Area fields and on click of the icon a new popup opened and we could write and read the text easily which has been replaced by elastic control in open UI.

here, we are calling a jQuery plugin to dispaly the content of text area in a popup.

also, the issue can also be fixed without using 3rd party jquery plugin but that solution is restrictive, you can refer the link http://www.siebelfoundations.com/2015/09/fixing-text-area-issue-in-siebel-using.html


  • Content of Text Area field displayed in Separate window popup
  • UI is Blocked till we explicitly close the popup
  • We can call the popup in multiple events like mouse hover, Click , Double click
  • We are using lobibox plugin from https://lobianijs.com/site/lobibox

Working demo is as shown below

Sample Code

$('[aria-label="SR Description"]').click(function(){
Description = pm.ExecuteMethod( "GetFieldValue", cntrl );
Lobibox.window({title: 'Description of Field',
content: Description});
here, Lobibox.window({title: 'Description of Field', content: Description}); is calling the popup with title and value of text are as content

Sample Video 

you can email me for the exact PR file. Your comments are suggestion are most welcome.

Siebel Open UI Enhancement : CountDown Timer

Hello All,

In this post let me demonstrate you Countdown timer API in Siebel Open UI.
When working with siebel application like call center or Siebel Service we often have SLA/Time frame for a particular call in which we need to close the request.

In this article i have tried implementing jQquery Countdown function that calculates the remaining time for call escalation and popups user for the SLA time remaining.

We can configure this on any event like click , mouse hover, on focus etc.

I have configured this for click event.


  • No need of manual calculation just pass the date in jQuery function and it will calculate the time 
  • Time calculated is accurate to Seconds
Sample Code

         var span = '<span id="CountDown"></span>';    /// Create a span to hold the time value

$('#CountDown').countdown('2017/08/30'.on('update.countdown', function(event) {
 var $this = $(this).html(event.strftime(''
+ '<span>%-w</span> week%!w '
+ '<span>%-d</span> day%!d '
+ '<span>%H</span> hr '
+ '<span>%M</span> min '
+ '<span>%S</span> sec'));
/// function to set the time in HTML of span element created above, also need to pass date in this code

      Timeleft = $('#CountDown').text();   /// get the time value in a variable

Below is the sample working example.

Sample Video 

you can email me for the exact PR file. Your comments are suggestion are most welcome.

Tuesday 22 August 2017

Siebel Open UI Enhancement :- Progress Bar in Siebel

Hello All,

In this post i will demonstrate a very useful API, Progress Bar Indicator. There are various areas where this API fits well as listed below

  • Opportunity Win/Loss Percentage
  • Order Status 
  • Service Request SLA

In the below example the API takes value from Probability field on the form and displays the progress bar as per the percentage.

I would like to thank Sandip Mitra for his valuable inputs in this.

Sample Code and Explain-out

1. Identify a placeholder to place ProgressBar, either identify an existing placeholder or create a new one for placing progress bar.

$('.GridBorder').after('<div id="progressBar"><div></div></div>');

2. Set the Display properties by CSS  for your generated ProgressBar, parameters are defined in CSS .  

You can either add inline CSS as we are doing in this example or create a new CSS file,please refer this post for steps about how to add a new css in siebel 

  "width": "auto",  
   "height": "30px",  
   "margin": "10px",   
  "border": "2px solid #111",    
 "background-color": "#292929" 

  $('#progressBar div').css({  
 "height": "100%",    
 "color": "#fff",  
   "text-align": "right",    
 "line-height": "28px",   
   "width": "0",    
 "background-color": "#0099ff"   

3. Set the animation in ProgressBar.

We are using animate function of jquery library to show the progress bar, please refer the link ,https://www.w3schools.com/jquery/jquery_animate.asp

to explain the basic,  

progressBarWidth = percent * $('#progressBar').width() / 100;

$('#progressBar').find('div').animate({ width: progressBarWidth }, {duration: 5000,easing: "linear"}).html(percent + "% ");

here in animate function we need to pass:-


selector, the Id of our created DIV $('#progressBar')

{styles}, styles for animation like width , height, etc..
easing, the movement of progress linear or non-linear 

callback, function to be executed after the animation 

4. Get the actual value of Probability from Probability field from form.

Get the value of control using PR file 

     var pm = this.GetPM();
    var controls = pm.Get("GetControls");
    var cntrl = controls[ "Probability" ];
    var percent = pm.ExecuteMethod( "GetFieldValue", cntrl );

5. Write custom logic to refresh and load the Bar where ever required.

Working Example looks like,

Video for the working Example,

you can email me for the exact PR file. Your comments are suggestion are most welcome.

Saturday 19 August 2017

Siebel Open UI Enhancement : Bar Code Plugin

Hello All,

In this article i have tried to implement Bar Code generator plugin that can convert Siebel Number and Id fields in Bar Code format  in real time.
This Example is based on JQuery and is full customizeable.

Working Example 

Sample Code and Explain-out

1. Include jquery-barcode.js file ,this file can be downloaded from  http://www.jqueryscript.net/other/Simple-jQuery-Based-Barcode-Generator-Barcode.html and is required for the plugin to execute

2. Identify a placeholder to place BarCode, either identify an existing placeholder or create a new one for placing barcode

3. Set the Display parameters for your generated BarCode, parameters are defined in Settings 

 var settings = {
 output: "css",
 bgColor: "#F5F5F5",  // colour for barcode background
 color: "#000000",       // colour for barcode
 barWidth: "2",            //  Width of bars
 barHeight: "50",
 moduleSize: "5",
 posX: "10",
 posY: "20",
 addQuietZone: "1"

Sample PR file 

if (typeof(SiebelAppFacade.BarCode) === "undefined") {

define("siebel/custom/BarCode", ["siebel/phyrenderer","siebel/custom/jquery-barcode"],
function () {
SiebelAppFacade.BarCode = (function () {
function BarCode( pm ){
                /* Be a good citizen. Let Superclass constructor function gets executed first */
                SiebelAppFacade.BarCode.superclass.constructor.call( this, pm );
                /* Static List of Control Identifier which will be displayed in Carousel; */          
            SiebelJS.Extend( BarCode, SiebelAppFacade.PhysicalRenderer );

BarCode.prototype.ShowUI = function(){
                SiebelAppFacade.BarCode.superclass.ShowUI.call( this );
//get applet id and create new Id

var pm = this.GetPM();
var controls = this.GetPM().Get("GetControls");
                         var cntrl = controls[ "Service Number" ];
                         var ServiceNumber = pm.ExecuteMethod( "GetFieldValue", cntrl ); // Value as input to pass to generate barcode

 // settings for bar code display
var settings = {
 output: "css",
 bgColor: "#F5F5F5",
 color: "#000000",
 barWidth: "2",
 barHeight: "50",
 moduleSize: "5",
 posX: "10",
 posY: "20",
 addQuietZone: "1"

// add a new container before applet data

$('.GridBorder').before('<div id="barcode"></div>');

// append bar code in DIV

ServiceNumber, // Value barcode (dependent on the type of barcode)
"ean13", // type (string)
settings // parameters


    BarCode.prototype.BindEvents = function () {
SiebelAppFacade.BarCode.superclass.BindEvents.call ( this );

var pm = this.GetPM();


return BarCode;
return "SiebelAppFacade.BarCode";

Your Comments are most welcomed ..

Tuesday 15 August 2017

Siebel Auto Complete Plugin :- Part 1

Hello All,

In Siebel Dropdown fields (LOV) we have option to enter some Letter and related Option are shown in Dropdown, as shown in below image.

But in Normal Text Fields we have to enter the complete information there is no option of auto-complete.
We can extend the Option for auto fill for normal text fields also by the below mentioned Method.

  • We need to use a 3rd party Plugin that Offers Auto Complete option
  • I am using file from TypeAhead, http://twitter.github.io/typeahead.js/
  • Include the file in Our PR file 
  • Call Method in PR file
  • We can either retrieve the Option from Fixed set of value as in this example or From a file (.txt) or at run-time by querying Database (will take this in further articles)
Sample PR Code 

you can download typeahead.js file and PR file from here

PR File : https://drive.google.com/open?id=0B52024rQ9Hc0NXQxWTR1TEtUbzg
JS file : https://drive.google.com/open?id=0B52024rQ9Hc0LURFbTQ1aDNiTzg

if (typeof(SiebelAppFacade.AutoComplete) === "undefined") {

define("siebel/custom/AutoComplete", ["siebel/phyrenderer","siebel/custom/typeahead"],
function () {
SiebelAppFacade.AutoComplete = (function () {
function AutoComplete( pm ){
                /* Be a good citizen. Let Superclass constructor function gets executed first */
                SiebelAppFacade.AutoComplete.superclass.constructor.call( this, pm );
                /* Static List of Control Identifier which will be displayed in Carousel; */

            SiebelJS.Extend( AutoComplete, SiebelAppFacade.PhysicalRenderer );

AutoComplete.prototype.ShowUI = function(){
                SiebelAppFacade.AutoComplete.superclass.ShowUI.call( this );
var pm = this.GetPM();


/// bind events function
     AutoComplete.prototype.BindEvents = function(){
SiebelAppFacade.AutoComplete.superclass.BindEvents.call( this );
var pm = this.GetPM();
var controls = this.GetPM().Get("GetControls");

// read out Description field
$('[aria-label="Alternate Phone #"]').dblclick(function(){

// var controls = pm.Get( "GetControls" );
             var cntrl = controls[ "Description2" ];
// alert(controls);
var Status = pm.ExecuteMethod( "GetFieldValue", cntrl );
responsiveVoice.speak( Status );


 var substringMatcher = function(strs) {
 return function findMatches(q, cb) {
var matches, substringRegex;

// an array that will be populated with substring matches
matches = [];

// regex used to determine if a string contains the substring `q`
substrRegex = new RegExp(q, 'i');

// iterate through the pool of strings and for any string that
// contains the substring `q`, add it to the `matches` array
$.each(strs, function(i, str) {
 if (substrRegex.test(str)) {


var states = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California',
 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii',
 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana',
 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota',
 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire',
 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota',
 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island',
 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont',
 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'

//$('#1_Last_Name').typeahead({    /// tt-menu  tt-open

$('[aria-label="Alternate Phone #"]').typeahead({
 hint: true,
 highlight: true,
 minLength: 1
 name: 'states',
 source: substringMatcher(states)

  //define colour, Border and Width Scheme

$('.tt-menu').css({ "background": "#F5F5F5", "width": "155px","border-style": "solid"})


return AutoComplete;
return "SiebelAppFacade.AutoComplete";

Working Example of the above is :

Will be sharing further advaced option te fetch data from Files and Siebel Database in further Articles.
Your Comments are most welcomed ..

Thursday 3 August 2017

Siebel Open UI Enhancement ,Part 4: Siebel Voice Commands, SIBI The Final API

Hello All,

In the previous articles of this series i explained text to speech functionality and speech to Text functionality.Here i will be sharing some 

Text To Speech : http://www.siebelfoundations.com/2017/05/siebel-open-ui-enhancement-text-to.html

Text To Speech Advanced : http://www.siebelfoundations.com/2017/05/siebel-open-ui-enhancement-part-3-text.html

Speech To Text : http://www.siebelfoundations.com/2017/05/siebel-open-ui-enhancement-part-2.html

So here in this article i am explaining my final version, this post will demonstrate how Siebel can listen Voice Inputs and perform necessary actions. I call it SIBI

Siebel Voice Commands :

  • This functionality listens users voice as input and Understands commands like , Create a new record, Delete an Existing record, Navigate to next Record and Update a Existing Record
  • User will be able to enter value in any Field by speaking out the text and this API will write the value in field without typing 
  • User Needs to Double Click on the fields to Start entering value in the Form.
  • No 3rd party API or plugin has been used for this 
  • Its default feature of HTML5

Video Demo for the above is:

You can Download sample code here :
So Make Siebel Listen to You ;-) by trying SIBI.
Please share your views about SIBI. Your suggestions are most welcome..

<<<<<<<< Previous in the Series >>>>>>>>>   

Sunday 21 May 2017

Siebel Open UI Enhancement ,Part 3: Text to Speech API, Enhanced

Hello All,

In the previous article of the series i explained text to speech functionality on button click.


One of reader advised me if we could extend this for multiple fields,

  • There should not be a button that reads just one field 
  • Different fields could be read by Siebel 
So, i tried to implement this with the approach 
  • find a event to trigger speech , for this i used double click 
  • on the event call Speak() method 
  • Pass value of field in Speak()
Sample PR File

The code is similar as explained in previous post. The working sample looks like 

In my next post i will be sharing Speech to Text conversion functionality in Siebel.

<<<<<<<<Next in the Series >>>>>>>>>

Siebel GoTo View - Handling Realtime cases

 Hello All,  We all must have used GoTo view functionality of siebel to navigate to a particular view from current view. What if the require...