Cisco Unified Contact Center Enterprise Developers Guide Release 9.0(x)
Precision Queue
Downloads: This chapterpdf (PDF - 1.25MB) The complete bookPDF (PDF - 2.39MB) | Feedback

Precision Queue

Precision Queue

Precision queues are a combination of steps that include attributes, defined terms for the selected attributes, wait times, and Consider If formulas. A precision queue step is a time-based routing point within the precision queue. You must have at least one step and can have up to ten steps.

Within each step you can have:

  • up to five unique attributes
  • a different pool of agents
  • a wait time (except in the last step)
  • a Consider If formula (except in the last step)

A precision queue term compares an attribute against a value. For example, if you have an attribute for English (English) and assign it a value of > 7, the term is "English > 7".

Limits

The following limits are enforced:

  • You can create a maximum of 2,000 precision queues in the entire system.
  • You can create a maximum of 5,000 precision queue steps in the entire system.
  • You can associate a maximum of 10 precision queue terms in a precision queue step.
  • You can associate up to 5 unique attributes in a precision queue.
  • An agent can be a member of a combination of up to 50 precision queues and skill groups.

Precision Queue Create

Use the POST API command to create a precision queue, precision queue steps, and precision queue terms.

Syntax

URL: https://<server>/unifiedconfig/config/precisionqueue

HTTP method: POST

Precision Queue Parameters

Precision queue parameters Data type Description
bucketInterval Node

(Optional) A reference to a bucketInterval. See the bucketInterval Parameters.

agentOrdering Integer Determines the order of agents in a precision queue sub-queue using the following values:
  • 1 = LAA (agent availability time)
  • 2 = Most skilled agent
  • 3 = Least skilled agent
callOrdering Integer

Determines the order of calls in this precision queue using the following value:

  • 1 = Priority, then time in queue
name String

A unique enterprise name for the precision queue. The length of this field is 32 characters.

description String

(Optional) Description for the precision queue. The length of this field is 255 characters.

serviceLevelThreshold Integer

The service level threshold in seconds for this precision queue.

serviceLevelType Integer

Determines how to calculate the service level for the precision queue using the following values:

  • 1 = ignore abandoned calls
  • 2 = abandoned call has negative impact
  • 3 = abandoned call has positive impact
steps  

A list of steps for this precision queue. See the Step Parameters.

bucketInterval Parameters

bucketInterval parameters Data type Description
name String The unique enterprise name of the bucket interval.
refURL URL The URL of the referenced bucket interval.

Step Parameters

You can create up to ten steps for each precision queue.

step parameters Data type Description
stepOrder integer The order of rows for a precision queue step. This value must start at 1 (zero is invalid) and increment by 1 for each subsequent step.
waitTime Integer

A wait time to apply before proceeding to the next step (in seconds). The value must be 0 or greater for all steps, excluding the last step.

A blank (or zero) wait time indicates that the call will immediately proceed to the next step if there are no available agents matching the step criteria.

Wait time is not available for the last step. The system waits until an agent is available to take the call.

considerIf String

You can use a Consider If formula to evaluate a call (within a step) against additional criteria. Each time a call reaches a step with a Consider If formula, the formula is evaluated. If the formula evaluates as true, the step is considered. If the value evaluates as false, the call moves to the next step.

If no formula is provided for a step, the step is always considered for calls.

To add a Consider If formula, you can type the formula into the Consider If box. Alternatively, you can use the Script Editor to build the formula and then copy and paste it into the Consider If box. Objects used in consider if formulas are case-sensitive. All Consider If formulas that you add to a precision queue must be valid. If you add an invalid formula, you cannot save the precision queue. To ensure that the formula is valid, it is recommended that you use Script Editor to build and validate the formula.

Note   

It is possible that a valid Consider If formula can become invalid. For example, if you delete an object used in the formula after you create or update the precision queue, the formula is no longer valid.

Only the following scripting objects are valid in a Consider If formula:

  • Call
  • PQ
  • Skillgroup
  • ECC
  • PQ Step
  • Call Type
  • Custom Functions (you can create custom functions in Script Editor)

