Drop-down

The drop-down menu is a clear method of showing a list of data, allowing users to pick their choice from the list.

AttributesMandatoryDescriptionValues
typeYesThe type of input to be displayed to the visitor

drop-down

optionsYesAn array of options you would like to display

[
  {
    "value": "0",
    "label": "Premium"
  },
  {
    "value": "1",
    "label": "Basic",
    "selected": true
  }
]

Note: A maximum of 200 options in the array with a character limit of 80 each can be given.
Options in the menu can be pre-selected by adding the "selected" key as true.

placeholderNoCustom text for option search placeholderSearch for a plan
multipleNoTo select multiple valuestrue
select_labelNoCustom text for the dropdown label, for multi-select dropdownPick your plan
min_selectionNoMinimum selection2
max_selectionNoMaximum selection4

​​

Channel compatibility and limitations

  

Pro Tip: Facebook messenger, Instagram, and WhatsApp channels do not support this card. However, you can handle it differently using the channel value in the visitor map. For example, provide an if condition statement (if the visitor's channel is Facebook or Instagram) and provide the drop-down menu options as a single or multi-select option card. 

Output

The above is an example to get the files from the visitor.

Sample code

Copied{
"type": "file",
"min": 1,
"max": 5,
"formats": ["doc", "txt", "docx", "pdf", "html", "js", "css", "ppt", "pptx", "xls", "xlsx", "jpg", "jpeg", "gif", "mp3", "mp4", "3gp", "png", "avi", "aac", "3ga", "amr", "wav", "bmp", "zip", "rar"]
}

Payload (Message object) when a file is uploaded

Copied{
    "meta": {
        "card_data": {
            "type": "file",
            "value": "45d37e0b030bf84e851867fc89461bfe4dfdc6bd2b756c96e"
        },
        "version": "1"
    },
    "files": [
        "James doc.txt",
        "James ID proof.jpg"
    ],
    "text": "James doc.txt",
    "type": "files"
}