Revision as of 14:21, October 31, 2018 by Mgionet (talk | contribs)
Jump to: navigation, search

Rich Messaging

Quick Replies

Quick Replies offer the customer a choice of responses to the last agent or last chat bot message in the transcript. Tapping or clicking one of these Quick Replies posts that reply back to the agent as a text message. This saves the customer from having to type a response manually.

Quick Replies are very flexible. A chat bot or agent can provide context-sensitive quick replies that aid in making a selection, polite responses (such as "OK", "Thank you", "Yes, please" in the customer's native language), numeric responses, or choose from a set of preset time slots.

Quick-replies-003.jpg

JSON Examples

Quick Replies are attached to standard chat message objects by adding a few additional properties:

  • type - The type of message object received. For quick replies, the value will be "Message".
  • contentType - The type of rich message content attached to the message. For quick replies, the value will be "quick-replies".
  • content - An array of rich message content and other attachments. For quick replies, this will contain quick reply objects.

Quick Replies can be attached to message objects in one of two ways:

Top level of message object

Note, this example is only showing properties related to quick replies. All other properties normally included inside a message object have been omitted.

{
    "type": "Message",
    "contentType": "quick-replies",
    
    "messageType": "text",
    "text": "Will 3:00PM tomorrow work for you?",
 
    "content": [

        {"id": 1, "type": "quick-reply", "action": "message","text": "Sounds Good."},
        {"id": 2, "type": "quick-reply", "action": "message","text": "No, sorry."},
        {"id": 3, "type": "quick-reply", "action": "message","text": "What else?"}
    ]
}

Inside the eventAttributes property

Note, this example is only showing properties related to quick replies. All other properties normally included inside a message object have been omitted.

{
    "messageType": "text",
    "text": "Will 3:00PM tomorrow work for you?",
 
    "eventAttributes": {

        "structured-content": {

            "genesys-chat": {

                "content": {

                    "type": "Message",
                    "contentType": "quick-replies",
                    
                    "content": [

                        {"id": 1, "type": "quick-reply", "action": "message","text": "Sounds Good."},
                        {"id": 2, "type": "quick-reply", "action": "message","text": "No, sorry."},
                        {"id": 3, "type": "quick-reply", "action": "message","text": "What else?"}
                    ]
                }
            }
        }
    }
}

The path, starting from inside the method object, is eventAttributes.structured-content.genesys-chat.content. The rich message JSON can be sent as a JSON string or as normal JSON when using this method.

Comments or questions about this documentation? Contact us for support!