Consider If formula examples·

  • PQ.PQ1.LoggedOn > 1 - Evaluates whether there is more than one agent logged into this queue.
  • CallType.CallType1.CallsRoutedToday > 100 - Evaluates whether more than 100 calls of this call type were routed today.
  • PQStep.PQ1.1.RouterAgentsLoggedIn > 1 - Evaluates whether there is more than one router agent logged into this queue for step 1.
  • CustomFunction(Call.PeripheralVariable1) > 10 - Evaluates whether this formula using a custom function returns a value greater than ten.
description String (Optional) Description for this step.
terms   A list of terms for this step. See the Term Parameters.

Term Parameters

You can configure up to ten terms for each step.

Term parameters Data type Description
termOrder Integer The order of rows for a precision queue term. This value must start at 1 (zero is invalid) for each new step and increment by 1 for each subsequent term.
attribute node

A reference to the attribute to be tested. All elements, except the refURL element, inside the attribute reference node are read-only.

parenCount Integer

Indicates the parenthesis surrounding a term. It can be used to create more complex term logic.

  • 1 = Indicates that the current term has an opening parenthesis before it.
  • 0 = Indicates that the current term has no parenthesis on either side of it.
  • -1 = Indicates that the current term has a closing parenthesis after it.
Note   

The sum of all parenCounts within a step must be 0. Every opening parenthesis must be closed before another parenthesis can be opened.

termRelation Integer Indicates the relationship of this term to the preceding term using the following values:
  • 0 = none (only legal on first item for the step, since there is no preceding term)
  • 1 = AND
  • 2 = OR
attributeRelation Integer

Indicates what kind of comparison is done on the attribute using the following values:

  • 1 = equal
  • 2 = not equal
  • 3 = less than
  • 4 = less than or equal
  • 5 = greater than
  • 6 = greater than or equal
value1 String The value that the attribute is tested against. It must be convertible to the data type specified in the Attribute table.

XML Request Payload

To create a precision queue with one step that will match agents that have a language proficiency greater than 2 and lesser than 5 use the following XML payload:

<precisionQueue>
				<bucketInterval>
								<name>testBI</name>
								<refURL>http://<server>/unifiedconfig/config/bucketinterval/5000</refURL>
				</bucketInterval>
				<agentOrdering>1</agentOrdering>
				<callOrdering>1</callOrdering>
				<description>sales precision queue</description>
				<name>SalesAQ</name>
				<serviceLevelThreshold>1</serviceLevelThreshold>
				<serviceLevelType>1</serviceLevelType>
				<steps>
								<step>
												<stepOrder>1</stepOrder>
												<waitTime>-1</waitTime>
												<description>"Step 1"</description>
												<terms>
																<term>
																			<attribute>
																							<refURL>http://<server>/unifiedconfig/config/attribute/5033</refURL>
																							<name>Language</name>
																							<dataType>4</dataType>		
																							<description>Marketing</description>
																			</attribute>
																			<termOrder>1</termOrder>
																			<parenCount>1</parenCount>
																			<termRelation>0</termRelation>
																			<attributeRelation>5</attributeRelation>
																			<value1>2</value1>
																</term>
																<term>
																			<attribute>
																							<refURL>http://<server>/unifiedconfig/config/attribute/5033</refURL>
																							<name>Language</name>
																							<dataType>4</dataType>
																							<description>Marketing</description>
																			</attribute>
																			<termOrder>2</termOrder>
																			<parenCount>-1</parenCount>
																			<termRelation>1</termRelation>
																			<attributeRelation>3</attributeRelation>
																			<value1>5</value1>
																</term>
													</terms>
								</step>
				</steps>
</precisionQueue>

Using a Boolean Attribute

To create a precision queue with one step that will match agents that are present in Boston, use the following XML payload:

<precisionQueue>
				<agentOrdering>1</agentOrdering>
									<bucketInterval>
															<refURL>/unifiedconfig/config/bucketinterval/1</refURL>
															<name>Default_Bucket_Intervals</name>
									</bucketInterval>
									<callOrdering>1</callOrdering>
									<description>This is a practice precision queue</description>
									<name>Practice_Queue_1</name>
									<serviceLevelThreshold>100</serviceLevelThreshold>
									<serviceLevelType>1</serviceLevelType>
									<steps>
												<step>
															<terms>
																		<term>
																					<attribute>
																								<refURL>/unifiedconfig/config/attribute/5990</refURL>
																								<name>Present_Boston</name>
																								<dataType>3</dataType>
																					</attribute>
																					<attributeRelation>1</attributeRelation>
																					<parenCount>0</parenCount>
																					<termRelation>0</termRelation>
																					<value1>true</value1>
																		</term>																																																																		
															</terms>
															<waitTime>-1</waitTime>
											</step>
									</steps>
