Universal Queue Classes

This chapter provides an overview of the universal queue classes and discusses the following topics:

Click to jump to parent topicUnderstanding Universal Queue Classes

The universal queue classes provide the means by which applications can inspect objects that are processed by the queue server, such as tasks, agents, and queues. The classes also enable tasks to reenter the queue with their original task ID, as well as keep task times based on its original entry into the system.

All of the classes, and most of the properties and methods that make up the universal queue classes have a GUI representation in the PeopleSoft Multi-Channel Framework. This document assumes that the reader is familiar with PeopleSoft Multi-Channel Framework.

See Also

Understanding PeopleSoft MultiChannel Framework

Click to jump to parent topicMCFFactory Class Hierarchy

The MCFFactory class is the root class from which the other classes are derived. Instantiate an object in this class, then traverse down the properties to inspect other individual objects, such as tasks, agents or queues. You can also instantiate individual MCFFactory objects directly and inspect their properties.

MCFFactory class hierarchy

Click to jump to parent topicScope of the Universal Queue Classes

The universal queue classes can be instantiated only from PeopleCode.

The universal queue classes can be called from a component, an internet script, or an Application Engine program.

Universal queue classes can be of Local, Global, or Component scope.

Click to jump to parent topicData Types of the Universal Queue Classes

Every universal queue class is its own data type, that is, Agent objects are declared as data type Agent, LogicalQueue objects are declared as type LogicalQueue, and so on.

The following are the data types of the universal queue classes:

Click to jump to parent topicHow to Import Universal Queue Classes

The universal queue classes are not built-in classes, like rowset, field, record, and so on. They are application classes. You must import the universal queue application package before you can use the classes in your PeopleCode program.

An import statement names either all the classes in a package or one particular application class. For importing the universal queue classes, PeopleSoft recommends that you import all the classes in the application package.

The application package PT_MCF_UQAPI contains the following sub-packages:

The import statements you should use are as follows:

import PT_MCF_UQAPI:Agent:*; import PT_MCF_UQAPI:AgentPhysQueueProps:*; import PT_MCF_UQAPI:AgentPhysQueueTasks:*; import PT_MCF_UQAPI:Broadcast:*; import PT_MCF_UQAPI:LogicalQueue:*; import PT_MCF_UQAPI:MCFFactory:*; import PT_MCF_UQAPI:PhysicalQueue:*; import PT_MCF_UQAPI:Task:*; import PT_MCF_UQAPI:TaskList:*; import PT_MCF_UQAPI:Util:*;

Using the asterisks after the package name makes all the application classes directly contained in the named package available. Application classes contained in subpackages of the named package are not made available.

See Also

Application Classes

Click to jump to parent topicHow to Create a Universal Queue Object

After you've imported the universal queue classes, you instantiate an object of one of those classes using the constructor for the class and the Create function.

The following example creates a new instance of the MCFFactory class, as the variable &MyMCFFactory, with local scope:

Local MCFFactory &myMCFFactory = Create MCFFactory ();

See Also

Universal Queue Classes Constructors

Click to jump to parent topicUniversal Queue Classes Built-in Functions

DeQueue

EnQueue

Forward

InitChat

MCFBroadcast

NotifyQ

Click to jump to parent topicUniversal Queue Classes Constructors

You must use the constructor for each class to instantiate an instance of that class. The following are the constructors for the universal queue Classes.

Click to jump to top of pageClick to jump to parent topicAgent

Syntax

Agent(AgentID)

Description

Use the Agent constructor to instantiate an Agent object.

All objects encapsulated by this object are created when the constructor is called.

Note. When an MCFFactory object is created, Agent objects are automatically created. In this case, the number of tasks in the list is limited by the MAX_TASKLIST_ITEMS parameter used when creating the MCFFactory object.

Parameters

AgentID

Specify a valid AgentID as a string.

Returns

An Agent object.

Example

Create Agent(&AgentID);

See Also

Agent Class

Click to jump to top of pageClick to jump to parent topicAgentPhysQueueProps

Syntax

AgentPhysQueueProps(AgentID, PhysicalQueueID)

Description

Use the AgentPhysQueueProps constructor to instantiate an agent physical queue properties object.

Parameters

AgentId

Specify as valid AgentId as a string.

PyhscialQueueId

Specify a PhyscialQueueId as a string.

Returns

An agent physical queue properties object.

See Also

AgentPhysQueueProps Class

Click to jump to top of pageClick to jump to parent topicAgentPhysQueueTasks

Syntax

AgentPhysQueueTasks(AgentID, PhysicalQueueID)

Description

Use the AgentPhysQueueTasks constructor to instantiate an agent physical queue task object.

