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();
3 Comments Add your own
1. Sireesha | June 30th, 2011 at 3:48 pm
hi, I am working on this dashboard functionality, the challenge I am facing is alignment of the labels on the dashboard.
Currently labels are getting right aligned but the requirement is the left alignment. Could you help with this.
2. Eswar | July 12th, 2011 at 6:50 pm
Hi,
“obj.all[0].all[0].click();”
can you please explain me what this does exactly. i have a similar requirement (desc below).
when user sets contact status to “Deceased”, a warning mesage should popup saying “R U sure ?”, if user clicks “OK” a Contact Popup applet should open. I tried the sample code shown above
“var obj = this.FindActiveXControl(“UpdateDashboard”);
obj.all[0].all[0].click(); ”
but this is not working. Can you please expain me “obj.all[0].all[0].click(); “?
thanks,
eswar
3. Eswar | July 12th, 2011 at 7:51 pm
To Add more details related to my part of code:
In BC: preset Event, i wrote the below code:
if (fieldName == “Type” && value == “Deceased”)
{
if(confirm(“Are you sure you want to Decease the Contact?”))
{
theApplication().SetProfileAttr(“SKTLContactId”, “true”);
}
//else (when cancel button is clicked)
*******
In Applet PreInvoke Event i wrote the below code:
if (name == “PostChanges”)
{
var strDecea = theApplication().GetProfileAttr(“SKTLContactId”);
if (strDecea == “true”)
{ theApplication().SetProfileAttr(“SKTLContactId”, “false”);
var obj = this.FindActiveXControl(“ShowPopup”); // i created a control called ShowPopup
obj.all[0].all[0].click();
}
}
thanks,
eswar
Leave a Comment
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