Article

Sending a List Picker

Let the customer choose from a list of items by sending a list picker.

Overview

When sending an interactive message using a list picker, include the listPicker dictionary in the InteractiveMessageData dictionary to describe the behavior and content of the list picker. For more information, see ListPickerData. Unless otherwise noted, all text fields support Basic Multilingual Plane of Unicode.

Example of a List Picker

The following code is an example of a multiple-selection list picker.

{ "type": "interactive", "interactiveData": { "bid": "com.apple.messages.MSMessageExtensionBalloonPlugin:0000000000:com.apple.icloud.apps.messages.business.extension", "data": { "images": [ { "data": "base64encoded-image-file", "identifier": "1" }, { "data": "base64encoded-image-file", "identifier": "2" }, { "data": "base64encoded-image-file", "identifier": "3" }, { "data": "base64encoded-image-file", "identifier": "4" } ], "listPicker": { "multipleSelection": true, "sections": [ { "items": [ { "identifier": "1", "imageIdentifier": "1", "order": 0, "style": "default", "subtitle": "Red and delicious", "title": "Apple" }, { "identifier": "2", "imageIdentifier": "2", "order": 1, "style": "default", "subtitle": "Vitamin C boost", "title": "Orange" } ], "order": 0, "title": "Fruit" }, { "items": [ { "identifier": "3", "imageIdentifier": "3", "order": 0, "style": "default", "subtitle": "Crispy greens", "title": "Lettuce" }, { "identifier": "4", "imageIdentifier": "4", "order": 1, "style": "default", "subtitle": "Organic", "title": "Cucumber" } ], "order": 1, "title": "Veggies" } ] }, "version": "1.0", "requestIdentifier": "da39a3ee5e6b4b0d3255 <truncated>" }, "receivedMessage": { "imageIdentifier": "1", "style": "small", "subtitle": "Farm fresh to you", "title": "Select Produce" }, "replyMessage": { "style": "small", "title": "Selected Produce", "subtitle": "Selected Produce" }}
{ "type": "interactive", "interactiveData": { "bid": "com.apple.messages.MSMessageExtensionBalloonPlugin:0000000000:com.apple.icloud.apps.messages.business.extension", "data": { "images": [ { "data": "base64encoded-image-file", "identifier": "1" }, { "data": "base64encoded-image-file", "identifier": "2" }, { "data": "base64encoded-image-file", "identifier": "3" }, { "data": "base64encoded-image-file", "identifier": "4" } ], "receivedMessage": { "imageIdentifier": "1", "style": "small", "subtitle": "Farm fresh to you", "title": "Select Produce" }, "replyMessage": { "style": "small", "title": "Selected Produce", "subtitle": "Selected Produce" }, "listPicker": { "multipleSelection": true, "sections": [ { "items": [ { "identifier": "1", "imageIdentifier": "1", "order": 0, "style": "default", "subtitle": "Red and delicious", "title": "Apple" }, { "identifier": "2", "imageIdentifier": "2", "order": 1, "style": "default", "subtitle": "Vitamin C boost", "title": "Orange" } ], "order": 0, "title": "You Selected" }, { "items": [ { "identifier": "3", "imageIdentifier": "3", "order": 2, "style": "default", "subtitle": "Crispy greens", "title": "Lettuce" }, { "identifier": "4", "imageIdentifier": "4", "order": 3, "style": "default", "subtitle": "Not just for your eyelids", "title": "Cucumber" } ], "order": 1, "title": "Others" } ] }, "version": "1.0", "requestIdentifier": "da39a3ee5e6b4b0d <truncated>" }, "sessionIdentifier": "1f9e59db-<truncated>"}