Parameters

AgentID

Specify an agent ID as a string.

PhysicalQueueID

Specify a PhysicalQueueID as a string.

Returns

An agent physical queue task object.

See Also

AgentPhysQueueTasks Class

Click to jump to top of pageClick to jump to parent topicBroadcast

Syntax

Broadcast()

Description

Use the Broadcast constructor to instantiate a Broadcast object.

Parameters

None.

Returns

A Broadcast object.

See Also

Broadcast Class

Click to jump to top of pageClick to jump to parent topicLogicalQueue

Syntax

LogicalQueue(LogicalQueueID)

Description

Use the LogicalQueue constructor to instantiate a LogicalQueue object.

Parameters

LogicalQueueID

Specify the ID of a logical queue as a string.

Returns

A LogicalQueue object.

Example

Local LogicalQueue &MyLogQueue = Create LogicalQueue(&LogicalQueueID);

See Also

LogicalQueue Class

Click to jump to top of pageClick to jump to parent topicMCFFactory

Syntax

MCFFactory([MAX_TASKLIST_ITEMS])

Description

Use the MCFFactory constructor to instantiate an MCFFactory object.

Parameters

MAX_TASKLIST_ITEMS

Specify the maximum number of tasks loaded on a TaskList.

Returns

An MCFFactory object.

Example

Local MCFFactory &myMCFFactory = Create MCFFactory(MAX_TASKLIST_ITEMS);

See Also

MCFFactory Class

Click to jump to top of pageClick to jump to parent topicPhysicalQueue

Syntax

PhysicalQueue(PhysicalQueueID)

Description

Use the PhysicalQueue constructor to instantiate a PhysicalQueue object. All objects encapsulated by this object are created when the constructor is called.

 

Note. When an MCFFactory object is created, the PhysicalQueue objects are automatically created. In this case, the number of tasks in the list is limited by the MAX_TASKLIST_ITEMS parameter used when creating the MCFFactory object.

Parameters

PhysicalQueueID

Specify a physical queue ID as a string.

Returns

A PhysicalQueue object.

Example

Local PhysicalQueue &myPhysicalQueue = Create PhysicalQueue(&PhysicalQueueID);

See Also

PhysicalQueue Class

Click to jump to top of pageClick to jump to parent topicTask

Syntax

Task(TaskNumber)

Description

Use the Task constructor to instantiate a task object.

Only persistent tasks (email and generic tasks) are available for introspection. Each persistent task goes through a lifecycle that is recorded by the following statuses:

State

Indicated Action

Status of Task Object

Enqueued by the universal queue server

Enqueued

ENQ

Universal queue assigns to physical queue

Assigned

ASGN

Agent accepts task

Accepted

ACPT

Agent completes task

Done

DONE

Task is not accepted within the overflow (action) time period

Overflowed

OVFL

Agent does not complete task or task not assigned within the escalation (complete) time period

Escalated

ESCL

Inderminate Task (task not found in system)

Indeterminate

IND

Parameters

TaskNumber

Specify a task number.

Returns

A task object if the task exists, or an error message if the task number is not in the expected format. If the task number is properly formatted, but the task is not found, the task object is returned with a task status of IND.

Example

Local string &tasknumber, &status; Local Task &myTask = Create Task(&tasknumber); &status = &myTask.Status;

See Also

Task Class

Click to jump to top of pageClick to jump to parent topicTaskList

Syntax

TaskList(Status, TaskType, PhysicalQueueID, AgentID)

Description

Use the TaskList constructor to instantiate a task list.

If the queue is not provided, a list of tasks for all physical queues for that TaskType and Status is returned. To get all tasks on all queues do not specify any of the optional parameters.

Parameters

Status

Specify a task status, as an uppercase string. If you do not specify a valid status, an empty tasklist is returned. Valid values are:

 

Value

Description

ACPT

Accepted

ASGN

Assigned

ENQ

Enqueued

ESCL

Escalated

OVFL

Overflowed

 

TaskType

Specify a task type as a lowercase string. Valid values are:

 

Value

Description

chat

Chat tasks.

email

Email tasks.

generic

Generic type tasks.

voice

Voice type tasks.

 

PhysicalQueueID

Specify a physical queue ID as a string.

AgentID

Specify an agent ID as a string.

Returns

A task list object.

Example

Local string &sStatus; /* get all enqueued task on the UQ server*/ &sStatus = "ENQ"; Local TaskList &myTaskList = Create TaskList (&sStatus, "", "", "");

See Also

TaskList Class

Click to jump to top of pageClick to jump to parent topicUtil

Syntax

Util()

Description

Use the Util constructor to instantiate a util object.

