---
title: "Ask to select one or more answers from a list"
description: "Use an input request to ask a multiple-choice question and allow more than one answer."
url: "https://docs.adyen.com/point-of-sale/shopper-engagement/shopper-input/multi-menu"
source_url: "https://docs.adyen.com/point-of-sale/shopper-engagement/shopper-input/multi-menu.md"
canonical: "https://docs.adyen.com/point-of-sale/shopper-engagement/shopper-input/multi-menu"
last_modified: "2021-11-10T17:17:00+01:00"
language: "en"
---

# Ask to select one or more answers from a list

Use an input request to ask a multiple-choice question and allow more than one answer.

[View source](/point-of-sale/shopper-engagement/shopper-input/multi-menu.md)

##### Single-answer option

For cases where you require the user to select only one option, you can use a [single-answer question](/point-of-sale/shopper-engagement/shopper-input/menu).

We describe here how you can use an input request to ask the shopper a question and allow them to select more than one answer. You can use this, for example, to create a customer survey. You can show a header (your question) and up to 15 scrollable option buttons. Each option button can contain one text line.

## Requirements

Before you begin, take into account the following requirement.

| Requirement          | Description                                                                      |
| -------------------- | -------------------------------------------------------------------------------- |
| **Integration type** | A [Terminal API integration](/point-of-sale/get-started) with payment terminals. |

## How it works

When you use a **MenuButtons** `InputRequest`, the terminal prompts the shopper to answer a question that allows them to select multiple answers. The terminal continues to show your input request until one of these events occurs:

* The user has provided input.
* The maximum input time expires. You can set this time in the request.
* On the terminal, **Cancel** **![](/images/5/8/8/4/9/58849deb729ef765fb92c34a2b367b9ae58a5598-cancel2x.png)** is selected.
* The terminal receives a [request to cancel collecting input](/point-of-sale/shopper-engagement/shopper-input/cancel-input) or any other request from the POS app.

### Examples

This example shows a list where the shopper can select more than one of the answers on a portrait, small portrait, and landscape display

![](/images/e/d/c/3/9/edc396cfe3a84bc4ea2ef36e8170eb00b8a92457-screen-enmultiselectportrait.png)

![](/images/2/5/7/6/8/25768f843d243bfcdc201f9597d5f35fed34019f-screen-enmultiselect285.png)

![](/images/f/b/4/4/5/fb445ac59913d6cb95850b0a89e5d44afc02ae31-screen-enmultiselectlandscape.png)

## Make a multiple-answers MenuButtons input request

We support two **MenuButtons** input requests:

* [Multiple choice—single answer](/point-of-sale/shopper-engagement/shopper-input/menu): ensures no more than one answer is selected.
* Multiple choice—multiple answers: allows selecting more than one answer.

To enable the selection of multiple answers, your request needs to include the `MinLength` or `MaxLength` parameters.

To use the payment terminal to show a menu that allows the user to select more than one option:

1. Make a [Terminal API](/point-of-sale/design-your-integration/terminal-api) input request, specifying:

   * The standard [`SaleToPOIRequest.MessageHeader` ](/point-of-sale/design-your-integration/terminal-api#request-message-header)object, with `MessageClass` set to **Device** and `MessageCategory` set to **Input**.

     | Parameter         | Required                                                                                    | Description                                                                                                                                                 |
     | ----------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
     | `ProtocolVersion` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **3.0**                                                                                                                                                     |
     | `MessageClass`    | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **Device**                                                                                                                                                  |
     | `MessageCategory` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **Input**                                                                                                                                                   |
     | `MessageType`     | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **Request**                                                                                                                                                 |
     | `ServiceID`       | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Your unique ID for this request, consisting of 1-10 alphanumeric characters. Must be unique within the last 48 hours for the terminal (`POIID`) being used. |
     | `SaleID`          | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Your unique ID for the system where you send this request from.                                                                                             |
     | `POIID`           | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The unique ID of the terminal to send this request to. Format: *\[device model]-\[serial number]*.                                                          |

   - The [InputRequest.DisplayOutput](https://docs.adyen.com/api-explorer/terminal-api/latest/post/input#request-DisplayOutput) object to define what is shown on the terminal:

     | Parameter                                     | Description                                                                                         |
     | --------------------------------------------- | --------------------------------------------------------------------------------------------------- |
     | `Device`                                      | **CustomerDisplay**                                                                                 |
     | `InfoQualify`                                 | **Display**                                                                                         |
     | `OutputContent.OutputFormat`                  | **Text**                                                                                            |
     | `OutputContent.PredefinedContent.ReferenceID` | **MenuButtons**                                                                                     |
     | `OutputContent.OutputText`                    | An array of one `Text` field to specify the header. For example, to ask a multiple-choice question. |

   - The [InputRequest.DisplayOutput.MenuEntry](https://docs.adyen.com/api-explorer/terminal-api/latest/post/input#request-DisplayOutput-MenuEntry) array of up to 15 items representing the options to choose from. The terminal shows these items as a scrollable list of buttons that the user can tap to select. Each item in the array has:

     | Parameter      | Description                                                        |
     | -------------- | ------------------------------------------------------------------ |
     | `OutputFormat` | **Text**                                                           |
     | `OutputText`   | An array of one `Text` field to specify the answer or menu button. |

   - The [InputRequest.InputData](https://docs.adyen.com/api-explorer/terminal-api/latest/post/input#request-InputData) object to handle the user input:

     | Parameter      | Description                                                                               |
     | -------------- | ----------------------------------------------------------------------------------------- |
     | `Device`       | **CustomerInput**                                                                         |
     | `InfoQualify`  | **Input**                                                                                 |
     | `InputCommand` | **GetMenuEntry**                                                                          |
     | `MaxInputTime` | (Integer) Time-out in seconds. This is the time that the user gets to finish their input. |
     | `MinLength`    | The minimum number of answers the user must select.                                       |
     | `MaxLength`    | The maximum number of answers the user is allowed to select.                              |

     To allow selecting multiple answers, you must include the `MinLength` or `MaxLength` parameters.

   The following example asks the shopper to select options from a list.

   #### JSON

   ```json
   {
       "SaleToPOIRequest":{
           "MessageHeader":{
               "ProtocolVersion":"3.0",
               "MessageClass":"Device",
               "MessageCategory":"Input",
               "MessageType":"Request",
               "ServiceID":"0207111104",
               "SaleID":"POSSystemID12345",
               "POIID":"V400m-324688179"
           },
           "InputRequest":{
               "DisplayOutput":{
                   "Device":"CustomerDisplay",
                   "InfoQualify":"Display",
                   "OutputContent":{
                       "OutputFormat":"Text",
                       "PredefinedContent":{
                           "ReferenceID":"MenuButtons"
                       },
                       "OutputText":[
                           {
                               "Text": "Subscribe to the following channels?"
                           }
                       ]
                   },
                   "MenuEntry": [
                       {
                           "OutputFormat": "Text",
                           "OutputText": [
                               {
                                   "Text": "Email"
                               }
                           ]
                       },
                       {
                           "OutputFormat": "Text",
                           "OutputText": [
                               {
                                   "Text": "SMS"
                               }
                           ]
                       },
                       {
                           "OutputFormat": "Text",
                           "OutputText": [
                               {
                                   "Text": "Post"
                               }
                           ]
                       }
                   ]
               },
               "InputData": {
                   "Device": "CustomerInput",
                   "InfoQualify": "Input",
                   "InputCommand": "GetMenuEntry",
                   "MaxInputTime": 60,
                   "MinLength": 0,
                   "MaxLength": 3
               }
           }
       }
   }
   ```

   #### Java

   ```java
   SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
   MessageHeader messageHeader = new MessageHeader();
   saleToPOIRequest.setMessageHeader(messageHeader);

   InputRequest inputRequest = new InputRequest();
   DisplayOutput displayOutput = new DisplayOutput();
   displayOutput.setDevice( DeviceType.CUSTOMER_DISPLAY );
   displayOutput.setInfoQualify( InfoQualifyType.DISPLAY );
   OutputContent outputContent = new OutputContent();
   outputContent.setOutputFormat( OutputFormatType.TEXT );
   PredefinedContent predefinedContent = new PredefinedContent();
   predefinedContent.setReferenceID("MenuButtons");
   outputContent.setPredefinedContent(predefinedContent);
   OutputText headerLine1 = new OutputText();
   headerLine1.setText("Subscribe to the following channels?");
   outputContent.getOutputText().add(headerLine1);
   displayOutput.setOutputContent(outputContent);

   MenuEntry menuEntry1 = new MenuEntry();
   menuEntry1.setOutputFormat( OutputFormatType.TEXT );
   OutputText option1Line1 = new OutputText();
   option1Line1.setText("Email");
   menuEntry1.getOutputText().add(option1Line1);
   displayOutput.getMenuEntry().add(menuEntry1);

   MenuEntry menuEntry2 = new MenuEntry();
   menuEntry2.setOutputFormat( OutputFormatType.TEXT );
   OutputText option2Line1 = new OutputText();
   option2Line1.setText("SMS");
   menuEntry2.getOutputText().add(option2Line1);
   displayOutput.getMenuEntry().add(menuEntry2);

   MenuEntry menuEntry3 = new MenuEntry();
   menuEntry3.setOutputFormat( OutputFormatType.TEXT );
   OutputText option3Line1 = new OutputText();
   option3Line1.setText("Post");
   menuEntry3.getOutputText().add(option3Line1);
   displayOutput.getMenuEntry().add(menuEntry3);

   inputRequest.setDisplayOutput(displayOutput);

   InputData inputData = new InputData();
   inputData.setDevice( DeviceType.CUSTOMER_INPUT );
   inputData.setInfoQualify( InfoQualifyType.INPUT );
   inputData.setInputCommand( InputCommandType.GET_MENU_ENTRY );
   inputData.setMaxInputTime( BigInteger.valueOf(60) );
   inputData.setMinLength( Integer.valueOf(0) );
   inputData.setMaxLength( Integer.valueOf(3) );
   inputRequest.setInputData(inputData);
   saleToPOIRequest.setInputRequest(inputRequest);
   terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);
   ```

2. Wait for the user to supply the requested input.

   If input is received from the terminal, the input response includes an [InputResult](https://docs.adyen.com/api-explorer/terminal-api/latest/post/input#responses-200-InputResult) object with:

   * `Input.MenuEntryNumber`: An array that indicates the options that the user selected. For example, if the shopper selects the first and third options, the first and third items in the array are `1` and all other array items are `0`.

   **Example response when the shopper selects the first and third options**

   ```json
   {
    "SaleToPOIResponse": {
        "InputResponse": {
            "InputResult": {
                "Device": "CustomerInput",
                "InfoQualify": "Input",
                "Input": {
                    "InputCommand": "GetMenuEntry",
                    "MenuEntryNumber": [
                        1,
                        0,
                        1
                    ]
                },
                "Response": {
                    "AdditionalResponse": "outputTextWarning=The%20number%20of%20usable%20button%20text%20fields%20is%20three.",
                    "Result": "Success"
                }
            },
            "OutputResult": {
                "Device": "CustomerDisplay",
                "InfoQualify": "Display",
                "Response": {
                    "Result": "Success"
                }
            }
        },
        "MessageHeader": {
            "ProtocolVersion":"3.0",
            "MessageClass":"Device",
            "MessageCategory":"Input",
            "MessageType":"Request",
            "ServiceID":"0207111104",
            "SaleID":"POSSystemID12345",
            "POIID":"V400m-324688179"
        }
    }
   }
   ```

   * If the user selects fewer than the minimum number of answers specified in the `MinLength` parameter or more than the maximum number of answers specified in the `MaxLength` parameter, the response contains:

     * `InputResult.Response.Result`: **Failure**

     * `Response.ErrorCondition`: **NotAllowed**

     * `AdditionalResponse`: contains the message *The number of selections are below the MinLength* or *The number of selections are above the MaxLength*.

   * If the input request times out, you receive an [`EventNotification` ](/point-of-sale/design-your-integration/notifications/event-notifications)with `EventDetails`: **message=Did+not+receive+a+response+from+the+POI.**

   * If you make a payment request while the input request is waiting for input on the terminal, the payment request overrides the input request. The `InputResult` has `Response.Result`: **Failure**, `Response.ErrorCondition`: **Busy**, and an `AdditionalResponse` containing the message *A higher priority request has been received*.

   * If the user declined to respond (selected the **Cancel** key **![](/images/5/8/8/4/9/58849deb729ef765fb92c34a2b367b9ae58a5598-cancel2x.png)**), the `InputResult` has `Response.Result`: **Failure** and `Response.ErrorCondition`: **Cancel**.

3. Pass the relevant data from `InputResult.Input` to your system for validation and further use.

## See also

* [Multiple choice - single answer](/point-of-sale/shopper-engagement/shopper-input/menu)
* [Cancel an input request](/point-of-sale/shopper-engagement/shopper-input/cancel-input)
* [Ask for another type of input](/point-of-sale/shopper-engagement/shopper-input/select-input-request)
* [Create a session](/point-of-sale/shopper-engagement/create-session)