</precisionQueue>

HTTP Response Headers

The response contains the URL for the newly created precision queue.

HTTP/1.1 201 Created

Location: http://<server>/unifiedconfig/config/precisionqueue/5000

Content-Type: text/plain

Content-Length: 0

Date: Tue, 12 Jan 2010 16:00:00 GMT

Precision Queue List

Use the LIST API to retrieve all existing precision queues and optionally agent count and attributes.

Syntax

URL: https://<server>/unifiedconfig/config/precisionqueue

HTTP Method: GET

List parameter Data type Description
agentcount True/False

An optional parameter that returns agent count for each returned precision queue and each step.

attributes True/False

An optional parameter that returns a list of attributes for each returned precision queue.

Parameters

URL: https://<server>/unifiedconfig/config/precisionqueue?agentcount=true

URL: https://<server>/unifiedconfig/config/precisionqueue?attributes=true

URL: https://<server>/unifiedconfig/config/precisionqueue?agentcount=true&attributes=true

Example XML Response:

<precisionQueues>
  <precisionQueue>
    <changeStamp>3</changeStamp>
    <refURL>https://<server>/unifiedconfig/config/precisionqueue/5007</refURL>
    <agentOrdering>1</agentOrdering>
    <callOrdering>1</callOrdering>
    <description>sales precision queue</description>
    <name>MarketingAB</name>
    <serviceLevelThreshold>1</serviceLevelThreshold>
    <serviceLevelType>1</serviceLevelType>
  </precisionQueue>
  <precisionQueue>
    <changeStamp>3</changeStamp>
    <refURL>https://<server>/unifiedconfig/config/precisionqueue/5008</refURL>
    <agentOrdering>1</agentOrdering>
    <callOrdering>1</callOrdering>
    <description>sales precision queue</description>
    <name>MarketingABC</name>
    <serviceLevelThreshold>1</serviceLevelThreshold>
    <serviceLevelType>1</serviceLevelType>
  </precisionQueue>
  <precisionQueue>
    <changeStamp>3</changeStamp>
    <refURL>https://<server>/unifiedconfig/config/precisionqueue/5012</refURL>
    <agentOrdering>1</agentOrdering>
    <callOrdering>1</callOrdering>
    <description>sales precision queue</description>
    <name>Sales225</name>
    <serviceLevelThreshold>1</serviceLevelThreshold>
    <serviceLevelType>1</serviceLevelType>
  </precisionQueue>
</precisionQueues>

HTTP Response Headers

HTTP/1.1 200 OK

Content-Type: application/xml

Transfer-Encoding: chunked

Date: Tue, 12 Jan 2010 16:00:00 GMT

Precision Queue Get

Use to retrieve a precision queue, the corresponding steps and terms, and optionally agent count and attributes.

Syntax

URL: https://<server>/unifiedconfig/config/precisionqueue/id

HTTP Method: GET

Precision queue parameters Data Type Description
agentcount True/False

An optional parameter that returns agent count for the precision queue and each step.

attributes True/False

An optional parameter that returns a list of attributes for the precision queue.

Parameters

URL: https://<server>/unifiedconfig/config/precisionqueue/id?agentcount=true

URL: https://<server>/unifiedconfig/config/precisionqueue/id?attributes=true

URL: https://<server>/unifiedconfig/config/precisionqueue/id?agentcount=true&attributes=true

XML Response