Parameters

None.

Returns

A Util object.

Example

Create Util(); Local &myUtil = create Util();

See Also

Util Class

Click to jump to parent topicAgent Class

Use the agent class to refresh or view the properties, such as the agent ID or buddy list associated with a particular agent.

See Also

Configuring PeopleSoft MCF Agents

Click to jump to parent topicAgent Methods

In this section, we discuss the agent class methods. The methods are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicDelete

Syntax

Delete()

Description

Use the Delete method to delete an agent from the database. You cannot delete an agent that has still has open tasks.

Parameters

None.

Returns

A number. The values are:

Value

Description

0

Agent deleted successfully.

1

Invalid agent ID.

2

Agent has accepted task and cannot be deleted.

3

Other SQL error in executing deletion. Possibly there are errors in the child tables.

Example

import PT_MCF_UQAPI:*; &testAgent = create PT_MCF_UQAPI:Agent("QEMGR"); /* Delete an UQ Agent definition */ &retCode = &testAgent.Delete();

Click to jump to top of pageClick to jump to parent topicRefresh

Syntax

Refresh()

Description

Use the Refresh method to refresh the properties of the agent.

An agent on a queue is processing tasks as they are assigned to them. Use this method to see realtime statistics on how much load an agent has, or possibly before running any metrics.

If you're interested in how tasklists have changed, use the RefreshQTaskList method instead.

Parameters

None.

Returns

None.

Example

The following refreshes all the properties of the agent:

&MyAgent.Refresh();

See Also

RefreshQTaskList

Click to jump to top of pageClick to jump to parent topicRefreshQTaskList

Syntax

RefreshQTaskList(PhysQ)

Description

Use the RefreshQTaskList method to refresh the task list properties for the specified physical queue.

You might use this method if you're interested in seeing the realtime statistics for a particular tasklist. If you are only interested in an agent's work, use the Refresh method.

Parameters

PhysQ

Specify a physical queue ID as a string.

Returns

None.

Example

The following refreshes all task lists on the first physical queue of the agent:

&MyAgent.RefreshQTaskList(&myAgent.PhysicalQueueID [1]);

See Also

Refresh

Click to jump to parent topicAgent Properties

In this section, we discuss the agent class properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAgentID

Description

This property returns the agent ID as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicAgentProps

Description

This property returns the agent properties associated with this agent as an array of AgentPhysQueueProps objects.

This property is read-only.

Example

The following example returns the workload for physical queue SALES of agent properties object:

Local number &i = 1; While &i < &myAgent.TotalPhysicalQueues If &myAgent.AgentProps[&i].PhysicalQueueID = "SALES" Then &AgentWorkLoad = &myAgent.AgentProps[&i].WorkLoad break; End-If; End-While;

See Also

AgentPhysQueueProps Class

Click to jump to top of pageClick to jump to parent topicAgentTasks

Description

This property returns the agent tasks associated with this agent as an array of AgentPhysQueueTasks objects.

This property is read-only.

Example

The following example returns the task number for the second task on physical queue SALES in the accepted task list:

Local Number &i = 1; While &i < &myAgent.TotalPhysicalQueues If &myAgent.AgentProps[&i].PhysicalQueueID = "SALES" then &Tasknumber = &myAgent.AgentsTasks [&i].AcceptedTaskList.Task[2].TaskNumber break; End-If; End-While;

See Also

AgentPhysQueueTasks Class

Click to jump to top of pageClick to jump to parent topicBuddy

Description

This property returns a list of buddies for this agent, as an array of string.

This property is read-only.

Example

The following example returns the total number of buddies on the list:

&BuddyTotal = &myAgent.Buddy.Len;

Click to jump to top of pageClick to jump to parent topicLanguage

Description

This property returns the list of languages associated with the agent as an array of string.

This property is read-only.

Example

The following code example returns the first language code in the list of languages associated with the agent:

&Language = &myAgent.Language[1];

Click to jump to top of pageClick to jump to parent topicName

Description

This property returns the name of the agent as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicNickName

Description

This property returns the nick name of the agent as a string.

This property

Click to jump to top of pageClick to jump to parent topicPhysicalQueueID

Description

This property returns the physical queues to which this agent is assigned as an array of string.

This property is read-only.

Example

The following example returns the first physical queue of agent.

&PhysicalQueueID = &myAgent.PhysicalQueueID[1];

See Also

PhysicalQueue Class

Click to jump to top of pageClick to jump to parent topicTotalPhysicalQueues

Description

This property returns the total number of physical queues to which this agent is assigned as a number.

This property is read-only.

Example

&TotalPhysicalQueues = &myAgent.TotalPhysicalQueues;

