We describe here how you can use an InputRequest
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.
To allow users to only select one option, you can use a single-answer question.
This example shows a list where the shopper can select more than one of the answers on a portrait, small portrait (e285p), and landscape display
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 is selected.
- The terminal receives a request to cancel collecting input or any other request from the POS app.
Make a multiple-answers MenuButtons input request
We support two MenuButtons input requests:
- Multiple choice—single answer: 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:
-
Make a POST request to a Terminal API endpoint, specifying:
-
MessageHeader
: the standardSaleToPOIRequest.MessageHeader
object. Specify:Parameter Required Description ProtocolVersion
3.0 MessageClass
Device MessageCategory
Input MessageType
Request ServiceID
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
Your unique ID for the system where you send this request from. POIID
The unique ID of the terminal to send this request to. Format: [device model]-[serial number].
-
InputRequest.DisplayOutput
: this part of the request body defines 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.} -
InputRequest.MenuEntry
: 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. -
InputRequest.InputData
: this part of the request body handles 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 in the request body.
The following example asks the shopper to select options from a list.
-
Wait for the user to supply the requested input.
If there is input provided to the terminal, the
InputResponse
has anInputResult
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 are1
and all other array items are0
.
-
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 theMaxLength
parameter, the response contains:InputResult.Response.Result
: FailureResponse.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
withEventDetails
: 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
hasResponse.Result
: Failure,Response.ErrorCondition
: Busy, and anAdditionalResponse
containing the message A higher priority request has been received. -
If the user declined to respond (selected the Cancel key ), the
InputResult
hasResponse.Result
: Failure andResponse.ErrorCondition
: Cancel.
-
Pass the relevant data from
InputResult.Input
to your system for validation and further use.