ha-chat-reconnecting-delay
Section: channel-chatbot
Default Value: 10
Valid Values: Any integer from 0-86400
Changes Take Effect: Immediately for new connections
Introduced: 9.0.005.05
Specifies the delay between attempts when Bot Gateway Server tries to reconnect the bot to the chat session when there is a Chat Server disconnect.
ha-chat-reconnecting-attempts
Section: channel-chatbot
Default Value: 15
Valid Values: Any integer from 0-1000000
Changes Take Effect: Immediately for new connections
Introduced: 9.0.005.05
Specifies how many times Bot Gateway Server tries to reconnect the bot to the chat session when there is a Chat Server disconnect.
ha-chat-reconnecting-delay
Section: channel-chatbot
Default Value: 10
Valid Values: Any integer from 0-86400
Changes Take Effect: Immediately for new connections
Introduced: 9.0.005.05
Specifies the delay between attempts when Bot Gateway Server tries to reconnect the bot to the chat session when there is a Chat Server disconnect.
ha-chat-reconnecting-attempts
Section: channel-chatbot
Default Value: 15
Valid Values: Any integer from 0-1000000
Changes Take Effect: Immediately for new connections
Introduced: 9.0.005.05
Specifies how many times Bot Gateway Server tries to reconnect the bot to the chat session when there is a Chat Server disconnect.
ha-bot-recovery-batch
Section: channel-chatbot
Default Value: 200
Valid Values: Any integer from 1-1000000
Changes Take Effect: Immediately
Introduced: 9.0.006.04
Specifies the number of interactions in a single batch, which BGS fetches from Interaction Server during a bot recovery procedure.
ha-bot-start-unrestricted
Section: channel-chatbot
Default Value: false
Valid Values: true, false
Changes Take Effect: Immediately
Introduced: 9.0.006.04
In the case of starting multiple bots in the same chat session on different pairs of BGS instances, this option permits a bot to start even if HA support for the bot is not possible.
ha-bot-recovery-enabled
Section: channel-chatbot
Default Value: false
Valid Values: true, false
Changes Take Effect: After restart
Introduced: 9.0.006.04
Enables (true) or disables (false, the default) bot recovery mode, when BGS restores bot sessions during startup or switchover to primary mode.
How to deploy Bot Gateway Server
Prerequisites
- Make sure that your solution deploys the appropriate version of Chat Server (see Compatibility matrix, below).
- Deploy dedicated instance(s) of Digital Messaging Server (DMS) for Bot Gateway Server (see Compatibility matrix, below). Refer to the Digital Messaging Server 9.0.0 Deployment Procedure for more information.
Compatibility matrix
Component | Prerequisites |
---|---|
Chat Server |
|
Digital Messaging Server (DMS) | For information on compability, see the Digital Messaging Server and Driver Compatibility page in the Genesys Interoperability Guide. |
Genesys Mobile Services (GMS) |
|
Widgets |
|
Workspace Desktop Edition (WDE) |
|
Deployment
- Install the Bot Gateway Server either by manual installation of the IP or via the GAX deployment procedure. During the installation, you'll need to select the previously installed dedicated instance of DMS. The content of the IP will be installed in the folder media-channel-drivers\channel-chatbot.
- In file "JavaServerStarter.ini" (located in the root installation folder of DMS), change the value of genesys.mcr.stdserverex.flexchatprotocol and genesys.mcr.stdserverex.chatrequired to false.
- In Interaction Server application, add DMS application to connections tab.
- To enable high availability support, see High Availability support below.
- Using GAX, do the following in the DMS Application object:
- Add connection to the following applications:
- Interaction Server (required for core functionality)
- Universal Contact Server (required for API methods for file attachments and structured messages only).
Note: If you decide not to use these methods and not connect DMS to Universal Contact Server, you must set ucs-in-use to false.
- In the Application Options tab:
- Remove the following sections: [channel-any_name], [channel-any_name-monitor-any_name], and [endpoints:tenant_dbid].
- Import options from the file BotGatewayServer.cfg (located in the media-channel-drivers\channel-chatbot\options subfolder in the DMS installation folder). You must de-select the check box Overwrite existing options. This step adds sections [channel-chatbot], [channel-chatbot-monitor-addp], and [channel-chatbot-monitor-tls].
- In section [channel-chatbot], set the correct value for option tenant-dbid (for example, tenant-dbid=1).
- In section [log], add new option log4j2-config-profile with value log4j2.xml (if it doesn't already exist).
- Start DMS and observe logs. The following log message indicates success:
Std 42111 (ChannelConnectors.configure): initialized channel-chatbot
ImportantPlease note that while some configuration options which are applicable to new chat session can be updated during runtime, it is generally recommended to restart DMS upon application configuration changes. - Add connection to the following applications:
How to uninstall or upgrade BGS
To uninstall or upgrade BGS, do the following:
- Backup the content of the folder “media-channel-drivers\channel-chatbot\bots-repo”.
- Stop the DMS/BGS application. This can be done via GAX (on Windows it can be done via Services).
- Uninstall the BGS application:
- On Windows through Control Panel > Programs and Features.
- On Linux by running the ./uninstall.sh, script from the "media-channel-drivers\channel-chatbot\uninstall" folder.
- Verify that the folder “media-channel-drivers\channel-chatbot" was removed.
- Install the new version of BGS and populate the folder “media-channel-drivers\channel-chatbot\bots-repo” from your backup.
- Start the DMS/BGS application.
How to test BGS
To test BGS, complete the following steps:
- Activate the preinstalled EchoBot:
- In the Application Options tab of the DMS Application object, add the section [channel-chatbot-monitor-bots] and option EchoBot.jar={}.
- Restart the DMS application.
Note: Several other bot samples are provided. You can find out how to deploy and use these other sample bots by reading the "readme.txt" file located in "media-channel-drivers\channel-chatbot\samples\demo" of the DMS installation folder.
- Deploy the sample workflow (located in the subfolder media-channel-drivers\channel-chatbot\workflow in the DMS installation folder):
- Import the business process:
- either from ChatBotsGoBP.wie (require IRD and URS). Activate strategies.
- or from ChatBotsGo.zip (requires Composer and ORS). Run Generate All (ignore the error against "RESTProxy.jsp").
- If you have more than one DMS instance running (and configured in connections of Interaction Server application), you need to select your Bot Gateway Server application in the External Service block which starts the bot (located in Start strategy).
- Import the business process:
- Launch the Chat Widget with the following userdata:
{ ChatBotID: "EchoBot" , ChatBotName: "EchoBot" , ChatBotHoldup: "false" , StopBotOnAgentArrival: "false" , StopBotOnCustomerLeft : "false" , Visibility : "ALL" , Nickname : "Demo Echo Bot" , _umsChannel : "channel-chatbot" }
- As soon as the chat session starts in the Chat Widget, EchoBot connects and it echos every posted message into the chat session. You can stop EchoBot by sending one of the following texts in the chat session:
stop:keep_alive stop:force_close stop:close_if_no_agents stop
Note: In waiting mode (in other words, when ChatBotHoldup=true), with default configuration of holdup-attribute-name (which is “ScheduledAt”) Bot Gateway Server relies on the scheduled interactions functionality of Interaction Server. If this conflicts with your workflow logic, you can set holdup-attribute-name to another value. In this case you will need:
- To modify Interaction Server database schema and create correspondeing interaction custom property of type “timestamp” (refer to Custom Properties in the eServices Interaction Properties Reference Manual).
- To specify view condition in “Waiting” queue instead of using “Scheduling” (which then must be set to “Ignore Scheduling”).
High availability and sizing guidelines
High Availability support
High availability (HA) support consists of the following functional areas:
Area | Deployment Notes |
---|---|
Bot restoration after BGS switchover | The following must be done:
|
Bot context saving and restoring | Ensure that Chat Server (minimum version 8.5.308.06) is deployed in HA mode so the bot context will be preserved as a part of the chat session transcript in UCS or Cassandra. |
Reconnection to chat session | BGS supports the automatic (seamless) reconnection to the chat session in the case of a Chat Server failure. Revise the chat session reconnect schedule defined in the configuration options ha-chat-reconnecting-attempts and ha-chat-reconnecting-delay. Genesys recommends deploying HA for Chat Server in N+1 (load-balancing) mode, along with adjusting a few configuration options as described in the topic, Configure Chat Server for HA. |
Reconnection to Interaction Server and UCS | Reconnection to Interaction Server and UCS is defined via a standard application connection configuration.
|
Sizing guidelines
For High Availability (HA) support, no special configuration on BGS side is required, unless you need to define a different chat session reconnect schedule with configuration options ha-chat-reconnecting-attempts and ha-chat-reconnecting-delay. BGS supports the automatic (seamless) reconnection to the chat session in case of a Chat Server failure, and it also handles the reconnection to Interaction Server and UCS (the later is needed only for Rich Media and attachments functionality). In order for the reconnection to Interaction Server and UCS to be enabled, these applications must be configured with a primary/backup pair. Genesys recommends deploying HA for Chat Server in N+1 (load-balancing) mode, along with adjusting a few configuration options as described in the topic, Configure Chat Server for HA.
For BGS, the following performance benchmarks were obtained on hardware with "Intel Xeon E7-8880L 2 GHz" and a single instance of Bot Gateway Server. The average length of a chat session was around 55 seconds (with 5 short messages from a customer and 5 short messages from an agent), which is a quite dense scenario. A single instance of BGS was capable of maintaining around 2500 concurrent bot sessions while consuming about 2 CPU cores and 3 GB of RAM. With this given scenario, on-average about 50 new bots started every second. hen planning the deployment, the chat session density (in other words the number of messages from or to a bot, each second) and the bot startup rate (how many new bots start, each second) play a significant role in the BGS performance benchmarking.
Configure secure and ADDP connections
You can configure the following secure and ADDP connections:
Connection | Configuration |
---|---|
|
Use standard Genesys approach to provide TLS configuration on hosts, applications, ports, and ADDP parameters in connections |
DMS/BGS to Chat Server | Use a special approach described below. |
Secure connection to Chat server
When connecting a bot instance to a chat session, Bot Gateway Server connects to the host/port which is specified in the userdata of the interaction as ChatServerHost/ChatServerPort. If a port is configured as secure, Chat Server also attaches ChatServerConnType=tls. When Bot Gateway Server detects this property in the userdata, it tries to establish a secure connection. To configure these secure connections, you need to use section [channel-chatbot-monitor-tls] of the DMS application:
- Set option provider to a desired security provider (see description of options for more information). By default, a provider is set to ANY, which will allow you to establish a secure connection without using any certificate. This mode is recommended for testing purposes only.
- Configure option trusted-ca with corresponding certificate.
- Review and configure (if needed) all other options in this section.
Note:- Mutual TLS mode is not supported for BGS connection to Chat Server.
- BGS uses Java PSDK to communicate with Chat Server, for more information please refer to TLS and the Platform SDK Commons Library.
ADDP connection to Chat server
Use section [channel-chatbot-monitor-addp] in order to configure ADDP connection to Chat Server.
Enable Reporting for BGS
Genesys Historical Reporting Solution provides reports about chat bots that are run by BGS. The reporting solution consumes reporting data from BGS via Kafka integration. For full information, see Integrating BGS with Genesys Historical Reporting.