Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Pega Customer Service Chat engine architecture

Updated on January 29, 2021

Pega Customer Service Chat engine architecture supports synchronous communication between customers and customer service representatives(CSRs), withstanding multiple concurrent users and messages. You can further scale this architecture as the number of users increases.

Pega Customer Service Implementation Guide

The following figure shows a layered chat engine architecture and explains how the data flows between a customer and a CSR through multiple layers and components:

Chat engine architecture layers and components
Chat engine architecture that explains the data flow between a customer and a CSR

The chat engine architecture primarily consists of the following parts:

Chat client
A JavaScript-based chat application that runs in the browser of end-user desktop computers and mobile devices.
Chat server engine
A multitenant server that is a combination of multiple servers responsible for handling the entire message communication between a customer and a CSR.

The chat server has the following components:

  • WebSocket Server
  • Extensible Messaging and Presence Protocol (XMPP) Server
  • Web Server(Express)
  • Object Interface

Layered architecture

The chat engine uses the layered architecture that contains the following layers:

Chat engine architecture layers

LayerDescription
Presentation layerThis layer handles the incoming data to the server from the CSR and the outgoing data from the server to the customer and in the opposite direction. The presentation layer for the CSR is the Interaction Portal, and the presentation layer for the customer is a web chatbot on the website.
Business layer

This layer handles all the business logic that takes place in the chat server. The layer is responsible for maintaining all the complex communications of WebSocket and XMPP, processing the chat events, and sending that information to the presentation layer.

Data layer

This layer handles the data storage in the database. Apart from containing the object-relational database, this layer also includes the cache that stores a subset of data.

Communication process

When a customer initiates a chat, the chat message goes to the WebSocket client from where the message passes over a TCP connection to the WebSocket server. The WebSocket server redirects the message to the chat event handlers that are responsible for processing all chat events. The chat event handlers broadcast the request through sockets to the XMPP server. The Custom to XMPP file in the XMPP server converts the message to a stanza and sends the converted text to the CSR.

When the CSR responds, the XMPP server receives a ping (response) in the form of a stanza. The XMPP to Custom file converts the stanza into a message and then broadcasts the message to the WebSocket from where the message reaches the WebSocket server. Finally, the WebSocket server sends this message over the socket connection to the WebSocket client that resides in the customer's browser.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us