<precisionQueue>
				<changeStamp>4</changeStamp>
				<refURL>/unifiedconfig/config/precisionqueue/5002</refURL>
				<agentOrdering>1</agentOrdering>
				<bucketInterval>
								<refURL>/unifiedconfig/config/bucketinterval/1</refURL>
								<name>Default_Bucket_Intervals</name>
				</bucketInterval>
				<callOrdering>1</callOrdering>
				<description>This is a practice precision queue</description>
				<name>Practice_Queue</name>
				<serviceLevelThreshold>3</serviceLevelThreshold>
				<serviceLevelType>1</serviceLevelType>
				<steps>
								<step>
												<terms>
																	<term>
																					<attribute>
																					<refURL>/unifiedconfig/config/attribute/5698</refURL>
																					<name>test</name>
																					<dataType>4</dataType>
																					</attribute>
																					<attributeRelation>5</attributeRelation>
																					<parenCount>0</parenCount>
																					<termRelation>0</termRelation>
																					<value1>2</value1>
																	</term>
												</terms>
												<waitTime>0</waitTime>
								</step>
								<step>
												<terms>
																	<term>
																					<attribute>
																					<refURL>/unifiedconfig/config/attribute/5698</refURL>
																					<name>test</name>
																					<dataType>4</dataType>
																					</attribute>
																					<attributeRelation>3</attributeRelation>
																					<parenCount>0</parenCount>
																					<termRelation>0</termRelation>
																					<value1>2</value1>
																	</term>
												</terms>
												<waitTime>-1</waitTime>
								</step>
				</steps>
</precisionQueue>

Precision Queue Update

Use this command to update a precision queue and corresponding steps and terms. When you update an existing precision queue, you must provide all of the parameters. There are no incremental updates of any parameters, including steps and terms. For example, assume you have a precision queue with a single step and a single term. To add a term to the existing step, you must provide all precision queue parameters, in addition to the step and both terms.

When you update an existing precision queue, agents associated with the queue can change dynamically. Specifically, if you modify the terms associated with precision queue steps, agents that were previously in the precision queue may be removed from the queue and agents that were previously not included in the precision queue may be added to the queue. For example, you have a precision queue with one step and one term and the term criterion is: Spanish > 6. If Agent A has the attribute Spanish with value 5, the agent is not included in this precision queue. If you update the precision queue and change the term to Spanish >= 5, agent A is dynamically moved into this precision queue and is available to take calls.

Syntax

URL: https://<server>/unifiedconfig/config/precisionqueue/id

HTTP Method: PUT

Precision Queue Parameters

Precision queue parameters Data type Description
bucketInterval Node

(Optional) A reference to a bucketInterval. See the bucketInterval parameters.

agentOrdering Integer Determines the order of agents in a precision queue sub-queue using the following values:
  • 1 = LAA (agent availibility time)
  • 2 = Most skilled agent
  • 3 = Least skilled agent
callOrdering Integer

Determines the order of calls in this precision queue using the following value:

  • 1 = Priority, then time in queue
name String

A unique enterprise name for the precision queue. The length of this field is 32 characters.

description String

(Optional) Description for the precision queue. The length of this field is 255 characters.

serviceLevelThreshold Integer

The service level threshold in seconds for this precision queue.

serviceLevelType Integer

Determines how to calculate the service level for the precision queue using the following values:

  • 1 = ignore abandoned calls
  • 2 = abandoned call has negative impact
  • 3 = abandoned call has positive impact
changeStamp Integer This parameter represents the current state of the database. The value is populated when the system retrieves data using the GET command. The same value must be returned in an UPDATE operation, to ensure the client is working with the latest data set. This value is not required when you create a precision queue.
steps   This parameter is a list of steps for this precision queue. To view the list, see the Step parameters.

bucketInterval Parameters

bucketInterval Parameters Data Type Description
name String The unique enterprise name of the bucket interval.
refURL URL The URL of the referenced bucket interval.

Step Parameters

Step parameters Data Type Description
stepOrder integer

The order of rows for a precision queue step. This value must start at 1 (zero is invalid) and increment by 1 for each subsequent step.

waitTime Integer

A wait time to apply before proceeding to the next step (in seconds). The value must be 0 or greater for all steps, excluding the last step.

A blank (or zero) wait time indicates that the call will immediately proceed to the next step if there are no available agents matching the step criteria.

Wait time is not available for the last step. The system waits until an agent is available to take the call.

considerIf String

Consider If expression that must be met to execute a particular step. The length of this field is 255 characters. Objects used in consider if expressions are case-sensitive.

