Popping up the Persistent Customer Dashboard

March 2nd, 2007

A while ago I was implementing the Persistent Customer Dashboard in Siebel 7.8. Generally, the dashboard is linked into CTI and auto-populates customer details when successfully matching an incoming phone number, after which all the customer info remains visible to the user no matter where else they navigate in the application. Some variation of the functionality is standard in most call centres.This particular client wanted to use the functionality in a more manual scenario though, with the users querying for the customer before manually populating the dashboard. That’s pretty easy to do, invoking the ‘Update Dashboard’ method on the Persistent Customer Dashboard business service.

The first complication was that the client didn’t want the dashboard visible by default - I needed to have it open up and populate on demand. That turned out to be also not too tricky: there’s an ‘OpenDashboard’ method on the same Persistent Customer Dashboard business service that does exactly what is says on the tin. [Note: 'OpenDashboard' (no space) and 'Update Dashboard' (with space). Intuitive, non?]

The tricky thing was that we needed to open the dashboard, update the dashboard details and update the source applet - all from a single button click. Problem: the dashboard and the source applet are in different frames, and only one frame can be updated from one UI event. So if I updated the Dashboard, the update to the source applet didn’t happen. And if I updated the source applet…

The solution was to create a second button on the applet to trigger dashboard update in a server script. Add in a browser script to handle the method for the first button, opening up the dashboard from there - and allowing the source applet updates to happen - before using FindActiveXControl to programmatically ‘click’ the second button - giving us a second UI event and the opportunity to populate the dashboard.

Code below…

Server script ‘Update Dashboard’

// Populate the persistent customer dashboard
var bsDashboard;
var psInputs;
var psOutputs;
var AccountId;

bsDashboard = TheApplication().GetService("Persistent Customer Dashboard");

psInputs = TheApplication().NewPropertySet();
psOutputs = TheApplication().NewPropertySet();

AccountId = this.BusComp().GetFieldValue("Account Id");

if( AccountId != "" )
{
psInputs.SetProperty("Source Name","Base View");
psInputs.SetProperty("Buscomp Name", "Account");
psInputs.SetProperty("RowId", AccountId);
bsDashboard.InvokeMethod("Update Dashboard", psInputs, psOutputs);
}

Browser script ‘Select Customer’

// Open up the Persistent Customer Dashboard
var svc = theApplication().GetService('Persistent Customer Dashboard');
var inputs = theApplication().NewPropertySet();
var outputs =theApplication().NewPropertySet();
outputs = svc.InvokeMethod('OpenDashboard', inputs);

// Click the custom 'To Dashboard' button
var obj = this.FindActiveXControl("UpdateDashboard");
// obj.all[0].all[0] locates the Anchor tag.
obj.all[0].all[0].click();

Entry Filed under: Scripting, Siebel

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

March 2007
M T W T F S S
« Feb   Apr »
 1234
567891011
12131415161718
19202122232425
262728293031  

Most Recent Posts