Jump to: navigation, search

_request_time_bucket

Section: Scheduled Call
Default Value: 5
Valid Values: 5,10,15,20,30,60,120
Changes Take Effect: Immediately
Modified: 8.5.202.03

Period of time during which GMS attempts to schedule a specific amount of requests. By default, the time buckets are 5 minutes and the max_request_by_time_bucket option is set to 100; as a result, a maximum of 100 scheduled requests can be done in the given 5 minutes bucket.

Starting in 8.5.202.03, the following values are valid for this option: 5,10,15,20,30,60,120.

Important
Applicable if the _max_request_by_time_bucket option is set.

Capacity API

The Capacity Service enables you to define the number of scheduled callbacks that are allowed for Callback for a given time slot in the week. Then, your Callback service refers to your Capacity service and to your Office Hours service to adjust the agent availability and the number of scheduled callbacks.

You can define exceptions for dates where less or more agents are available, and you can define as many Capacity services that you need to match your Callback services. This way, you can address the agent workload according to the real resources that are available.

Important
The Capacity applies to each individual _request_time_bucket time slot defined in the GMS configuration.

For example, if _request_time_bucket=5 (for 5 minutes), then configuring capacity=10 means that during a given hour, it is possible to create 10 callbacks for each of the 5 minute slots, therefore 120 callbacks for the full hour.

Configuration

Here is an example of GMS configuration:

[service.Capacity]
_capacity=[Mon, Tue, Wed, Thu, Fri, Sat, Sun]
_capacity_1={"1":{"0000":1,"0100":3}}
_capacity_2={"2":{"0100":3}}
_capacity_3={"3":{"1000":6,"1100":6,"1200":6,"1300":6,"1400":6,"1500":6,"1600":6,"1700":6,"1800":6,"1900":6,"2000":6,"2100":6,"2200":6,"2300":6,"0000":6,"0100":6,"0200":6,"0300":6,"0400":6,"0500":6,"0600":6,"0700":6,"0800":6,"0900":6}}
_capacity_4={"4":{"1100":3,"0100":3}}
_capacity_5={"5":{"0100":3}}
_capacity_6={"6":{"0100":3}}
_capacity_7={"7":{"0000":1,"0100":3}}
_capacity_add={}
_service=capacity
_timezone=UTC
_type=builtin
Important
You can also configure a capacity service in the Service Management UI.


Capacity Service API

When you add a capacity service through the Configured Services interface, you can access the capacity service by its execution name and retrieve its content through the API.

In order to find the available capacity, the query provides a date and time range. The response object provides a list of time periods and available capacity for each period. Here is a list of input parameters:

GET /genesys/1/service/{capacity-execution-name}

GET /genesys/1/service/{capacity-execution-name}?start=<date and time>&end=<date and time>&timezone=<timezone>
Retrieves the capacity for the given service during the given period.
Name Required Description
start yes Start date and time in ISO-8601 format without a timezone component; for example: 2015-03-17T09:15:00.000
end yes End date and time in ISO-8601 format without a timezone component; for example: 2015-03-17T12:45:00.000
timezone yes Timezone used for "start" and "end" parameters; for example: America/Los_Angeles

For example, the following request will provide the following results:

