Jump to: navigation, search

High-Level Architecture


This article discusses the components that make up Genesys Web Engagement. Before you dive in, take a look at What is Web Engagement?

As mentioned in that article, Web Engagement has the following basic architecture:


As shown here, Web Engagement provides web services that connect your website with the Genesys contact center solution using:

  • Browser Tier Agents (JavaScript code snippets) which are inserted into your web pages; they run in the visitor's browser and track their browsing activity.
  • A Web Engagement Server, which includes the Web Monitoring Service and the Web Notification Service. This server is responsible for managing the data and event flow, based on a set of configurable rules and the visit's defined business events. It also stores data, submits information to the Genesys solution, and manages engagement requests to the Genesys contact center solution.

Browser Tier Agents

The Browser Tier Agents are implemented as JavaScript components that run in the visitor's browser. To enable monitoring on a web page, you create a short standardized section of JavaScript code with the Genesys Administrator Extension plug-in and then add this code snippet to the pages of your site.

When a customer visits the webpage, the code retrieved within the page loads all the necessary artifacts like the JavaScript libraries and Domain Specific Language (DSL) that contains the definitions of your Business Events.

The DSL covers:

  • The HTML elements to monitor.
  • The custom business events to send to the Web Engagement Server.
  • The data to include in the events.

The Browser Tier generates categorized standard System and custom Business events, defined in the DSL definitions, and sends them to the Web Engagement Server over HTTP.

Browser interactions at runtime.

Genesys Web Engagement provides the following browser tier agents:

  • The Monitoring Agent records the web browsing activity. It generates basic system events such as VisitStarted, PageEntered, and additional custom business events, such as 'add-to-shopping cart'. These events are sent to the Web Engagement Server for further processing. For further information about events, see Event Workflow. For details about implementing monitoring, see Monitoring.
  • The Notification Agent allows a web server to push data to a browser, without the browser explicitly requesting it, providing an asynchronous messaging channel between server and browser. It is used for presenting the engagement invite. For details about implementing notification, see Notification.
  • The Engagement Agent provides the engagement mechanism, chat communication and web callback initialization. For details about implementing engagement, see Engagement.

If you are only interested in Web Engagement's monitoring features, you need to configure your instrumentation script accordingly. See Configuring the Instrumentation Script for details.

Web Engagement Server

Working with the Browser Tier

The Genesys Web Engagement Server receives System and Business events from the browser's Monitoring Agent through its RESTful interface.

  • System events track basic customer activities on your website. There are six of them, coming in two different flavors:
    • The Visit-related events, which are VisitStarted, PageEntered, and PageExited;
    • The Identity-related events, which are SignIn, SignOut, and UserInfo. See Visitor Identification for further details.
  • Business events are additional custom events that you can create by implementing Advanced Engagement:

For details about how Business and System events are structured, see Events Structure.

The Monitoring JavaScript Agent gets a list of categories from the Web Engagement Server and categorizes each event, based on the event data, prior to sending it to the server. The integrated Complex Event Processing (CEP) engine processes incoming events against the business rules and creates actionable events when the required conditions are met. For more information on rules, consult the documentation for Genesys Rules System.

The Web Engagement Server also sends invitation notifications to the Notification Agent injected into the visitor's browser.

Hosting Static Resources

The Web Engagement Server is also responsible for hosting static resources, which are used in web applications such as Invite Widget, Chat Widget, and so on. These resources are all available to the newly created Web Engagement application in the GWE_installation\apps\application_name\resources\ folder. After deploying an active application into Web Engagement Server, these resources will be located in the GWE_installation\server\gwe\resources\ folder.

Note: When a new GWE application is deployed, all resources belonging to previously deployed applications are removed.

    resources.properties // app configuration file
-drl                     // app drl files
    domain-model.xml     // default DSL file
    callback-en.json     // default English localization file for callback widget
    callback-fr.json     // default French localization file for callback widget
-_composer_projects      // GRDT and SCXML Composer projects
ads.html                 // sample advertisement widget
callback.html            // default web callback widget
chatTemplates.html       // scripts for template-based modification of chat widget
chatWidget.html          // default chat widget
invite.html              // default invitation widget

