Examples of Using Customer Dashboard Commands with Scripts
The examples in this topic use Customer Dashboard commands to do the following:
Get the contact ID, Field 4, and Field Time of the current record in the Customer Dashboard.
Print values of the contact ID, Field 4, and Field Time to a file.
Example of Using Customer Dashboard Commands with Siebel eScript
The following example script is written in Siebel eScript. For more information, see Siebel eScript Language Reference:
function Script_Open ()
{
var fn1=Clib.fopen("d:\\sabari5.txt", "wt");
var bs = TheApplication().GetService("Persistent Customer dashboard");
var inpargs= TheApplication().NewPropertySet();
var outargs = TheApplication().NewPropertySet();
bs.InvokeMethod("GetCurrentContactId",inpargs,outargs);
var fvalue = outargs.GetProperty("Contact Id");
Clib.fprintf (fn1, "The current id in the dashboard = %s \n",fvalue);
inpargs.SetProperty("Field Name","Field 4");
bs.InvokeMethod("GetDashboardFieldValue",inpargs,outargs);
var fvalue = outargs.GetProperty("Field Value");
Clib.fprintf (fn1, "The Account Name in the dashboard = %s \n",fvalue);
inpargs.SetProperty("Field Name","Field Time");
bs.InvokeMethod("GetDashboardFieldValue",inpargs,outargs);
var fvalue = outargs.GetProperty("Field Value");
Clib.fprintf (fn1, "The current time of the agent/customer in the dashboard =
%s \n",fvalue);
Clib.fclose(fn1);
return(ContinueOperation);
}
Example of Using Customer Dashboard Commands with Siebel Visual Basic
The following example script is written in Siebel Visual Basic. For more information, see Siebel VB Language Reference:
Sub Script_Open
Dim bs as Service
Dim inpargs as PropertySet
Dim outargs as PropertySet
Dim fvalue as String
Open "d:\sabari.txt" for Output as #1
Set bs = TheApplication().GetService("Persistent Customer dashboard")
Set inpargs = TheApplication.NewPropertySet
Set outargs = TheApplication.NewPropertySet
bs.InvokeMethod "GetCurrentContactId",inpargs,outargs
fvalue = outargs.GetProperty("Contact Id")
Write #1, "The current id in the dashboard = " & fvalue
Inpargs.SetProperty "Field Name","Field 4"
bs.InvokeMethod "GetDashboardFieldValue",inpargs,outargs
fvalue = outargs.GetProperty("Field Value")
Write #1," The Account Name in the dashboard = "& fvalue
Close #1
End Sub