GET /genesys/1/service/Capacity?start=2016-10-05T15:00:00.000Z HTTP/1.1
> Host: 127.0.0.1:8080
> User-Agent: curl/7.50.3
> Accept: */*
>
< HTTP/1.1 200 OK
< Set-Cookie: JSESSIONID=1opza084c3vszo631xnrtqw38;Path=/genesys;HttpOnly
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
<
{
  "error": null,
  "slots": [
    {
      "utcTime": "2016-10-05T15:00:00.000Z",
      "localTime": "2016-10-05T15:00:00.000Z",
      "durationMin": 540,
      "capacity": 6
    },
    {
      "utcTime": "2016-10-06T01:00:00.000Z",
      "localTime": "2016-10-06T01:00:00.000Z",
      "durationMin": 60,
      "capacity": 3
    },
    {
      "utcTime": "2016-10-06T11:00:00.000Z",
      "localTime": "2016-10-06T11:00:00.000Z",
      "durationMin": 60,
      "capacity": 3
    }
  ],
  "timezone": "UTC"
}

Capacity Provisioning API

Introduced in 8.5.212

Capacity Provisioning API is a new developer-friendly API that enables you to provision and update Capacity settings. It introduces a CRUD (Create/Read/Update/Delete) set of operations which are not limited by complex aspects of JSON into String option storage.

Important
This API requires Basic Authentication. Roles are not used.

POST genesys/1/admin/config/capacities

POST /genesys/1/admin/config/capacities
Creates capacity for the given service (provisioning).
JSON Body
Name Type Required Description
name string yes Execution name of the service as created in the Configured Services interface.
timezone string no Timezone that defines the translation of days and times into UTC time; the timezone is used to calculate DST switches. By default, the timezone is set to "UTC". To get the list of supported timezones, refer to Wikipedia.
weekdays list yes A list of one or multiple entries associating simplified timeslots with a capacity for a weekday.

This list can contain 1 to 7 entries only. Each entry identifies one day of the week using its 3-letter English short name.

{
      "mon": { "0900": 10, "1000": 5 },
      "tue": { "0900": 10 },
      "wed": { "0900": 10 },
      "thu": { "0900": 10 },
      "fri": { "0900": 10 },
      "sat": { "0900": 10 },
      "sun": { "0900": 10 },
}

Each weekday can be assigned 1 to 24 values representing hour slots in the form "HHmm" (24-hour format and minutes) between "0000" and "2300" and, for each hour slot, the capacity is provided. For example, "tue": { "0900": 10} means that on Tuesdays, the timeslot starting at 9:00 am allows a capacity of 10. If, in the service options, _request_time_bucket=5 (for 5 minutes), then provisioning capacity=10 means that it is possible to create 10 callbacks for each of the 5 minute slots, therefore 120 callbacks for the full hour.

adds list yes A list of additional entries representing a special day. For each element, the key must match a date in the form "YYYYMMDD" (year, month, day of the month).

Each entry can be assigned 1 to 24 values representing hour slots in the form "HHmm" (24-hour format and minutes) between "0000" and "2300".

{
      "20190501": { "0900": 10 },
      "20190508": { "0900": 10 }
}

Response

Success
HTTP code 200
HTTP message OK


Error
HTTP code 500
HTTP message Existing service name
JSON Body
{"exception":"org.springframework.web.util.NestedServletException",
"message":"Request processing failed; nested exception is com.genesyslab.gsg.services.capacity.CapacityException: Name already exists. Please choose another name."}

Example of a successful operation

POST http://localhost:8080/genesys/1/admin/config/capacities
 
{
   "name": "capacity-test",
   "timezone": "UTC",
   "weekdays": {
      "mon": { "0900": 10, "1000": 10 },
      "tue": { "0900": 10 },
      "wed": { "0900": 10 },
      "thu": { "0900": 10 },
      "fri": { "0900": 10 },
      "sat": { "0900": 10 },
      "sun": { "0900": 10 },
   },
   "adds": {
      "20190501": { "0900": 10 },
      "20190508": { "0900": 10 }
   }
}
Result
 
200 OK

GET /genesys/1/admin/config/capacities/{service_name}

Gets the capacity settings for a given service.

GET /genesys/1/admin/config/capacities/{service_name}
Gets the capacity provisioned for a given service.
URI Parameters
Name Type Required Description
URI Parameters
{service_name} string yes Execution name of the service as created in the Configured Services interface.

Response

Success
HTTP code 200
HTTP message OK
Response Body (JSON content)
Name Type Required Description
name string yes Execution name of the service as created in the Configured Services interface.
timezone string no Timezone that defines the translation of days and times into UTC time; the timezone is used to calculate DST switches. By default, the timezone is set to "UTC". To get the list of supported timezones, refer to Wikipedia.
weekdays list yes A list of one or multiple entries associating simplified timeslots with a capacity for a weekday.

This list can contain 1 to 7 entries only. Each entry identifies one day of the week using its 3-letter English short name.

{
      "mon": { "0900": 10, "1000": 5 },
      "tue": { "0900": 10 },
      "wed": { "0900": 10 },
      "thu": { "0900": 10 },
      "fri": { "0900": 10 },
      "sat": { "0900": 10 },
      "sun": { "0900": 10 },
}

Each weekday can be assigned 1 to 24 values representing hour slots in the form "HHmm" (24-hour format and minutes) between "0000" and "2300" and, for each hour slot, the capacity is provided. For example, "tue": { "0900": 10} means that on Tuesdays, the timeslot starting at 9:00 am allows a capacity of 10. If, in the service options, _request_time_bucket=5 (for 5 minutes), then provisioning capacity=10 means that it is possible to create 10 callbacks for each of the 5 minute slots, therefore 120 callbacks for the full hour.

adds list yes A list of additional entries representing a special day. For each element, the key must match a date in the form "YYYYMMDD" (year, month, day of the month).

Each entry can be assigned 1 to 24 values representing hour slots in the form "HHmm" (24-hour format and minutes) between "0000" and "2300".

{
      "20190501": { "0900": 10 },
      "20190508": { "0900": 10 }
}
Error
HTTP code 500
HTTP message Bad service name
JSON Body
{
      "exception":"org.springframework.web.util.NestedServletException",
      "message":"Request processing failed; nested exception is com.genesyslab.gsg.services.capacity.CapacityException: Name does not exist. Please choose another name."
}


Example of sucessful operation

GET http://localhost:8080/genesys/1/admin/config/capacities/capacity-test
 
Result
 
200 OK
 
{
   "name": "capacity-test",
   "timezone": "UTC",
   "weekdays": {
      "mon": { "0900": 10, "1000": 10 },
      "tue": { "0900": 10 },
      "wed": { "0900": 10 },
      "thu": { "0900": 10 },
      "fri": { "0900": 10 },
      "sat": { "0900": 10 },
      "sun": { "0900": 10 },
   },
   "adds": {
      "20190501": { "0900": 10 },
      "20190508": { "0900": 10 }
   }
}

PUT /genesys/1/admin/config/capacities/{service_name}

Updates the capacity.

Warning
The request must contain all the provisioning settings, not only changes.
PUT /genesys/1/admin/config/capacities/{service_name}
Updates the capacity.
Name Type Required Description
URI Parameters
service_name string yes Execution name of the service as created in the Configured Services interface.
Body (JSON content)
name string yes Execution name of the service as created in the Configured Services interface.
timezone string no Timezone that defines the translation of days and times into UTC time; the timezone is used to calculate DST switches. By default, the timezone is set to "UTC". To get the list of supported timezones, refer to Wikipedia.
weekdays list yes A list of one or multiple entries associating simplified timeslots with a capacity for a weekday.

This list can contain 1 to 7 entries only. Each entry identifies one day of the week using its 3-letter English short name.

{
      "mon": { "0900": 10, "1000": 5 },
      "tue": { "0900": 10 },
      "wed": { "0900": 10 },
      "thu": { "0900": 10 },
      "fri": { "0900": 10 },
      "sat": { "0900": 10 },
      "sun": { "0900": 10 },
}

Each weekday can be assigned 1 to 24 values representing hour slots in the form "HHmm" (24-hour format and minutes) between "0000" and "2300" and, for each hour slot, the capacity is provided. For example, "tue": { "0900": 10} means that on Tuesdays, the timeslot starting at 9:00 am allows a capacity of 10. If, in the service options, _request_time_bucket=5 (for 5 minutes), then provisioning capacity=10 means that it is possible to create 10 callbacks for each of the 5 minute slots, therefore 120 callbacks for the full hour.

adds list yes A list of additional entries representing a special day. For each element, the key must match a date in the form "YYYYMMDD" (year, month, day of the month).

Each entry can be assigned 1 to 24 values representing hour slots in the form "HHmm" (24-hour format and minutes) between "0000" and "2300".

{
      "20190501": { "0900": 10 },
      "20190508": { "0900": 10 }
}

Response

Success
HTTP code 200
HTTP message OK
Error
HTTP code 500
HTTP message Bad service name
JSON Body
{
      "exception":"org.springframework.web.util.NestedServletException",
      "message":"Request processing failed; nested exception is com.genesyslab.gsg.services.capacity.CapacityException: Name does not exist. Please choose another name."
}

Example of successful operation

PUT http://localhost:8080/genesys/1/admin/config/capacities/capacity-test
 
{
   "name": "capacity-test",
   "timezone": "UTC",
   "weekdays": {
      "mon": { "0900": 10, "1000": 10 },
      "tue": { "0900": 10 },
      "wed": { "0900": 10 },
      "thu": { "0900": 10 },
      "fri": { "0900": 10 },
      "sat": { "0900": 10 },
      "sun": { "0900": 10 },
   },
   "adds": {
      "20190501": { "0900": 10 },
      "20190508": { "0900": 10 }
   }
}
 
Result
 
200 OK

DELETE /genesys/1/admin/config/capacities/{service_name}

Deletes the capacity provisioning for a given service.

DELETE /genesys/1/admin/config/capacities/{service_name}
Deletes the capacity provisioning.
Name Type Required Description
URI Parameters
service_name string yes Execution name of the service as created in the Configured Services interface.


Response

Success
HTTP code 200
HTTP message OK


Error
HTTP code 500
HTTP message Bad service name
JSON Body
{
      "exception":"org.springframework.web.util.NestedServletException",
      "message":"Request processing failed; nested exception is com.genesyslab.gsg.services.capacity.CapacityException: Name does not exist. Please choose another name."
}

Example of successful operation

DELETE http://localhost:8080/genesys/1/admin/config/capacities/capacity-test
 
Result
200 OK
This page was last modified on July 31, 2019, at 05:44.

Feedback

Comment on this article:

blog comments powered by Disqus