See Also

PhysicalQueue Class

Click to jump to parent topicAgentPhysQueueProps Class

Use the AgentPhysQueueProps class to view the properties of the physical queue assigned to an agent.

Click to jump to parent topicAgentPhysQueueProps Properties

In this section, we discuss the agent physical queue properties class properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAgentID

Description

This property returns the agent ID as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicPhysicalQueueID

Description

This property returns the physical queue ID as a string.

This property is read-only.

Example

The following code example returns the physical queue ID for the physical queue of agent.

&PhyscalQueueID = &myAgentPhysQueueProps.PhysicalQueueID;

See Also

PhysicalQueue Class

Click to jump to top of pageClick to jump to parent topicSkillLevel

Description

This property returns the skill level as a number.

This property is read-only.

Example

The following code example returns the skill level on physical queue.

&SkillLevel = &myAgentPhysQueueProps.SkillLevel;

Click to jump to top of pageClick to jump to parent topicWorkLoad

Description

This property returns the maximum work load that can be assigned to the agent, as an integer.

This property is read-only.

Click to jump to parent topicAgentPhysQueueTasks Class

Use the AgentPhysQueueTasks class to refresh or view the tasks associated with the physical queue assigned to the agent.

Click to jump to parent topicAgentPhysQueueTasks Method

In this section, we discuss the agent physical queue tasks class method Refresh.

Click to jump to top of pageClick to jump to parent topicRefresh

Syntax

Refresh(TaskList)

Description

Use the Refresh method to refresh the specified task list.

Parameters

TaskList

Specify the task list you want refereshed. You must specify a task list for this parameter.

Returns

None.

Example

The following code example refresehs the accepted task list of the physical queue (&MyAgentPhysQueueTasks) for the agent.

&myAgentPhysQueueTasks.Refresh(&myAgentPhysQueueTasks.AcceptedTaskList);

See Also

TaskList Class

Click to jump to parent topicAgentPhysQueueTasks Properties

In this section, we discuss the agent physical queue tasks class properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAcceptedTaskList

Description

This property returns the accepted task list as a task list object.

This property is read-only.

Example

The following code example returns the task number of the first accepted task:

&TaskNumber = &myAgentPhysQueueTasks.AcceptedTaskList.Task[1].TaskNumber;

Click to jump to top of pageClick to jump to parent topicAssignedTaskList

Description

This property returns the assigned task list as a task list object.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicAgentID

Description

This property returns the agent ID as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicPhysicalQueueID

Description

This property returns the physical queue ID as a string.

This property is read-only.

Example

The following code example returns the physical queue ID for the physical queue of agent.

&PhyscalQueueID = &myAgentPhysQueueTasks.PhysicalQueueID;

See Also

PhysicalQueue Class

Click to jump to parent topicBroadcast Class

The Broadcast class has a single method, Broadcast. Use the Broadcast method to broadcast a notification message. You can specify whether to send the message to agents, to a queue, or even system wide.

Click to jump to parent topicBroadcast Class Method

The following is the description of the Broadcast class method Broadcast.

Click to jump to top of pageClick to jump to parent topicBroadcast

Syntax

Broadcast(ClusterID,QueueID, ChannelID, AgentState, AgentPresence, Message, MessageSetNumber, MessageNumber, DefaultMessage, SecurityLevel, ImportanceLevel, SenderId, NameValueString)

Description

Use the Broadcast function to broadcast a notification message. You can specify whether to send the message to agents, to a queue, or even system wide.

Parameters

ClusterID

Specify the name of the cluster that you want to broadcast the message to, such as, RENCLSTR_001, as a string.

QueueID

Specify the name of the physical or logical queue that you want to broadcast the message to, such as, SALES, as a string.

ChannelID

Specify the name of the channel, or task, for the broadcast, such as Email, Chat, Voice or Generic, as a string.

AgentState

Specify the state of the agents you want to broadcast the message to, such as Available, as a string.

AgentPresence

Specify the presence of the agents you want to broadcast the message to, such as Active, as a string.

Message

Specify the text of the message you want to broadcast, as a string.

MessageSetNumber

Specify the message set number of a message from the message catalog if you want to broadcast a message from the message catalog. You must also specify values for the MessageNumber and DefaultMessageText parameters if you want to broadcast this type of message. Specify the message set number as a number.

MessageNumber

Specify the message number of a message from the message catalog if you want to broadcast a message from the message catalog. You must also specify values for the MessageSetNumber and DefaultMessageText parameters if you want to broadcast this type of message. Specify the message number as a number.

DefaultMessageText

