Image List Picker
- 05 Jun 2024
- 2 Minutes to read
- Contributors
- Print
- DarkLight
- PDF
Image List Picker
- Updated on 05 Jun 2024
- 2 Minutes to read
- Contributors
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
With Image List Picker, you can create a list of elements with text and images.
For more information on Image List Picker, go to the official documentation of Apple Messages for Business: List Picker Message.
Example
Below, you can see the imageListPicker task reference in the Attachments State Diagram.
{
"abc": {
"type": "image_list_picker",
"images": [
{
"identifier": "0",
"url": "https://i5.walmartimages.com/asr/2b4a8c7c-941f-4575-b1fe-2479c8024077_1.b3c876a51211d14cbdd5fc631995809c.jpeg"
},
{
"identifier": "1",
"url": "https://i5.walmartimages.com/asr/d43233f6-920f-4b9d-9b97-80a31487901b_1.9ecb6491c6307ebd24e5426dfc9ee4e8.jpeg"
}
],
"list_picker": {
"sections": [
{
"items": [
{
"identifier": "1",
"imageIdentifier": "0",
"order": 0,
"title": "Gala Apples",
"subtitle": "Price: $1.57 / each",
"style": "default"
},
{
"identifier": "2",
"imageIdentifier": "1",
"order": 1,
"title": "Navel Oranges",
"subtitle": "Price: $0.68 / each",
"style": "default"
}
],
"order": 0,
"title": "Fruit",
"multipleSelection": true
}
],
"receivedMessage": {
"style": "small",
"subtitle": "Farm fresh to you",
"title": "✅ Select Produce"
},
"replyMessage": {
"style": "small",
"title": "✅ Selected Produce",
"subtitle": "Selected Produce"
}
}
}
}
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
type | string | + | A type of an object to send. |
images | array | An array of objects with images. | |
images[].url | string | A link to an image. | |
images[].identifier | string | + | An image ID used for substitution in the array items. |
list_picker | object | + | An object in which all Text List Picker parameters are described. |
list_picker.sections | array | + | An array of sections. |
list_picker.sections[].items | array | An array of items. | |
list_picker.sections[]items[].title | string | + | An item’s title. |
list_picker.sections[]items[].subtitle | string | An item’s subtitle. | |
list_picker.sections[]items[].imageIdentifier | string | An image ID value from the array “images”. | |
list_picker.sections[]items[].identifier | string | + | An item ID sent to Corezoid when it has been selected by the client |
list_picker.sections[]items[].style | string | Defines an item style. The default is "icon". Available values: "icon", "small", or "large". | |
list_picker.sections[]items[].order | integer | A sequence number of an item in a list - items. | |
list_picker.sections[].order | integer | A sequence number of a section. | |
list_picker.sections[].title | string | + | A section title. |
list_picker.sections[].multipleSelection | boolean | Determines whether simultaneous multiple choice of items is available. Default: false. | |
list_picker.receivedMessage | object | + | An object that describes a received message of a list items selected by the user. |
list_picker.receivedMessage.title | string | + | A title displayed when a client receives a message. |
list_picker.receivedMessage.subtitle | string | + | A subtitle displayed when a client receives a message |
list_picker.receivedMessage.style | string | + | Defines an item style. The default is "icon". Available values: "icon", "small", or "large". |
list_picker.replyMessage | object | + | An object which contains a description of how to display a message after a reply. |
list_picker.replyMessage.title | string | + | A title displayed when the message has been sent by the user. |
list_picker.replyMessage.subtitle | string | + | A subtitle that is displayed when the message has been sent by the user. |
list_picker.replyMessage.style | string | + | Defines an item style. The default is "icon". Available values: "icon", "small", or "large". |
Adding item
To add an item to Image List Picker, the following object needs to be added to the items[]
and images[]
arrays:
"images": [
{
"identifier": "1",
"url": "{{image URL}}"
}
]
"items": [
{
"identifier": "1",
"imageIdentifier": "1",
"order": 0,
"title": "Gala Apples",
"subtitle": "Price: $1.57 / each",
"style": "small"
}
]
Was this article helpful?