watson-developer-cloud / conversation-connector

The Conversation connector is a set of components that mediate communication between your Conversation workspace and a Slack or Facebook app. Use the connector to deploy a chat bot that Slack or Facebook Messenger users can interact with.
Apache License 2.0
28 stars 62 forks source link

MVP: Support for options.value as object #35

Closed aarora91 closed 6 years ago

aarora91 commented 6 years ago

We want to allow options[i].value to be an object with input.text attribute. The structure of the options list in generic will then be:

{
  "generic": [
    {
      "response_type": "option",
      "title": "Select a location",
      "options": [
        {
          "label": "Location 1",
          "value": {
            "input": {
              "text": "Value1"
            }
          }
        },
        {
          "label": "Location 2",
          "value": {
            "input": {
              "text": "Value2"
            }
          }
        },
        {
          "label": "Location 3",
          "value": {
            "input": {
              "text": "Value3"
            }
          }
        }
      ]
    }
  ]
}