Specify the text to be used if the specified message catalog message isn't found. Use the MessageSetNumber and MessageNumber parameters to specify the catalog message. Specify the default message text as a string.

SercurityLevel

Specify the security level for the broadcast message, as a string.

ImportanceLevel

Specify the importance level of the broadcast message, as a string.

SenderID

Specify the ID of the sender of the broadcast message, as a string.

NameValueString

Specify a string containing name-value pairs specific to your application.

Returns

None.

Example

The following example would broadcast a message to a specific logical queue:

import PT_MCF_UQAPI:Broadcast:*; Local PT_MCF_UQAPI:Broadcast &BC; &BC.Broadcast("", "SALES", "", "", "Best of Luck!", "", "", "Default Message",⇒ "PRIV1", "URGENT", "Admin", "EffDate, 2005-10-25:12:00:45");

See Also

MCFBroadcast

Click to jump to parent topicLogicalQueue Class

A logical queue is an application level queue that receives work requests (tasks) relating to an application area, such as chat requests regarding sales information, and routes them to agents capable of handling the work. Use the LogicalQueue class to view the properties for a logical queue.

Click to jump to parent topicLogicalQueue Properties

In this section, we discuss the logical queue class properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicLogicalQueueID

Description

This property returns the logical queue ID as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicPhysicalQueueID

Description

This property returns all the physical queues associated with this logical queue as an array of PhysicalQueue objects.

This property is read-only.

Example

The following code example returns the physical queue ID for the fourth physical queue.

&PhyscalQueueID = &myLogicalQueue.PhysicalQueue[4].PhyscalQueueID;

Click to jump to parent topicMCFFactory Class

The MCFFactory class is the base class of the universal queue classes. Instantiating an object in this class automatically instantiates all the associated universal queue classes. The MCFFactory contains all the logical queues operating on the MCF universal queue. The logical queues are comprised of physical queues. Agents log onto these physical queues. Tasks are queued to physical queues, and later, assigned and accepted by agents. If agents aren't available on a physical queue to accept the tasks on that queue, the tasks are either escalated or put into overflow.

Click to jump to parent topicMCFFactory Property

In this section, we discuss the MCFFactory class property LogicalQueue.

Click to jump to top of pageClick to jump to parent topicLogicalQueue

Description

This property returns all the logical queues with which this MCFFactory object is associated, as an array of LogicalQueue objects.

This property is read-only.

Example

The following code example returns the physical queue ID for the first physical queue on the logical queue, as well as the total of overflowed taskes on the first physical queue on the logical queue.

Local number &TotalTasks; Local MCFFactory &myMCFFactory = Create MCFFactory (); &PhyscalQueueID = &myMCFFactory.LogicalQueue [1].PhysicalQueue [1].PhysicalQueueID; &TotalTasks = &myMCFFactory.LogicalQueue [1].PhysicalQueue [1].OverflowedTask⇒ List.Total;

Click to jump to parent topicPhysicalQueue Class

Logical queues can be partitioned into physical queues for scalability. Use the PhysicalQueue class to refresh and view the properties of a physical queue.

Click to jump to parent topicPhysicalQueue Methods

In this section, we discuss the physical queue class methods. The methods are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicRefresh

Syntax

Refresh()

Description

Use the Refresh method to refresh all the objects in the physical queue.

Parameters

None.

Returns

None.

Example

&myPhysicalQueue.Refresh();

Click to jump to top of pageClick to jump to parent topicRefreshTaskList

Syntax

RefreshTaskList(TaskList)

Description

Use the RefreshTaskList method to refresh the specified task list.

Parameters

TaskList

Specify the task list you want refereshed. You must specify a task list for this parameter.

Returns

None.

Example

The following code example refreshes the accepted task list for the physical queue.

&myPhysicalQueue.RefreshTaskList(&myPhysicalQueue.AcceptedTaskList);

Click to jump to parent topicPhysicalQueue Properties

In this section, we discuss the physical queue class properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAcceptedTaskList

Description

This property returns the accepted task list as a task list object.

This property is read-only.

Example

The following code example returns the task number of the first accepted task:

&TaskNumber = &myPhysicalQueue.AcceptedTaskList.Task[1].TaskNumber;

See Also

TaskList Class

Click to jump to top of pageClick to jump to parent topicAssignedTaskList

Description

This property returns the assigned task list as a task list object.

This property is read-only.

See Also

TaskList Class

Click to jump to top of pageClick to jump to parent topicAgent

Description

This property returns all the agents assigned to the physical queue as an array of agent objects.

This property is read-only.

Example

The following example returns the name of the third agent.

&AgentName = &MyPhysicalQueue.Agent[3].Name;

