Revision as of 15:54, September 16, 2019 by Mgionet (talk | contribs) (Update with the copy of version: DRAFT)
Jump to: navigation, search

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

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
  1. Deploy GMS using Cluster Application
  2. Configure GMS for Custom HTTP notification
  3. Configure GMS with push_notification_include_payload (optional)
Chat Server

Introduced in version 8.5.305.XX(TBD)

  1. Add new configuration option flex-push-on-join in the settings section with value "true". This forces Chat Server to acknowledge the push notification subscription during the creation of a chat session.
  2. Ensure that option flex-push-enabled is set to "true", and option flex-push-timeout is set with a larger value (for example, "86400 seconds"). For more information, see Async Requirements.
  3. Review the schedule for resending push notifications defined by the configuration options, flex-push-resend-attempts and flex-push-resend-delay.
Customer-facing chat web application
  1. The web application must supply a set of mandatory key-value pairs in the userdata for the "Request Chat" HTTP method (using a userData[key-name] notation):
    • GCTI_Chat_PushSubscribe with the value "true"
    • GCTI_GMS_NodeGroup with the GMS cluster name
    • GCTI_GMS_PushDeviceId with a unique device ID
    • GCTI_GMS_PushDeviceType with the value "customhttp"
  2. To activate the reliable delivery of push notifications, the web application must additionally supply the GCTI_GMS_PushResend key-value pair with value true in the userdata. This forces Chat Server to activate the mechanism of resending push notifications according to a schedule defined in the configuration. Chat Server will start resending push notifications if no "refresh" (in other words "pull transcript update") request is being received within the amount of time specified by option flex-push-resend-delay.
  3. The web application can additionally supply a set of key-value pairs in the userdata:
    • GCTI_GMS_PushIncludePayload with value "true"
      This forces GMS to include the payload (in other words, the chat transcript event content) with a custom-http push notification.
    • GCTI_GMS_NotifyRequestor with value "true"
      This forces Chat Server to send push notifications to GMS about the customer activity. Note: GMS will relay only the "ABANDON" event for a customer.
    • GCTI_GMS_PushProvider
      Must be provided if you specified the configuration for the non-default provider in GMS.
    • GCTI_GMS_PushDebug
      Must be provided if you specified the debug mode for the configured provider in GMS.

Additional notes

  • 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). If no GMS node is available (in other words, registered in Chat Server), Chat Server attempts to find a node from the cluster 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 provided:
    • 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.message=dummy message
customhttp.url=http://<hostname>:<port>
debug.customhttp.message=dummy message
debug.customhttp.url=http://<hostname>:<port>
pushEnabled=comet,customhttp
Comments or questions about this documentation? Contact us for support!