Jump to: navigation, search

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

Important
This example's strategy was created with Composer 8.1.300. If you are using Composer 8.1.400 or newer, you must upgrade the Composer project.

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

  1. Caller is in Genesys Voice Platform (GVP) and requests an Agent.
  2. GVP gets the estimated wait time (EWT) using GMS Stat Server API.
  3. GVP logic determines Callback should be offered (EWT threshold).
  4. 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 a 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

  1. Caller is in GVP and requests an Agent.
  2. GVP start a new GMS service (HTTP API) and a virtual interaction is placed in the queue to hold the position of the caller.
  3. GVP gets the estimated wait time (EWT) and Position for the virtual interaction using the GMS Callback API.
  4. If the EWT-Position Threshold is not met, implying that the wait time is not long.
    1. Wait for an Agent by continuing polling GMS Callback Service API until Agent becomes available or the EWT threshold is reached.
  5. If the EWT-Position Threshold is met, implying that the wait time is long.
    1. GVP offers Caller the choice of a Callback as soon as an Agent becomes available and without losing position in the queue, or to stay on the line and wait for an Agent. Optionally informs the caller about the EWT and Position in the queue.
    2. Caller chooses Callback and hangs up. The caller is called back when an Agent is about to become available.
    3. 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

  1. Download the zip file.
  2. Extract the zip into the following directory: <gms install folder>/webapps.
  3. 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.
  4. Edit the start.ini file to make sure that it contains:
--module=server,jsp,jmx,resources,websocket,ext,plus,annotations,deploy,security,servlets,continuation
etc/jetty.xml
etc/jetty-ssl.xml
etc/jetty-deploy.xml
etc/jetty-http.xml
etc/jetty-https.xml
jetty.send.server.version=false

Important
Comment any rewrite line. You should not run the sample in a Production server.

Verify that the following URL is accessible: http://<gmshost>:<gmsport>/ClassicCallbackSample/src-gen/ClassicCallbackEntry.vxml

Configure IVR Objects

1. In Genesys Administrator > Provisioning, create a new IVR Profile named ClassicCallbackSample with a Service Type of VoiceXML.

GMSCBSampleProv.PNG

2. Provision the IVR Profile to point to the URL shown in Step 4.

GMSCBSampleProvURL.PNG

3. Setup a DID group (a trunk group to the IVR Profile mapping).

4. Configure the DID as a TrunkGroup that points to Resource Manager.

5. Make a call to the DID and follow the voice prompts.

Brief Introduction to the Code (Composer Callflow Diagrams)

ClassicCallbackEntry.callflow

  1. Common entry into the IVR samples for all of the supported scenarios.
  2. Acts as a driver application for the sample.
  3. Plays welcome message.
  4. Collects user data (account number).
    • 1111 - for Scenario 1.
    • 2222 – for Scenario 2.
    • Other – play error prompt and repeat Step 4.
  5. Based on the selected scenario, invokes the following subroutines:
    • SubGMSStatsCallback.callflow for Scenario 1.
    • SubIVRConrolledGMSCallback.callflow for Scenario 2

SubGMSStatsCallback.callflow

  1. Get EWT using GMS Statistic API .../genesys/1/statistics (EstimatedWaitTime).
  2. Get current interactions waiting in queue .../genesys/1/statistics (current_In_Queue).
  3. 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).

SubIVRControlledGMSCallback.callflow

  1. Start Callback service (USERORIGINATED).
  2. Get EWT and Position using GMS Callback API .../genesys/1/callback (check-queue-position).
  3. 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.

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).

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on April 11, 2018, at 10:26.