Click to jump to top of pageClick to jump to parent topicBrowserURL

Description

This property returns the URL of the browser as a string. The format is that of an absolute URL.

The URL for the REN server that serves this MCF cluster for external clients and for agent chat. The Browser URL may be different from the InternalURL, which should not have to go through any firewall, reverse proxy server or other outward-facing security barrier.

This property is read-only.

See Also

InternalURL

Click to jump to top of pageClick to jump to parent topicEnqueuedTaskList

Description

This property returns the enqueued task list as a task list object.

This property is read-only.

See Also

TaskList Class

Click to jump to top of pageClick to jump to parent topicEscalatedTaskList

Description

This property returns the escalated task list as a task list object.

This property is read-only.

See Also

TaskList Class

Click to jump to top of pageClick to jump to parent topicInternalURL

Description

This property returns the internal URL as a string. The format is that of an absolute URL.

This property is read-only.

See Also

BrowserURL

Click to jump to top of pageClick to jump to parent topicIsActive

Description

This property returns true if the physical queue is active, false otherwise.

This property is read-only.

Example

Local LogicalQueue &myLogicalQueue = Create LogicalQueue (&LogicalQueueID); For &I = 1 to &myLogicalQueue.PhysicalQueue.Len &PhyscalQueueID = &myLogicalQueue.PhysicalQueue[&I].PhyscalQueueID; &myPhysicalQueue = Create PhysicalQueue (&PhysicalQueueID); If &myPhysicalQueue.IsActive Then /* do work */ Else /* return error */ End-If; End-For;

Click to jump to top of pageClick to jump to parent topicLogicalQueueID

Description

This property returns the logical queue ID associated with the physical queue as a string.

This property is read-only.

Example

&LogicalQueueID = &myPhysicalQueue.LogicalQueueID;

Click to jump to top of pageClick to jump to parent topicOverflowedTaskList

Description

This property returns the overflowed task list as a task list object.

This property is read-only.

See Also

TaskList Class

Click to jump to top of pageClick to jump to parent topicPhysicalQueueID

Description

This property returns the physical queue ID of this physical queue.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicRENURLID

Description

This property returns the ID of the REN server for the MCFFactory as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicTotalAgents

Description

This property returns the total number of agents belonging to this physical queue as a number. They may or may not be logged to the queue at that time.

This property is read-only.

Click to jump to parent topicTask Class

Use the task class to manipulate tasks or to view the properties of a specific task.

Click to jump to parent topicTask Methods

In this section, we discuss the task class methods. The methods are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicClose

Syntax

Close(Comment)

Description

Use the Close method to close the task. Only use this method with overflowed or escalated tasks.

Note. This method does not resubmit the task. Use the Enqueue method to resubmit the task, then use this method to close it.

Parameters

Comments

Specify any comments you want associated with this closed task.

You can specify a null value ("") for this parameter.

Returns

None.

See Also

Enqueue

Click to jump to top of pageClick to jump to parent topicEnqueue

Syntax

Enqueue(LogicalQueueID,AgentID, Timeout, ResponseTime, Cost, Priority, MinSkill)

Description

Use the Enqueue method to add a task to the logical queue that the task was first assigned to. Every task enters the universal queue by being assigned to a logical queue.

Considerations Specifying Time

If no value (zero) is provided for the time parameters (such as Timeout or ResponseTime) the Timeout or ResponseTime properties from the task are used, respectively. This may cause the time to never occur as it creates a moving deadline. To avoid such a problem the time can be calculated for each task prior to enqueue as shown below.

Note. This logic is not included in the task's enqueue function, so as to allow you the choice for how you want your application to handle this situation.

&Utilobj = create Util(); &CurrentTask = create Task(&Task_Number); &TimeDelta = &Utilobj.GetTimeDiff(&currenttime, &CurrentTask.EscalationTime) / 60; &AgentAcceptTime = &Utilobj.GetTimeDiff(&CurrentTask.EnqueueTime, &Current⇒ Task.OverFlowTime) / 60; If AddToDateTime(&currenttime, 0, 0, 0, 0, &AgentAcceptTime, 0) >= &Current⇒ Task.EscalationTime Then If &TimeDelta > 0 Then &AgentAcceptTime = &TimeDelta; Else /* The current time already exceeds the Escalationn time*/ End-If; End-If;

Parameters

LogicalQueueId

Specify the logical queue that you want to add this task to, as a string. You can specify a null value ("")for this parameter. If no value is provided , the logicalQueueID that is a property of task is used.

AgentID

