This page was last edited on June 7, 2019, at 17:09.
Comments or questions about this documentation? Contact us for support!
The Pacing API gives external components access to your pacing information, using two different methods:
Use this method to determine whether reactive traffic is displacing proactive traffic. If so, you may want to take action, such as limiting the number of chat interactions that are initiated in response to the reactive requests. To use this method, you must configure the Pacing Algorithm to use a type that predicts reactive engagements, that is, either SUPER_PROGRESSIVE_DUAL or PREDICTIVE_B_DUAL.
Method | GET | |||
---|---|---|---|---|
URL | http://<gwe_server_host:gwe_server_port>/server/data/pacing/reactiveState?channel=<channelName>&groups=[<names>]
The HTTPS schema is also allowed, if configured. | |||
Parameters | ||||
Name | Value | Mandatory | Description | |
channel | string | yes | The name of a media channel, which determines if a reactive engagement is possible. Valid value is chat. | |
groups | string | no | The list of agent group names. If this parameter is not defined, then the reactive pacing result is consolidated over all groups. Note: If you want to specify more than one group, you must use the following syntax: &groups=Group1_name&groups=Group2_name... |
Response | {reactiveState : <value>}
The request returns the value of the pacing reactive state. This value is the probability that a new reactive engagement should be allowed for a visitor. |
---|---|
Response Type | JSON |
<script>
$.ajax({url: 'http://{server}:{port}/server/data/pacing/reactiveState?channel=chat'})
.done(function( result ) {
console.log('result: ' + JSON.stringify(result.reactiveState));
var rnd = Math.random();
if(rnd <= result.reactiveState) {
// Do something
}
});
</script>
Use this method to figure out how many agents are ready to process incoming requests.
Note: This method does not take into account the extent to which reactive traffic is displacing proactive traffic. Because of this, if you use its results without taking other factors into account, you may reduce the effectiveness of your proactive campaigns.
Method | GET | |||
---|---|---|---|---|
URL | http://<gwe_server.host:gwe_server.port>/server/data/pacing/channelCapacity?channel=<channelName>&groups=[<names>]
The HTTPS schema is also allowed, if configured. | |||
Parameters | ||||
Name | Value | Mandatory | Description | |
channel | string | yes | The name of a media channel for which you want to determine the count of ready agents. Valid value is chat. | |
groups | string | no | The list of agent group names. If this parameter is not defined, then the resulting agent count is consolidated over all groups. Note: If you want to specify more than one group, you must use the following syntax: &groups=Group1_name&groups=Group2_name... |
Response | {capacity : <value>}
The request returns the count of ready agents in the specified group or groups—or for the entire channel, if no group is specified—according to statistics provided by Stat Server. |
---|---|
Response Type | JSON |
<script>
$.ajax({url: 'http://{server}:{port}/server/data/pacing/channelCapacity?channel=chat'})
.done(function( result ) {
console.log('Ready agents capacity is: ' + JSON.stringify(result.capacity));
});
</script>