- Contents
Interaction Scripter Developer's Guide
CallObject.getAttribute Method
Definition
This method retrieves the value of the specified call object attribute. To assign a value, use the CallObject.setAttribute method.
Syntax
CallObject.getAttribute(Name);
Prototype
CallObject.getAttribute(
[in] string Name
[out] string Value
)
Input Parameters
- Name
-
The name of a call object attribute (e.g., CallID, StationName, Language, etc.) or a custom call attribute.
Return Values
- Value
-
The value of the requested attribute is returned as a string value (e.g., 1078924, KevinKPC, Spanish).
Example
scripter.myQueue.objectAddedHandler = ObjectAdded;
function ObjectAdded(ObjType, ObjId) {
// we only want call objects (type 2)
if (ObjType == 2) {
scripter.callObject.id = ObjId;
var campaign = scripter.callObject.getAttribute("IS_Attr_CampaignID");
var workgroup = scripter.callObject.getAttribute("AssignedWorkgroup");
if ((campaign < > "")) {
// move this page to the top
IS_Action_SelectPage.click();
// stop listening for object added notifications
scripter.myQueue.objectAddedHandler = null;
// pop the data
location.href = "pop.htm";
} else {
// we are not interested in this call
scripter.callObject.id = -1;
}
}
}