Specify the agent ID for this task, as a string. You can specify a null value ("")for this parameter. If you specify a null value, the task is given to any available agent. You might expect to use a null for this parameter generally, as most tasks are to be reassinged for random agent allocation. However, there may be cases where a particular agent (such as one who previously worked on this task) might be required to take this task. In this case an agentID is provided

Timeout

Specify the time out period for this task as a number of minutes. You can specify a zero for this parameter. If no value is provided, the Timeout property of the task is used.

The acceptance timeout is the period of time that an agent has to accept an assigned task (click on the flashing icon on the MultiChannel console). If the task is not accepted within this time, the task is re-enqueued.

ResponseTime

Specify the response time for this task as a number of minutes. You can specify a zero for this parameter. If no value is provided, the ResponseTime property of the task is used.

The response time refers to the when a task should be completed by in order to satisfy customer contracts (such as, a platinum customer who requires a response in one day for a email. If by the end of 24 hours the task is not completed, it is escalated or the response time is exceeded.)

Cost

Specify the cost of this task as a number. You can specify a zero for this parameter. This is the cost of the task as set by the application when the task was enqueued. If no cost is set at that time, then the default cost is used.

Priority

Specify the priority of the task as a number. One is the lowest possible priority. Higher numbers indicate high priorities. If no priority is set, the default priority for the task is used.

MinSkill

Specify the minimum skill level required to do this task, as a number. You can specify a zero for this parameter.

Returns

None.

Example

&CurrentTask = create Task(&Task_Number); &CurrentTask.Enqueue(&CurrentTask.PhysicalQueueID, "", &AgentAcceptTime, &Task⇒ CompleteTime, &CurrentTask.Cost, &CurrentTask.Priority, &CurrentTask.SkillLevel);

Click to jump to top of pageClick to jump to parent topicRefresh

Syntax

Refresh()

Description

Use the Refresh method to refresh the task properties. If you only want to refresh the status, use the RefreshStatus method.

Parameters

None.

Returns

None.

Example

The following refreshes all the properties of the task:

&MyTask.Refresh();

See Also

RefreshStatus

Click to jump to top of pageClick to jump to parent topicRefreshStatus

Syntax

RefreshStatus()

Description

Use the RefreshStatus method to refresh only the status of the task. If you want to refresh all the task properties, use the Refresh method.

Parameters

None.

Returns

None.

Example

The following refreshes the status of the task:

&MyTask.RefreshStatus();

See Also

Refresh

Click to jump to parent topicTask Properties

In this section, we discuss the task class properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAgentID

Description

This property returns the agent ID as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicApplicationData

Description

This property returns a string in which data relevent to the task is passed. Typically, for a task, it contains the URL to show when an agent access this task, the subject, and so on. This data is not really useful to the end-user, but only for administrators and for test purposes.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicComments

Description

Use this property to either set or return the comments associated with this task, as a string.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicEnqueueTime

Description

This property returns the datetime when the task was submitted to the universal queue as a datetime value.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicEscalationTime

Description

This property returns the datetime when the task will be removed from the queue and placed in the escalated pool.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicLanguage

Description

This property returns the language associated with the task as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicOriginalTime

Description

This property returns the datetime when the task was first submitted to the universal queue as a datetime value. This value is maintained for a task through its various stages and cannot change.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicOverFlowTime

Description

This property returns the datetime when the task has reached the stipulated time during which the universal queue server could not find an agent to accept the task.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicPhysicalQueueID

Description

This property returns the physical queue associated with the task as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicTiedAgentID

Description

This property returns the agent ID of the agent this task is enqueued for as a string.

This property is read-only.

Click to jump to parent topicTaskList Class

Use the task list class to refresh or view a task list.

Click to jump to parent topicTaskList Method

This section discusses the task list method Refresh.

Click to jump to top of pageClick to jump to parent topicRefresh

Syntax

Refresh()

Description

Use the Refresh method to refresh the task list properties.

Parameters

None.

Returns

None.

Example

The following refreshes all the properties of the task list:

&MyTaskList.Refresh();

Click to jump to parent topicTaskList Properties

This sections discusses all the properties for the task list class. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAgentID

Description

This property returns the agent ID as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicPhysicalQueueID

Description

This property returns the physical queue associated with the task list as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicTask

Description

This property returns all of the tasks in the task list as an array of task objects.

This property is read-only.

Example

For &I = 1 to &MyTaskList.Total &MyTask = &MyTaskList[&I]; /* do work on every task in list */ End-For;

Click to jump to top of pageClick to jump to parent topicTaskType

Description

This property returns the task type as a string. A tasklist only contains tasks of a single type. The following are the valid task types for a tasklisk:

Value

Description

ACPT

Accepted

ASGN

Assigned

ENQ

Enqueued

ESCL

Escalated

