{"title":"Ask to select a single answer from a list","category":"default","creationDate":1741965420,"content":"<div class=\"additional-info-block output-inline\">\n<h5 class=\"article__heading additional-info-block__title\">Multiple-answer option<\/h5><div class=\"additional-info-block__body\"><p>To allow users to select more than one option, you can use a <a href=\"\/point-of-sale\/shopper-engagement\/shopper-input\/multi-menu\">multiple-answer question<\/a>.<\/p><\/div><\/div>\n\n<p>Here we describe how you can use an input request to ask the shopper or your staff to select a menu option, such as an answer to a multiple choice question. You can use this, for example, to create a customer survey. You can show a header (your question), an optional second header (for example, an instruction), and up to 15 scrollable option buttons. Each option button can contain one or two text lines.<\/p>\n<h2>Requirements<\/h2>\n<p>Before you begin, take into account the following requirement.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Requirement<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Integration type<\/strong><\/td>\n<td style=\"text-align: left;\">A <a href=\"\/point-of-sale\/get-started\">Terminal API integration<\/a> with payment terminals.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How it works<\/h2>\n<p>When you use a <span translate=\"no\"><strong>MenuButtons<\/strong><\/span> <code>InputRequest<\/code>, the terminal prompts the shopper to answer a multiple-choice question that allows them to select only one option. The terminal continues to show your input request until one of these events occurs:<\/p>\n<ul>\n<li>The user has provided input.<\/li>\n<li>The maximum input time expires. You can set this time in the request.<\/li>\n<li>On the terminal, <strong>Cancel<\/strong> <strong><img alt=\"\" src=\"\/images\/e\/b\/5\/8\/6\/eb5864c171bd3eac47d4a415a1f7e5dc0b075c28-cancel2x.png\" \/><\/strong> is selected.<\/li>\n<li>The terminal receives a <a href=\"\/point-of-sale\/shopper-engagement\/shopper-input\/cancel-input\">request to cancel collecting input<\/a> or any other request from the POS app.<\/li>\n<\/ul>\n<h3>Examples<\/h3>\n<p>The following illustrations show a menu screen on a small portrait, a portrait, and landscape display.<\/p>\n<div class=\"sc-columns\" style=\"columns:2 auto;-moz-columns:2 auto;column-gap:normal;-moz-column-gap:normal;\">\n<div style=\"text-align: center;\">\n<p><img alt=\"\" src=\"\/images\/d\/d\/0\/2\/7\/dd0275c877737b592b687acfaa8ea517b373d409-screen-engetmenuportrait-small.png\" \/><\/p>\n<\/div>\n<div style=\"text-align: center;\">\n<p><img alt=\"\" src=\"\/images\/d\/0\/9\/e\/3\/d09e3afa5ad46d86c1537f1b14635359da7c29ac-screen-engetmenuportrait.png\" \/><\/p>\n<\/div>\n<\/div>\n<p><br><\/p>\n<div style=\"text-align: center;\">\n<p><img alt=\"\" src=\"\/images\/f\/9\/f\/d\/b\/f9fdb11f4a5040fa3369312157283a0837802915-screenengetmenulandscape.png\" \/><\/p>\n<\/div>\n<p>The following illustrations show a menu screen with a second header line on a portrait, small portrait, and landscape display.<\/p>\n<div class=\"sc-columns\" style=\"columns:2 auto;-moz-columns:2 auto;column-gap:normal;-moz-column-gap:normal;\">\n<div style=\"text-align: center;\">\n<p><img alt=\"\" src=\"\/images\/1\/7\/f\/5\/6\/17f56f49a2edb0c02dccd8f859e46fa4ccd65494-screenenmenusecondarytextportrait-small.png\" \/><\/p>\n<\/div>\n<div style=\"text-align: center;\">\n<p><img alt=\"\" src=\"\/images\/e\/d\/6\/a\/5\/ed6a510f618ec744d3052f2459c4a93057ab8f85-screen-enmenusecondarytextportrait.png\" \/><\/p>\n<\/div>\n<\/div>\n<p><br><\/p>\n<div style=\"text-align: center;\">\n<p><img alt=\"\" src=\"\/images\/c\/2\/a\/e\/7\/c2ae744cbe97012e55eda2f28c1f56225d9a3b93-screen-enmenusecondarytextlandscape.png\" \/><\/p>\n<\/div>\n<p>And finally these illustrations show a menu screen where the option buttons have a second line of text.<\/p>\n<div class=\"sc-columns\" style=\"columns:2 auto;-moz-columns:2 auto;column-gap:normal;-moz-column-gap:normal;\">\n<div style=\"text-align: center;\">\n<p><img alt=\"\" src=\"\/images\/9\/f\/5\/c\/0\/9f5c0957755e1fad9bdad92fde175280609f6c18-screen-enmenumultilinebuttonportrait.png\" \/><\/p>\n<\/div>\n<div style=\"text-align: center;\">\n<p><img alt=\"\" src=\"\/images\/4\/9\/1\/c\/1\/491c1be23436cf966ee7d8b7f65cc34ceca77617-screen-enmenumultilinebuttonportrait-small.png\" \/><\/p>\n<\/div>\n<\/div>\n<p><br><\/p>\n<div style=\"text-align: center;\">\n<p><img alt=\"\" src=\"\/images\/e\/0\/d\/1\/2\/e0d1258c77fa6e84a26d0a3566b8a8eb97b4a572-screen-enmenumultilinebuttonlandscape.png\" \/><\/p>\n<\/div>\n<h2 id=\"menu-input-request\">Make a single-answer MenuButtons input request<\/h2>\n<p>We support two <span translate=\"no\"><strong>MenuButtons<\/strong><\/span> input requests:<\/p>\n<ul>\n<li>Multiple choice&mdash;single answer: ensures no more than one answer is selected.<\/li>\n<li><a href=\"\/point-of-sale\/shopper-engagement\/shopper-input\/multi-menu\">Multiple choice\u2014multiple answers<\/a>: allows selecting more than one answer.<\/li>\n<\/ul>\n<p>To use the payment terminal to show a menu that allows the user to select only one option:<\/p>\n<ol>\n<li>\n<p>Make a <a href=\"\/point-of-sale\/design-your-integration\/terminal-api\">Terminal API<\/a> input request, specifying:<\/p>\n<ul>\n<li>\n<p>The standard <a href=\"\/point-of-sale\/design-your-integration\/terminal-api#request-message-header\">\n  <code>SaleToPOIRequest.MessageHeader<\/code>\n<\/a> object, with <code>MessageClass<\/code> set to <span translate=\"no\"><strong>Device<\/strong><\/span> and <code>MessageCategory<\/code> set to <span translate=\"no\"><strong>Input<\/strong><\/span>.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>ProtocolVersion<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><strong>3.0<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>MessageClass<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Device<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>MessageCategory<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Input<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>MessageType<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Request<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>ServiceID<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">Your unique ID for this request, consisting of 1-10 alphanumeric characters. Must be unique within the last 48 hours for the terminal (<code>POIID<\/code>) being used.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>SaleID<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">Your unique ID for the system where you send this request from.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>POIID<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">The unique ID of the terminal to send this request to. Format: <em>[device model]-[serial number]<\/em>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>The  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/terminal-api\/latest\/post\/input#request-DisplayOutput\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">InputRequest.DisplayOutput<\/a> object to define what is shown on the terminal:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>Device<\/code><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>CustomerDisplay<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>InfoQualify<\/code><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Display<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>OutputContent.OutputFormat<\/code><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Text<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>OutputContent.PredefinedContent.ReferenceID<\/code><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>MenuButtons<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>OutputContent.OutputText<\/code><\/td>\n<td style=\"text-align: left;\">An array of one or two <code>Text<\/code> fields to specify the header. The second text field is optional; you can omit it from the request. <br> For example, you can use the first text field to specify the question or menu name, and the second text field to add an instruction.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>The  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/terminal-api\/latest\/post\/input#request-DisplayOutput-MenuEntry\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">InputRequest.DisplayOutput.MenuEntry<\/a> 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:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>OutputFormat<\/code><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Text<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>OutputText<\/code><\/td>\n<td style=\"text-align: left;\">An array of one or two <code>Text<\/code> fields to specify the answer or menu button. The first text field will show in bold. The second text field is optional; you can omit it from the request. <br>For example, you could write a short-form answer in the first field, and the long-form answer in the second field.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>The  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/terminal-api\/latest\/post\/input#request-InputData\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">InputRequest.InputData<\/a> object to handle the user input:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>Device<\/code><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>CustomerInput<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>InfoQualify<\/code><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Input<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>InputCommand<\/code><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>GetMenuEntry<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>MaxInputTime<\/code><\/td>\n<td style=\"text-align: left;\">(Integer) Time-out in seconds. This is the time that the user gets to finish their input.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ul>\n<p>The following example asks the shopper to respond to a survey question. There is a second header below the question, and the answer options have only one line.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"''\" :id=\"'shopper-input_3'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"JSON\",\"content\":\"{\\n    \\\"SaleToPOIRequest\\\":{\\n        \\\"MessageHeader\\\":{\\n            \\\"ProtocolVersion\\\":\\\"3.0\\\",\\n            \\\"MessageClass\\\":\\\"Device\\\",\\n            \\\"MessageCategory\\\":\\\"Input\\\",\\n            \\\"MessageType\\\":\\\"Request\\\",\\n            \\\"ServiceID\\\":\\\"0207111104\\\",\\n            \\\"SaleID\\\":\\\"POSSystemID12345\\\",\\n            \\\"POIID\\\":\\\"V400m-324688179\\\"\\n        },\\n        \\\"InputRequest\\\":{\\n            \\\"DisplayOutput\\\":{\\n                \\\"Device\\\":\\\"CustomerDisplay\\\",\\n                \\\"InfoQualify\\\":\\\"Display\\\",\\n                \\\"OutputContent\\\":{\\n                    \\\"OutputFormat\\\":\\\"Text\\\",\\n                    \\\"PredefinedContent\\\":{\\n                        \\\"ReferenceID\\\":\\\"MenuButtons\\\"\\n                    },\\n                    \\\"OutputText\\\":[\\n                        {\\n                            \\\"Text\\\":\\\"How was your visit?\\\"\\n                        },\\n                        {\\n                            \\\"Text\\\":\\\"Please tap one of the options below:\\\"\\n                        }\\n                    ]\\n                },\\n                \\\"MenuEntry\\\":[\\n                    {\\n                        \\\"OutputFormat\\\":\\\"Text\\\",\\n                        \\\"OutputText\\\":[\\n                            {\\n                                \\\"Text\\\":\\\"Excellent\\\"\\n                            }\\n                        ]\\n                    },\\n                    {\\n                        \\\"OutputFormat\\\":\\\"Text\\\",\\n                        \\\"OutputText\\\":[\\n                            {\\n                                \\\"Text\\\":\\\"Good\\\"\\n                            }\\n                        ]\\n                    },\\n                    {\\n                        \\\"OutputFormat\\\":\\\"Text\\\",\\n                        \\\"OutputText\\\":[\\n                            {\\n                                \\\"Text\\\":\\\"Not so good\\\"\\n                            }\\n                        ]\\n                    },\\n                    {\\n                        \\\"OutputFormat\\\":\\\"Text\\\",\\n                        \\\"OutputText\\\":[\\n                            {\\n                                \\\"Text\\\":\\\"Bad\\\"\\n                            }\\n                        ]\\n                    }\\n                ]\\n            },\\n            \\\"InputData\\\":{\\n                \\\"Device\\\":\\\"CustomerInput\\\",\\n                \\\"InfoQualify\\\":\\\"Input\\\",\\n                \\\"InputCommand\\\":\\\"GetMenuEntry\\\",\\n                \\\"MaxInputTime\\\":120\\n            }\\n        }\\n    }\\n}\"},{\"language\":\"java\",\"tabTitle\":\"Java\",\"content\":\"SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();\\nMessageHeader messageHeader = new MessageHeader();\\nsaleToPOIRequest.setMessageHeader(messageHeader);\\n\\nInputRequest inputRequest = new InputRequest();\\nDisplayOutput displayOutput = new DisplayOutput();\\ndisplayOutput.setDevice( DeviceType.CUSTOMER_DISPLAY );\\ndisplayOutput.setInfoQualify( InfoQualifyType.DISPLAY );\\nOutputContent outputContent = new OutputContent();\\noutputContent.setOutputFormat( OutputFormatType.TEXT );\\nPredefinedContent predefinedContent = new PredefinedContent();\\npredefinedContent.setReferenceID(\\\"MenuButtons\\\");\\noutputContent.setPredefinedContent(predefinedContent);\\nOutputText headerLine1 = new OutputText();\\nheaderLine1.setText(\\\"How was your visit?\\\");\\nOutputText headerLine2 = new OutputText();\\nheaderLine2.setText(\\\"Please tap one of the options below:\\\");\\noutputContent.getOutputText().add(headerLine1);\\noutputContent.getOutputText().add(headerLine2);\\ndisplayOutput.setOutputContent(outputContent);\\n\\nMenuEntry menuEntry1 = new MenuEntry();\\nmenuEntry1.setOutputFormat( OutputFormatType.TEXT );\\nOutputText option1Line1 = new OutputText();\\noption1Line1.setText(\\\"Excellent\\\");\\nmenuEntry1.getOutputText().add(option1Line1);\\ndisplayOutput.getMenuEntry().add(menuEntry1);\\n\\nMenuEntry menuEntry2 = new MenuEntry();\\nmenuEntry2.setOutputFormat( OutputFormatType.TEXT );\\nOutputText option2Line1 = new OutputText();\\noption2Line1.setText(\\\"Good\\\");\\nmenuEntry2.getOutputText().add(option2Line1);\\ndisplayOutput.getMenuEntry().add(menuEntry2);\\n\\nMenuEntry menuEntry3 = new MenuEntry();\\nmenuEntry3.setOutputFormat( OutputFormatType.TEXT );\\nOutputText option3Line1 = new OutputText();\\noption3Line1.setText(\\\"Not so good\\\");\\nmenuEntry3.getOutputText().add(option3Line1);\\ndisplayOutput.getMenuEntry().add(menuEntry3);\\n\\nMenuEntry menuEntry4 = new MenuEntry();\\nmenuEntry4.setOutputFormat( OutputFormatType.TEXT );\\nOutputText option4Line1 = new OutputText();\\noption4Line1.setText(\\\"Bad\\\");\\nmenuEntry4.getOutputText().add(option4Line1);\\ndisplayOutput.getMenuEntry().add(menuEntry4);\\n\\ninputRequest.setDisplayOutput(displayOutput);\\n\\nInputData inputData = new InputData();\\ninputData.setDevice( DeviceType.CUSTOMER_INPUT );\\ninputData.setInfoQualify( InfoQualifyType.INPUT );\\ninputData.setInputCommand( InputCommandType.GET_MENU_ENTRY );\\ninputData.setMaxInputTime( BigInteger.valueOf(120) );\\ninputRequest.setInputData(inputData);\\nsaleToPOIRequest.setInputRequest(inputRequest);\\nterminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Wait for the user to supply the requested input.<\/p>\n<div class=\"sc-notice note\"><div>\n<p>The input is not validated against a format.<\/p>\n<\/div><\/div>\n<p>If input is received from the terminal, the input response includes an  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/terminal-api\/latest\/post\/input#responses-200-InputResult\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">InputResult<\/a> object with:<\/p>\n<ul>\n<li><code>Input.MenuEntryNumber<\/code>: An array that indicates the option that the user selected. For example, if the third option is selected, the third item in the array is <code>1<\/code> and all other array items are <code>0<\/code>.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Example response when the shopper selected an option'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"SaleToPOIResponse\\\": {\\n    \\\"InputResponse\\\": {\\n      \\\"InputResult\\\": {\\n        \\\"Device\\\": \\\"CustomerInput\\\",\\n        \\\"InfoQualify\\\": \\\"Input\\\",\\n        \\\"Response\\\": {\\n          \\\"Result\\\": \\\"Success\\\"\\n        },\\n        \\\"Input\\\": {\\n          \\\"MenuEntryNumber\\\": [\\n            0,\\n            0,\\n            1,\\n            0,\\n            0\\n          ],\\n          \\\"InputCommand\\\": \\\"GetMenuEntry\\\"\\n        }\\n      },\\n      \\\"OutputResult\\\": {\\n        \\\"Device\\\": \\\"CustomerDisplay\\\",\\n        \\\"InfoQualify\\\": \\\"Display\\\",\\n        \\\"Response\\\": {\\n          \\\"Result\\\": \\\"Success\\\"\\n        }\\n      }\\n    },\\n    \\\"MessageHeader\\\": {\\n      \\\"ProtocolVersion\\\": \\\"3.0\\\",\\n      \\\"SaleID\\\": \\\"POSSystemID12345\\\",\\n      \\\"MessageClass\\\": \\\"Device\\\",\\n      \\\"MessageCategory\\\": \\\"Input\\\",\\n      \\\"ServiceID\\\": \\\"0207111104\\\",\\n      \\\"POIID\\\": \\\"V400m-324688179\\\",\\n      \\\"MessageType\\\": \\\"Response\\\"\\n    }\\n  }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<ul>\n<li>\n<p>If the input request times out, the <code>InputResult.Response<\/code> has <code>AdditionalResponse<\/code>: <span translate=\"no\"><strong>message=Screen%20timeout<\/strong><\/span>, <code>Result<\/code>: <span translate=\"no\"><strong>Failure<\/strong><\/span>, and <code>ErrorCondition<\/code>: <span translate=\"no\"><strong>Cancel<\/strong><\/span>.<\/p>\n<\/li>\n<li>\n<p>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 <code>InputResult.Response<\/code> has <code>AdditionalResponse<\/code>: <span translate=\"no\"><strong>message=A%20higher%20priority%20request%20has%20been%20received<\/strong><\/span>, <code>Result<\/code>: <span translate=\"no\"><strong>Failure<\/strong><\/span>, and <code>ErrorCondition<\/code>: <span translate=\"no\"><strong>Busy<\/strong><\/span>.<\/p>\n<\/li>\n<li>\n<p>If the user declined to respond (selected the <strong>Cancel<\/strong> key <strong><img alt=\"\" src=\"\/images\/e\/b\/5\/8\/6\/eb5864c171bd3eac47d4a415a1f7e5dc0b075c28-cancel2x.png\" \/><\/strong>), the <code>InputResult.Input.MenuEntryNumber<\/code> field is empty. The <code>InputResult.Response<\/code> has <code>Result<\/code>: <span translate=\"no\"><strong>Failure<\/strong><\/span> and <code>ErrorCondition<\/code>: <span translate=\"no\"><strong>Cancel<\/strong><\/span>.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Pass the relevant data from <code>InputResult.Input<\/code> to your system for validation and further use.<\/p>\n<\/li>\n<\/ol>\n<h2>See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/point-of-sale\/shopper-engagement\/shopper-input\/multi-menu\"\n                        target=\"_self\"\n                        >\n                    Multiple choice - single answer\n                <\/a><\/li><li><a href=\"\/point-of-sale\/shopper-engagement\/shopper-input\/cancel-input\"\n                        target=\"_self\"\n                        >\n                    Cancel an input request\n                <\/a><\/li><li><a href=\"\/point-of-sale\/shopper-engagement\/shopper-input\/select-input-request\"\n                        target=\"_self\"\n                        >\n                    Ask for another type of input\n                <\/a><\/li><li><a href=\"\/point-of-sale\/shopper-engagement\/create-session\"\n                        target=\"_self\"\n                        >\n                    Create a session\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/point-of-sale\/shopper-engagement\/shopper-input\/menu","articleFields":{"description":"Use an input request to ask a multiple-choice question and allow a single answer.","feedback_component":true,"filters_component":false,"decision_tree":"[]","page_id":"894db19e-26f3-42c2-9ea7-3617b38beba2","last_edit_on":"14-03-2025 16:17"},"algolia":{"url":"https:\/\/docs.adyen.com\/point-of-sale\/shopper-engagement\/shopper-input\/menu","title":"Ask to select a single answer from a list","content":"\nMultiple-answer optionTo allow users to select more than one option, you can use a multiple-answer question.\n\nHere we describe how you can use an input request to ask the shopper or your staff to select a menu option, such as an answer to a multiple choice question. You can use this, for example, to create a customer survey. You can show a header (your question), an optional second header (for example, an instruction), and up to 15 scrollable option buttons. Each option button can contain one or two text lines.\nRequirements\nBefore you begin, take into account the following requirement.\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nA Terminal API integration with payment terminals.\n\n\n\nHow it works\nWhen you use a MenuButtons InputRequest, the terminal prompts the shopper to answer a multiple-choice question that allows them to select only one option. The terminal continues to show your input request until one of these events occurs:\n\nThe user has provided input.\nThe maximum input time expires. You can set this time in the request.\nOn the terminal, Cancel  is selected.\nThe terminal receives a request to cancel collecting input or any other request from the POS app.\n\nExamples\nThe following illustrations show a menu screen on a small portrait, a portrait, and landscape display.\n\n\n\n\n\n\n\n\n\n\n\n\nThe following illustrations show a menu screen with a second header line on a portrait, small portrait, and landscape display.\n\n\n\n\n\n\n\n\n\n\n\n\nAnd finally these illustrations show a menu screen where the option buttons have a second line of text.\n\n\n\n\n\n\n\n\n\n\n\n\nMake a single-answer MenuButtons input request\nWe support two MenuButtons input requests:\n\nMultiple choice&mdash;single answer: ensures no more than one answer is selected.\nMultiple choice\u2014multiple answers: allows selecting more than one answer.\n\nTo use the payment terminal to show a menu that allows the user to select only one option:\n\n\nMake a Terminal API input request, specifying:\n\n\nThe standard \n  SaleToPOIRequest.MessageHeader\n object, with MessageClass set to Device and MessageCategory set to Input.\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nProtocolVersion\n\n3.0\n\n\nMessageClass\n\nDevice\n\n\nMessageCategory\n\nInput\n\n\nMessageType\n\nRequest\n\n\nServiceID\n\nYour 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.\n\n\nSaleID\n\nYour unique ID for the system where you send this request from.\n\n\nPOIID\n\nThe unique ID of the terminal to send this request to. Format: [device model]-[serial number].\n\n\n\n\n\n\n\nThe  InputRequest.DisplayOutput object to define what is shown on the terminal:\n\n\n\nParameter\nDescription\n\n\n\n\nDevice\nCustomerDisplay\n\n\nInfoQualify\nDisplay\n\n\nOutputContent.OutputFormat\nText\n\n\nOutputContent.PredefinedContent.ReferenceID\nMenuButtons\n\n\nOutputContent.OutputText\nAn array of one or two Text fields to specify the header. The second text field is optional; you can omit it from the request.  For example, you can use the first text field to specify the question or menu name, and the second text field to add an instruction.\n\n\n\n\n\nThe  InputRequest.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:\n\n\n\nParameter\nDescription\n\n\n\n\nOutputFormat\nText\n\n\nOutputText\nAn array of one or two Text fields to specify the answer or menu button. The first text field will show in bold. The second text field is optional; you can omit it from the request. For example, you could write a short-form answer in the first field, and the long-form answer in the second field.\n\n\n\n\n\nThe  InputRequest.InputData object to handle the user input:\n\n\n\nParameter\nDescription\n\n\n\n\nDevice\nCustomerInput\n\n\nInfoQualify\nInput\n\n\nInputCommand\nGetMenuEntry\n\n\nMaxInputTime\n(Integer) Time-out in seconds. This is the time that the user gets to finish their input.\n\n\n\n\n\nThe following example asks the shopper to respond to a survey question. There is a second header below the question, and the answer options have only one line.\n\n\n\n\n\nWait for the user to supply the requested input.\n\nThe input is not validated against a format.\n\nIf input is received from the terminal, the input response includes an  InputResult object with:\n\nInput.MenuEntryNumber: An array that indicates the option that the user selected. For example, if the third option is selected, the third item in the array is 1 and all other array items are 0.\n\n\n\n\n\n\nIf the input request times out, the InputResult.Response has AdditionalResponse: message=Screen%20timeout, Result: Failure, and ErrorCondition: Cancel.\n\n\nIf 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.Response has AdditionalResponse: message=A%20higher%20priority%20request%20has%20been%20received, Result: Failure, and ErrorCondition: Busy.\n\n\nIf the user declined to respond (selected the Cancel key ), the InputResult.Input.MenuEntryNumber field is empty. The InputResult.Response has Result: Failure and ErrorCondition: Cancel.\n\n\n\n\nPass the relevant data from InputResult.Input to your system for validation and further use.\n\n\nSee also\n\n\n                    Multiple choice - single answer\n                \n                    Cancel an input request\n                \n                    Ask for another type of input\n                \n                    Create a session\n                \n","type":"page","locale":"en","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"In-person payments","lvl2":"Shopper engagement","lvl3":"Collect input","lvl4":"Ask to select a single answer from a list"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/","lvl1":"https:\/\/docs.adyen.com\/point-of-sale","lvl2":"https:\/\/docs.adyen.com\/point-of-sale\/shopper-engagement","lvl3":"https:\/\/docs.adyen.com\/point-of-sale\/shopper-engagement\/shopper-input","lvl4":"\/point-of-sale\/shopper-engagement\/shopper-input\/menu"},"levels":5,"category":"In-person payments","category_color":"green","tags":["select","single","answer"]},"articleFiles":{"screen-EN_GetMenu_portrait-small.png":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/images\/e\/1\/c\/7\/6\/e1c76eec6fd5e9cd6578e73614fb5cd581578161-screen-engetmenuportrait-small.png\" \/>","screen-EN_GetMenu_portrait.png":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/images\/3\/f\/c\/b\/1\/3fcb1d7b66f41aade0343d22e5baea91f922f3b7-screen-engetmenuportrait.png\" \/>","screen-EN_MenuMultilineButton_landscape.png":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/images\/2\/4\/b\/5\/3\/24b53cd330eb1f538231d6a31469eb62f511f791-screen-enmenumultilinebuttonlandscape.png\" \/>","screen-EN_MenuMultilineButton_portrait-small.png":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/images\/1\/f\/c\/6\/2\/1fc621bb7d5ba3dfb76bf19d6125db68be8128c9-screen-enmenumultilinebuttonportrait-small.png\" \/>","screen-EN_MenuMultilineButton_portrait.png":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/images\/e\/9\/b\/4\/d\/e9b4df560feb502416ea6ce1adfe1381f644520e-screen-enmenumultilinebuttonportrait.png\" \/>","screen-EN_MenuSecondaryText_landscape.png":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/images\/6\/8\/4\/7\/e\/6847e724c9a28d03764e869fadc367487f7348e9-screen-enmenusecondarytextlandscape.png\" \/>","screen-EN_MenuSecondaryText_portrait.png":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/images\/f\/c\/d\/e\/6\/fcde6f8d28b6ab212c799499d9bc1156dc63ce00-screen-enmenusecondarytextportrait.png\" \/>","screen_EN_GetMenu_landscape.png":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/images\/4\/5\/4\/9\/1\/45491fb2a401faa9658d27e895d8bee787a67ac4-screenengetmenulandscape.png\" \/>","screen_EN_MenuSecondaryText_portrait-small.png":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/images\/2\/a\/8\/b\/2\/2a8b210900212d85274f056fb9fc694a10837436-screenenmenusecondarytextportrait-small.png\" \/>","shopper-input_3.json":"<p alt=\"\">shopper-input_3.json<\/p>"}}