considerIf examples:

  • PQ.PQ1.LoggedOn > 1—This expression evaluates whether there is more than one agent logged into this queue.
  • Attribute.Attribute1.CallsRoutedToday > 100— Evaluates whether more than 100 calls of this call type were routed today.
  • PQStep.PQ1.1.RouterAgentsLoggedIn > 1—Evaluates whether there is more than one router agent logged into this queue for the first step.
  • CustomFunction(Call.PeripheralVariable1) > 10 —Evaluates whether this expression using a custom function returns a value greater than ten.
Note    You cannot add an expression to the last step.
description String (Optional) Description for this step.
terms   A list of terms for this step. See the Term parameters.

Term Parameters

Term Parameters Data Type Description
termOrder Integer

The order of rows for a precision queue term. This value must start at 1 (zero is invalid) for each new step and increment by 1 for each subsequent term.

attribute Node

A reference to the attribute to be tested. All elements, except the refURL element, inside the attribute reference node are read-only.

parenCount Integer

Indicates the parenthesis surrounding a term. It can be used to create more complex term logic.

  • 1 = Indicates that the current term has an opening parenthesis before it.
  • 0 = Indicates that the current term has no parenthesis on either side of it.
  • -1 = Indicates that the current term has a closing parenthesis after it.
Note   

The sum of all parenCounts within a step must be 0. Every opening parenthesis must be closed before another parenthesis can be opened.

termRelation Integer Indicates the relationship of this term to the preceding term using the following values:
  • 0 = none (only legal on first item for the step, because there is no preceding term)
  • 1 = AND
  • 2 = OR
attributeRelation Integer

Indicates what kind of comparison is done on the attribute using the following values:

  • 1 = equal
  • 2 = not equal
  • 3 = less than
  • 4 = less than or equal
  • 5 = greater than
  • 6 = greater than or equal
value1 String The value that the attribute is tested against. It must be convertible to the data type specified in the attribute table.

XML Request Payload

To update a precision queue to match agents with a language proficiency between 2 and 8, use the following payload:

<precisionQueue>
				<refURL>/unifiedconfig/config/precisionqueue/5001</refURL>
				<agentOrdering>1</agentOrdering>
				<bucketInterval>
										<refURL>/unifiedconfig/config/bucketinterval/1</refURL>
										<name>Default_Bucket_Intervals</name>
				</bucketInterval>
				<callOrdering>1</callOrdering>
				<description>This is a practice precision queue</description>
				<name>Practice_Queue</name>
				<serviceLevelThreshold>3</serviceLevelThreshold>
				<serviceLevelType>1</serviceLevelType>
				<steps>
								<step>
												<terms>
																<term>
																				<attribute>
																				<refURL>/unifiedconfig/config/attribute/5698</refURL>
																				<name>test</name>
																				<dataType>4</dataType>
																				</attribute>
																				<attributeRelation>5</attributeRelation>
																				<parenCount>0</parenCount>
																				<termRelation>0</termRelation>
																				<value1>2</value1>
																</term>
												</terms>
												<waitTime>0</waitTime>
									</step>
									<step>
												<terms>
																<term>
																			<attribute>
																			<refURL>/unifiedconfig/config/attribute/5698</refURL>
																			<name>test</name>
																			<dataType>4</dataType>
																			</attribute>
																			<attributeRelation>3</attributeRelation>
																			<parenCount>0</parenCount>
																			<termRelation>0</termRelation>
																			<value1>8</value1>
																</term>
													</terms>
													<waitTime>-1</waitTime>
										</step>
				</steps>
</precisionQueue>

Precision Queue Delete

You cannot delete a precision queue that is referenced statically in any version of a saved script. Specifically, before you can delete a precision queue that is referenced statically in a script, you must remove the precision queue from every saved version of the script. If you reference a precision queue dynamically in a script and there are calls queued against the precision queue, you can delete the precision queue. Any calls queued against the deleted precision queue will be default routed.


Note


When deleting a precision queue that is referenced by a dynamic precision queue node, this precision queue's calls will be default routed.


Syntax

URL: https://<server>/unifiedconfig/config/precisionqueue/id

HTTP Method: DELETE

HTTP Response Headers

HTTP/1.1 200 OK

Content-Type: text/plain

Content-Length: 0

Date: Tue, 12 Jan 2010 16:00:00 GMT