OVFL

Overflowed

This property is read-only.

Click to jump to top of pageClick to jump to parent topicTotal

Description

This property returns the total number of tasks in the list as a number.

This property is read-only.

Click to jump to parent topicUtil Class

The Util class is used to perform certain useful tasks, such as calculating times (so a task will timeout).

Click to jump to parent topicUtil Methods

This section discusses the Util class methods. The methods are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicGetLogicalQueue

Syntax

GetLogicalQueue(PhysicalQueueID)

Description

Use the GetLogicalQueue to get the logical queue ID for the specified physical queue.

Parameters

physicalQueueID

Specify the physical queue ID that you want to find the logical queue for, as a string.

Returns

A string containing the logical queue ID.

Example

The following code example returns the logical queue ID for a given physical queue ID .

&LogicalQueueID = &testUtil.GetLogicalQueue(&PhysicalQueueID);

Click to jump to top of pageClick to jump to parent topicGetTimeDiff

Syntax

GetTimeDiff(DateTime1, DateTime2)

Description

Use the GetTimeDiff method to determine the difference between two datetime values.

Parameters

DateTime1

Specify the starting datetime as a datetime value.

DateTime2

Specify the ending datetime as a datetime value.

Returns

A number specifying the difference between the two datetime values (in seconds.)

Example

In the following example, &nPeriod is 15 minutes.

&DTM1 = DateTimeValue("10/09/97 10:35:36"); &DTM2 = DateTimeValue("10/09/97 10:50:36"); Local number &nPeriod = &myUtil.GetTimeDiff(&DTM1, &DTM2) / 60;

Click to jump to parent topicMCFFactory Example

The following is an example of creating an MCFFactory, then traversing the branches to reach elements from different points. It is the loops that are important—any code within the loops is just an example of retrieval.

&testMCFFactory = create MCFFactory(100); /* set a maximum number of tasks in a⇒ task list to 100 */ Local integer &i, &j, &k; &i = 1; &j = 1; &k = 1; &l = 1; &m = 1; &n = 1; While &j < &testMCFFactory.LogicalQueue.Len + 1 /*looping through the logical queues*/ While &i < &testMCFFactory.LogicalQueue [&j].PhysicalQueue.Len + 1 /*looping through the physical queues*/ /* e.g. Tasklists by physical queues*/ &PhysQID = &testMCFFactory.LogicalQueue [&j].PhysicalQueue [&i].Physical⇒ QueueID; &nOvflTaskTotal = &testMCFFactory.LogicalQueue [&j].PhysicalQueue [&i].Over⇒ FlowedTaskList.Total; While &k < &testMCFFactory.LogicalQueue [&j].PhysicalQueue [&i].OverFlowed⇒ TaskList.Total + 1 /*looping through the Tasklist on physical queues*/ /* e.g. Tasks by physical queues*/ &tasknum = &testMCFFactory.LogicalQueue [&j].PhysicalQueue [&i].Over⇒ FlowedTaskList.Task [&k].TaskNumber; &k = &k + 1; End-While; /* &k loop */ /*Task List by Agents on a Physical Queue */ While &l < &testMCFFactory.LogicalQueue [&j].PhysicalQueue [&i].TotalAgents⇒ + 1 While &m < &testMCFFactory.LogicalQueue [&j].PhysicalQueue [&i].Agent ⇒ [&l].TotalPhysicalQueues + 1 /* e.g. Workload of agents on physical queues. NOTE: &m and &i are⇒ not the same value for the same physical queue.*/ &AgentMaxWorkload = &testMCFFactory.LogicalQueue [&j].PhysicalQueue ⇒ [&i].Agent [&l].AgentProps [&m].Workload; While &n < &testMCFFactory.LogicalQueue [&j].PhysicalQueue [&i].Agent ⇒ [&l].AgentsTasks [&m].AcceptedTaskList.Total + 1 /* e.g. tasks on Agent's accepted list NOTE: &m and &i are not⇒ the same value for the same physical queue.*/ &tasknum = &testMCFFactory.LogicalQueue [&j].PhysicalQueue ⇒ [&i].Agent [&l].AgentsTasks [&m].AcceptedTaskList.Task [&n]; &n = &n + 1; End-While; /* &n Loop - tasks on Phys Q of Agents */ &n = 1; &m = &m + 1; End-While; /* &m loop - Phys Q of Agents - convoluted*/ &m = 1; &l = &l + 1; End-While; /* &l loop - Agents on Phys Q */ &i = &i + 1; &k = 1; End-While; /* &i loop- Physical Queues*/ &j = &j + 1; &i = 1; End-While; /* &j loop - Logical Queues*/