flex-push-content
Section: settings
Default Value: session-id, user-id
Valid Values: Any combination of: app-dbid, secure-key, session-id, user-id
Changes Take Effect: Immediately
Introduced: 8.5.311.06
Defines the content for flex-push notifications. It can include any combination of the following values: app-dbid, secure-key, session-id, user-id.
flex-push-content
Section: settings
Default Value: session-id, user-id
Valid Values: Any combination of: app-dbid, secure-key, session-id, user-id
Changes Take Effect: Immediately
Introduced: 8.5.311.06
Defines the content for flex-push notifications. It can include any combination of the following values: app-dbid, secure-key, session-id, user-id.
flex-push-content
Section: settings
Default Value: session-id, user-id
Valid Values: Any combination of: app-dbid, secure-key, session-id, user-id
Changes Take Effect: Immediately
Introduced: 8.5.311.06
Defines the content for flex-push notifications. It can include any combination of the following values: app-dbid, secure-key, session-id, user-id.
flex-push-content
Section: settings
Default Value: session-id, user-id
Valid Values: Any combination of: app-dbid, secure-key, session-id, user-id
Changes Take Effect: Immediately
Introduced: 8.5.311.06
Defines the content for flex-push notifications. It can include any combination of the following values: app-dbid, secure-key, session-id, user-id.
flex-push-content
Section: settings
Default Value: session-id, user-id
Valid Values: Any combination of: app-dbid, secure-key, session-id, user-id
Changes Take Effect: Immediately
Introduced: 8.5.311.06
Defines the content for flex-push notifications. It can include any combination of the following values: app-dbid, secure-key, session-id, user-id.
flex-push-resend-delay
Section: settings
Default Value: 15
Valid Values: Any integer from 1-86400
Changes Take Effect: Immediately
Introduced: 8.5.308.06
Specifies how long, in seconds, Chat Server waits before resending flex-push notification when resend functionality is requested by a chat participant. Chat Server continues to resend flex-push notification until it reaches the total specified number of times, specified by flex-push-resend-attempts.
flex-push-content
Section: settings
Default Value: session-id, user-id
Valid Values: Any combination of: app-dbid, secure-key, session-id, user-id
Changes Take Effect: Immediately
Introduced: 8.5.311.06
Defines the content for flex-push notifications. It can include any combination of the following values: app-dbid, secure-key, session-id, user-id.
flex-push-resend-delay
Section: settings
Default Value: 15
Valid Values: Any integer from 1-86400
Changes Take Effect: Immediately
Introduced: 8.5.308.06
Specifies how long, in seconds, Chat Server waits before resending flex-push notification when resend functionality is requested by a chat participant. Chat Server continues to resend flex-push notification until it reaches the total specified number of times, specified by flex-push-resend-attempts.
flex-push-resend-attempts
Section: settings
Default Value: 10
Valid Values: Any integer from 0-1000000
Changes Take Effect: Immediately
Introduced: 8.5.308.06
Specifies how many times Chat Server tries to resend a flex-push notification when the resend functionality is requested by a chat participant. Chat Server stops resending flex-push notification when either a delivery confirmation is being received or the total specified number of attempts is reached. Setting this option to "0" completely disables resending these flex-push notification (except for the first notice).
flex-push-timeout
Section: settings
Default Value: 300
Valid Values: Any integer from 1-1728000
Changes Take Effect: Immediately
Introduced: 8.5.202.09 (Restricted); 8.5.301.06 (Generally Available)
Modified: 8.5.310.09
Specifies timeout (in seconds) after which Chat Server sends ping notification for push-flex connected client. If no request from the client is submitted within the next "flex-push-timeout", Chat Server activates flex-disconnect-timeout. Inactivity is defined as the absence of protocol requests, not the absence of messages
flex-push-enabled
Section: settings
Default Value: true
Valid Values: true, false
Changes Take Effect: Immediately
Modified: 8.5.308.06
Enables or disables new connection registrations for push-flex notifications. Push-flex notifications are used by the web API for CometD and push messaging on either mobile devices or HTTP server.
flex-push-on-join
Section: settings
Default Value: false
Valid Values: true, false
Changes Take Effect: Immediately
Introduced: 8.5.315.05
Prohibits or allows a push-flex notification subscription during the chat session creation (via REST "Chat API Version 2").
push_notification_include_payload
Section: chat.service-name
Default Value: false
Valid Values: true, false
Changes Take Effect: Immediately
Introduced: 8.5.201.04
If true, the chat event payload is included in customhttp notifications the same as with CometD notifications. Note: Applicable to Chat V2 with CometD and customhttp only. Not applicable to FCM and iOS push events.
Push notifications via GMS to HTTP server
Starting with version 8.5.311.06, the Chat solution allows you to request push (in other words, unsolicited) notifications through Genesys Mobile Server (GMS) to an HTTP server even when a customer-facing chat web application (Chat Widget) communicates with GMS via "Chat API Version 2". Previously, this was only possible with "Chat API Version 2 with CometD".
To enable this functionality, do the following:
Application | Instructions |
---|---|
GMS |
|
Chat Server |
|
Customer-facing chat web application |
|
Additional notes
- It is important to provide adequate throughput of the Web Server which processes the customhttp notification. The latency (in other words, the processing time for a single HTTP POST request) must be as low as possible as GMS sends all notifications sequentially. The next request is only sent after a reply from the previous one. For example, if the latency is 5 milliseconds on average, then a single GMS node is able to send 200 notifications per second. Enabling GCTI_GMS_PushResend could increase the volume of notifications, so it must be taken into account.
- If push notifications are enabled, Chat Server tries to find the GMS node in the GMS cluster (specified by GCTI_GMS_NodeGroup) and to associate that found node for further notifications (until the node is disconnected). Starting with version 8.5.311.06, if no GMS node is available (in other words, registered in Chat Server) in a given cluster, Chat Server selects another GMS cluster to seek for an available GMS node. Otherwise, if no other cluster and/or node is available, Chat Server attempts to find an available node the next time an activity is generated in the chat session or upon chat session restoration in HA mode.
- If reliable delivery of a push notification is not requested by sending GCTI_GMS_PushResend, no attempts to resubmit the same push notification will be made in case of a delivery failure between the GMS and HTTP server, and between Chat Server and GMS. The following log messages are logged in the event of this error condition:
- In GMS: "Dbg 09900 [com.genesyslab.PCT.invoker.default] DC Chat Server Persistent Listener: Event 17 was not (GMS is not running in full mode or incompatible Chat Server version) pushed for delivery to customhttp for device..."
- In Chat Server: "Trc 59758 push-flex: could not send notification - no gms node found in group=..."
Sample configuration for custom HTTP notifications in GMS
[chat] enable_notification_mode=true push_notification_include_payload=true [push] customhttp.url=http://<hostname>:<port>/<path> pushEnabled=comet,customhttp
Ensure that the [push] section does not contain the option customhttp.message. If it is present, the value of this option overrides the content of push notification.
Reliable push notifications delivery
When requesting reliable delivery for a push notification (in other words, when GCTI_GMS_PushResend=true):
- All push notifications are of type:PushUrl and participantId: 0 (which is not a valid participant ID).
- No payload is provided in the push notification. Instead, each push notification must be considered a trigger to send a “Refresh” request to GMS in order to obtain the newly published events in the chat session.
The following is the sample JSON which is delivered in the HTTP request for a push notification.
{ "message":{ "secureKey":"G1xBGx9aTUYVBEECD0UZAVwTQEQDFgRZFVJTXEI3QSFFIShAHyVcRUI2GUJXXUEeAikkNSNTJFddQRc=", "chatId":"deprecated", "nextPosition":17, "messages":[ { "from":{ "nickname":"", "participantId":0, "type":"Client" }, "index":0, "text":"PUSH-NOTIFICATION", "type":"PushUrl", "utcTime":1568662361000, "userData":{ "notify-attempt":"0", "notify-position":"16", "secure-key":"c6c9a6d96dc14cef5f94", "app-dbid":"131", "user-id":"007D5D7FE31F001B", "session-id":"00020aEQFW6V0029" } } ], "alias":"0", "chatEnded":false, "userId":"deprecated", "statusCode":0, "monitored":false }, "deviceId":"a1a23456789123456789" }
Important field descriptions
Field | Description |
---|---|
participantId | Always 0 and must be ignored. |
notify-position | Contains the starting position of content not retrieved. It can have a value of -1 meaning that chat participant has been removed from the chat session. |
notify-attempt | Contains the number of attempts to deliver the push notification. |
secure-key | Secure key to be used with GMS REST API. The presence depends on flex-push-content. |
app-dbid | App DBID (or alias) to be used with GMS REST API. The presence depends on flex-push-content. |
user-id | User ID to be used with GMS REST API. The presence depends on flex-push-content. |
session-id | Session ID to be used with GMS REST API. The presence depends on flex-push-content. |
chatEnded | If the value is true it means the chat session is finished. |
Warning Starting with version 8.5.311.06, the secure-key for REST API requests is provided in the userData based on the value of the configuration option flex-push-content. The secureKey provided in message must be ignored by the REST API client, and only used for the CometD API. |