Contents
Classic Callback Sample
You can download the Classic Callback (VoiceXML) sample application via a zip file. The zip file also includes Composer callflow diagrams.
Genesys Mobile Services Classic Callback Sample
Overview
The Genesys Mobile Services (GMS) Classic Callback sample illustrates how to implement an IVR (Genesys Voice Platform VoiceXML) application that communicates with GMS and performs classic Callback scenarios. It is primarily meant to be used by developers as a reference to build a Composer callflow application that interacts with GMS.
Scenarios
The following scenarios are implemented as one Composer project, which consists of one driver callflow and a corresponding subcallflow for each scenario.
IVR Controlled Callback Using GMS Stat Server API
- Caller is in Genesys Voice Platform (GVP) and requests an Agent.
- GVP gets the estimated wait time (EWT) using GMS Stat Server API.
- GVP logic determines Callback should be offered (EWT threshold).
- GVP offers Caller the choice of a Callback ASAP or to stay on the line and wait for an Agent.
- Caller chooses Callback ASAP and hangs up. GVP creates new service request to GMS using Callback API. Caller is called back when an Agent about to become available.
- Caller chooses to stay on the line and wait for an Agent, and the call is connected when an Agent is available.
IVR Controlled Callback Using GMS Callback API
- Caller is in GVP and requests an Agent.
- GVP start a new GMS service (HTTP API) and a virtual interaction is placed in the queue to hold the position of the caller.
- GVP gets the estimated wait time (EWT) and Position for the virtual interaction using the GMS Callback API.
- If the EWT-Position Threshold is not met, implying that the wait time is not long.
- Wait for an Agent by continue polling GMS Callback Service API until Agent become available or the EWT threshold is reached.
- If the EWT-Position Threshold is met, implying that the wait time is long.
- GVP offers Caller the choice of a Callback as soon as an Agent become available and without losing position in the queue, or to stay on the line and wait for an Agent. Optionally informs caller about the EWT and Position in the queue.
- Caller chooses Callback and hangs up. Caller is called back when an Agent is about to become available.
- Caller chooses to stay on the line and wait for an Agent, and the call is connected when an Agent is available.
GMS Controlled Callback After Call Transfer From IVR
Note: Introduced in GMS 8.5.003.
- Caller is in GVP and requests an Agent.
- GVP transfers the call to the routing point provisioned for GMS Callback Classic Call inbound service.
- GMS Classic Callback inbound service starts a new GMS service (with parameter _offer_callback=true), and then transfers the call to the GMS service.
- GMS Service gets the estimated wait time (EWT) and Position for the virtual interaction from URS.
- If the EWT-Position Threshold is not met, implying that the wait time is not long:
- Wait for an Agent by continue polling GMS Callback Service API until an Agent become available or until the EWT threshold is reached.
- If the EWT-Position Threshold is met, implying that the wait time is long:
- GMS Service invokes GVP to offer Caller the choice of a Callback as soon as an Agent become available and without losing position in the queue, or to stay on the line and wait for an Agent.
- Caller chooses Callback and hangs up. Caller is called back when an Agent is about to become available.
- Caller chooses to stay on the line and wait for an Agent, and the call is connected when an Agent is available.
Prerequisites
In order to use this sample application, the following prerequisites are required:
- GMS installed and running, with JDK 1.7.
- The services that you want to use must be deployed.
- The sample can be deployed on all web servers supported by Composer 8.5.
Running the Sample
- Download the zip file.
- Extract the zip into the following directory: <gms install folder>/webapps.
- Modify the <gmsinstalldir>/webapps/src/AppRoot.vxml file to set values for the following variables, which are dependent on the environment:
- gms_uri
- gms_service_name
- stat_api_params – this value should be same as the Virtual Queue specified in the GMS service configuration for the preceding service (gms_service_name)
- gms_inbound_service_rp – any routepoint where a strategy/workflow can route the call to the agent.
- gms_transfer_routepoint - routepoint where the GMS classic call inbound service is configured.
- Verify that the following URL is accessible: http://<gmshost>:<gmsport>/ClassicCallbackSample/src-gen/ClassicCallbackEntry.vxml
- In Genesys Administrator > Provisioning, create a new IVR Profile named ClassicCallbackSample with a Service Type of VoiceXML.
6. Provision the IVR Profile to point to the URL shown in Step 4.
7. Setup a DID group (a trunk group to the IVR Profile mapping).
8. Configure the DID as a TrunkGroup that points to Resource Manager.
9. Make a call to the DID and follow the voice prompts.
About the Code (Composer Callflow Diagrams)
ClassicCallbackEntry.callflow
- Common entry into the IVR samples for all of the supported scenarios.
- Acts as a driver application for the sample.
- Plays welcome message.
- Collects user data (account number).
- 1111 - for Scenario 1.
- 2222 – for Scenario 2.
- 3333 - for Scenario 3
- Other – play error prompt and repeat Step 4.
- Based on the selected scenario, invokes the following subroutines:
- SubGMSStatsCallback.callflow for Scenario 1.
- SubIVRConrolledGMSCallback.callflow for Scenario 2
- SubGMSControlledCallback.callflow for Scenario 3
SubGMSStatsCallback.callflow
- Get EWT using GMS Statistic API .../genesys/1/statistics (EstimatedWaitTime).
- Get current interactions waiting in queue .../genesys/1/statistics (current_In_Queue).
- Check Callback offer threshold.
- Offer Callback.
- Invoke SubCallbackOfferDialog.
- Callback declined.
- Yes, default route the call (continue with no Callback).
- No, exit.
- Do not offer Callback.
- Default route the call (continue with no Callback).
- Offer Callback.
SubIVRControlledGMSCallback.callflow
- Start Callback service (USERORIGINATED).
- Get EWT and Position using GMS Callback API .../genesys/1/callback (check-queue-position).
- Check agent available.
- Agent available.
- Get access number.
- Blind transfer to access number.
- Exit.
- Agent not available, so check Callback offer threshold.
- Offer Callback.
- Invoke SubCallbackOfferDialog.
- Callback declined.
- Yes, default route the call (continue with no Callback).
- No, exit.
- Do not offer Callback.
- Go to Step 2.
- Offer Callback.
- Agent available.
SubGMSControlledCallback.callflow
Note: Introduced in GMS 8.5.003.
- Transfer call to GMS Transfer Routing Point (gms_transfer_routepoint).
SubCallbackOfferDialog
- Callback options menu.
- Option#1 - Callback ASAP.
- Input customer Callback number.
- Check GMS service exists.
- No; create GMS Service (USERTERMINATED, customer number).
- Yes; change GMS Service to USERTERMINATED (customer number).
- Prompt goodbye.
- Disconnect call.
- Option#2 – Callback Scheduled.
- Currently not supported.
- Option#0 – Callback Declined.
- Exit.
- Option#1 - Callback ASAP.
Disclaimer
THIS CODE IS PROVIDED BY GENESYS TELECOMMUNICATIONS LABORATORIES, INC. ("GENESYS") "AS IS" WITHOUT ANY WARRANTY OF ANY KIND. GENESYS HEREBY DISCLAIMS ALL EXPRESS, IMPLIED, OR STATUTORY CONDITIONS, REPRESENTATIONS AND WARRANTIES WITH RESPECT TO THIS CODE (OR ANY PART THEREOF), INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. GENESYS AND ITS SUPPLIERS SHALL NOT BE LIABLE FOR ANY DAMAGE SUFFERED AS A RESULT OF USING THIS CODE. IN NO EVENT SHALL GENESYS AND ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, ECONOMIC, INCIDENTAL, OR SPECIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ANY LOST REVENUES OR PROFITS).