Contents
Estimated Wait Time
Estimated Wait Time (also called as 'EWT') is displayed on ChannelSelector, Callback and ClickToCall Widgets. These Widgets use getStats command to fetch the EWT data from the GMS or GES server. These servers support multiple API versions to fetch EWT and so this section will explain how you can configure StatsPlugin to use their corresponding API version that you need.
Use the ewt.apiVersion configuration option to specify the version. Each version value corresponds to a particular API of GMS/GES. For possible version values and their mapping, refer to the description section of ewt.apiVersion configuration option.
Sample configuration:
_genesys.widgets.stats.ewt.apiVersion = <version value>Further, below section will explain about each API version in-detail and how they can be configured.
API version v1
If ewt.apiVersion is configured to 'v1' (if not specified, this is the default value) the ewt.dataURL configured must be a valid GMS 8.5.1 EWT API url. If not, incorrect EWT may be displayed. Depending on this API version value, the ewt.mode configuration option can hold a set of predefined possible values for this version. They are 'urs', 'urs2' and 'stat', where 'urs2' is the default value if not specified.
Default Example =
_genesys.widgets.stats = {
ewt: {
apiVersion: "v1"
dataURL: http://somedomain/genesys/1/service/ewt-for-vq
mode: "urs2"
}
}For the above configuration, the StatsService plugin will construct the relevant dataURL as shown below, where vq1 is the value passed to vqName option of getStats command.
http://somedomain/genesys/1/service/ewt-for-vq?name=vq1&aqt=urs2
API version v2
If ewt.apiVersion is configured to 'v2', the ewt.dataURL configured must be a valid GMS 8.5.2 EWT API url. If not, incorrect EWT may be displayed. For this apiVersion, the possible values for ewt.mode are 'ewt1', 'ewt2' and 'ewt3', where 'ewt2' is the default value if not specified.
Example
_genesys.widgets.stats = {
ewt: {
apiVersion: "v2"
dataURL: http://somedomain/genesys/2/ewt
mode: "ewt2"
}
}For the above configuration, the StatsService plugin will construct the relevant dataURL as shown below, where vq1 and vq2 are the array of strings passed to vqName option of getStats command.
http://somedomain/genesys/2/ewt/ewt2?vq=vq1,vq2
API version v3
If ewt.apiVersion is set to 'v3', the ewt.dataURL configured must be a valid GES EWT API url. If not, incorrect EWT may be displayed. For this apiVersion, the possible values for ewt.mode are 'mode1', 'mode2' and 'mode3', where 'mode2' will be the default value if not specified.
Example
_genesys.widgets.stats = {
ewt: {
apiVersion: "v3"
dataURL: http://somedomain/engagement/v3/estimated-wait-time
mode: "mode2"
}
}For the above configuration, the StatsService plugin will construct the relevant dataURL as shown below, where vq1 and vq2 are the array of strings passed to vqName option of getStats command.
http://somedomain/engagement/v3/estimated-wait-time?virtual-queues=vq1,vq2&mode=mode2
Where to look for EWT data
When the getStats command is called, it fetches the EWT data from either GMS/GES server based on the configuration. This data is published in the updated event in a standard format as shown below. In this data format, the ewt section will contain the virtual queue name and the estimated waiting time as a key value pair, irrespective of any format the server responds with. The response section contains the original raw data from the server and may vary between each server API.
{
ewt: {
"VQ_GMS_Callback_Out": 9.999 // consolidated standardized EWT data for each virtual queue from either GMS/GES.
"VQ_GMS_Callback": 5.12
...
},
response: { // Original raw data from GMS/GES. The sample here shown is from GMS, it may vary for GES.
"VQ_GMS_Callback_Out": {
"time": 1506021728,
"wt": 0,
"calls": 0,
"wcalls": 0,
"pos": 1,
"wpos": 1,
"aqt": 9.999,
"ewt": 9.999,
"hit": 0
},
"VQ_GMS_Callback": {
...
}
}
}