You can add your own static resources under the Web Engagement Server, but Genesys recommends you do this only if the resources are related to the Genesys Web Engagement solution. Alternatively, you can host your static resources under a third-party server, as long as it supports all the features required for the Web Engagement solution.


The Web Engagement Server supports the JSONP protocol for all resources. JSONP stands for “JSON with Padding” and it is a workaround for loading data from different domains. It loads the script into the head of the DOM and thus you can access the information as if it were loaded on your own domain, by-passing the cross domain issue.

For more information about JSONP, see http://en.wikipedia.org/wiki/JSONP.

For example, for this request:

http://{gwe server}/server/resources/invite.html?obj=myObj&callback=myMethod

the server returns following response body:

myObj.myMethod('<content of http://{gwe server}/server/resources/invite.html>');
Cross-origin resource sharing

Cross-origin resource sharing (CORS) is a mechanism that allows many resources (for example, fonts, JavaScript, and so on) on a web page to be requested from another domain outside the domain from which the resource originated. In particular, JavaScript's AJAX calls can use the XMLHttpRequest mechanism. These "cross-domain" requests would otherwise be forbidden by web browsers due to the same-origin security policy.

For more information about cross-origin sharing, see http://en.wikipedia.org/wiki/Cross-origin_resource_sharing.

The Web Engagement Server can serve pre-compressed static content as a transport encoding and avoid the expense of on-the-fly compression. So if a request for GPE.js is received and the file GPE.js.gz exists, then it is served as GPE.js with a gzip transport encoding. By default, the Web Engagement solution ships all JavaScript resources in minified and pre-compressed version.

Working with the Enterprise Tier

The Web Engagement Server is also the engagement's entry point to the Genesys servers. It delivers web and visitor information to the contact center, which allows that information to be correlated with contact information.

On this end, the Web Engagement Server stores events, manages contexts and histories in its Cassandra database, and submits the appropriate data to the other Genesys servers.

When the Web Engagement Server is notified that it should present a proactive offer, it retrieves the engagement information, based on the visit attributes. Then, if the SCXML strategies allow it, the proactive offer is displayed.

If the visitor accepts, the Engagement service connects to the Genesys servers. Once the connection is established, the service manages the engagement context information across the visit.

The Web Engagement Server is also responsible for accepting rules deployed by the Genesys Rules Authoring Tool (GRAT).

Database and Reporting

Web Engagement processes a large amount of data. To make this happen quickly enough, Genesys has combined three technologies into the database and reporting layers:

  • Apache Cassandra is an open source distributed database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure.
  • Elasticsearch is a search server that provides a distributed, multitenant-capable full-text search engine with a RESTful web interface and schema-free JSON documents.
  • Apache Spark is an open source cluster computing framework.

Cassandra and Elasticsearch clusters are used in the Operational Cluster that stores data for realtime processing. This Cassandra data is indexed by Elasticsearch for quick access, and the combined results are replicated in a separate Cassandra cluster in the Reporting Cluster. This Reporting Cluster uses a Spark cluster that massages the data in the Cassandra reporting cluster for more sophisticated reporting.

The following diagram provides a highly simplified view of how it all fits together.

Gwe-server db.png

Event Workflow

The Genesys Web Engagement Server receives system and business events from the browser's Monitoring Agent. This event flow is used to create actionable events which generate requests to the Genesys solution, and make the engagement, follow up, and additional actions with the Genesys solution possible. (Note that an actionable event does not always result in a notification—sometimes an action could be "do nothing.")

Here is a high-level view of this:

Gwe-event sequence1.png Gwe-event sequence2.png Gwe-event sequence3.png

As you can see, when a customer visits your website, he or she interacts with your web pages. The Monitoring Agent handles this traffic and translates it into the relevant System and Business events, according to your DSL and category information.

The agent then submits the events to the Web Engagement Server where the Complex Event Processing embedded in the server determines the actionable events ("Hot lead Identified" in the above figure) and carries out further processing. This includes the use of SCXML-based routing strategies to determine whether to proactively engage, to follow up, or to implement any other action.

Comment on this article:

blog comments powered by Disqus
This page was last modified on 30 September 2016, at 11:50.