Text List Picker
  • 05 Jun 2024
  • 2 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Text List Picker

  • Dark
    Light
  • PDF

Article summary

Overview

Text Picker Message can be used as a menu, list of products or services, and so on. With Text Picker Message, you can create a text list of items, allowing users to choose from a range of options, present multiple choices, facilitate decision-making, enhance user interaction, and streamline selection processes.

List Picker

For more information on Text Picker Message, go to the official documentation of Apple Messages for Business: List Picker Message.

Example

Below, you can see the textListPicker task reference in the Attachments State Diagram.

    {
        "abc": {    
            "type": "text_list_picker",
                "list_picker": {
                  "sections": [
                    {
                        "items": [
                              {
                                "identifier": "/textListPicker",
                                "order": 0,
                                "title": "📜 Text List Picker",
                                "subtitle": "",
                                "style": "small"
                            } 
                        ],
                        "order": 0,
                        "title": "⚙️ {{t'mainMenu}}",
                        "multipleSelection": false  
                    }
                ],
                "receivedMessage": {
                    "title": "⚙️ {{t'mainMenu}}",
                    "subtitle": "",
                    "style": "small"
                },
                "replyMessage": {
                    "title": "Ok",
                    "subtitle": "",
                    "style": "small"
                }
            }
        }
    }

Parameters

In the table below, you can see List Picker Message parameters and descriptions.

ParameterTypeRequiredDescription
typestring+A type of an object to send.
list_pickerobject+An object in which all List Picker Message parameters are described.
list_picker.sectionsarray+An array of sections - sections.
list_picker.sections[].itemsarray+An array of items.
list_picker.sections[].items[].titlestring+An element title - item.
list_picker.sections[].items[].subtitlestringAn element subtitle - item.
list_picker.sections[].items[].identifierstring+An item ID sent to Corezoid when it has been selected by the client.
list_picker.sections[].items[].stylestringDefines an item style. The default value is "icon". Available values: "icon", "small", and "large".
list_picker.sections[].items[].orderintegerA sequence number of an item in the "items" list.
list_picker.sections[].orderintegerA sequence number of a section.
list_picker.sections[].titlestring+A section title.
list_picker.receivedMessageobject+An object that describes a received message of a list items selected by the user.
list_picker.receivedMessage.titlestring+A title displayed when a client receives a message.
list_picker.receivedMessage.subtitlestring+A subtitle displayed when a client receives a message.
list_picker.receivedMessage.stylestring+Defines an item style. The default value is "icon". Available values: "icon", "small", and "large".
list_picker.replyMessageobject+An object in which is described how to display a message after a response.
list_picker.replyMessage.titlestring+A title displayed when the user has sent the message.
list_picker.replyMessage.subtitlestring+A subtitle displayed when the user has sent the message.
list_picker.replyMessage.stylestring+Defines an item style. The default value is "icon". Available values: "icon", "small", and "large".

Adding item

Text List Picker

To add an item to Text List Picker, the following object needs to be added to the items[] array:

{
    "identifier": "2",
    "order": 2,
    "title": "Option 2" ,
    "subtitle": "Subtitle for option 2" ,
    "style": "small"
} 

Was this article helpful?