xapi.event.on('UserInterface Message Prompt Response', (event) => {
    switch(event.FeedbackId){
        case 'roomfeedback_step1':
          switch(event.OptionId){
             case '1':
                xapi.command("UserInterface Message TextInput Display", {
                          Duration: 0
                        , FeedbackId: "roomfeedback_step2_cleanliness"
                        , InputType: "SingleLine"
                        , KeyboardState: "Open"
                        , Placeholder: "Details on cleanliness issue"
                        , SubmitText: "Submit"
                        , Text: "Please leave optional comment about the cleanliness issue or just hit Submit if its obvious that the room needs cleaning!"
                        , Title: "Cleanliness Details"
                  }).catch((error) => { console.error(error); });
                  break;
              case '2':
                  xapi.command("UserInterface Message Prompt Display", {
                        Title: "A/V Issue reporting"
                      , Text: 'Please select what the problem seems to be'
                      , FeedbackId: 'roomfeedback_step2'
                      , 'Option.1':'Call did not connect'
                      , 'Option.2':'Audio was bad'
                      , 'Option.3': 'Video was bad'
                    }).catch((error) => { console.error(error); });
                  break;
              case '3':
                xapi.command("UserInterface Message TextInput Display", {
                          Duration: 0
                        , FeedbackId: "roomfeedback_step2_other"
                        , InputType: "SingleLine"
                        , KeyboardState: "Open"
                        , Placeholder: "Describe issue here"
                        , SubmitText: "Next"
                        , Text: "Please enter a short description of the issue"
                        , Title: "Issue info"
                  }).catch((error) => { console.error(error); });
                  break;
          }
          break;
        case 'roomfeedback_step2':
              systemInfo.short_description = 'AV issue';
              raiseTicket('There is an audio/video issue in ' + systemInfo.systemName);
              break;
        case 'reportissue':
            switch(event.OptionId){
                case '1':
                    raiseTicket(systemInfo.systemName + ' is having audio or video issues');
                    break;
                case '2':
                    raiseTicket(systemInfo.systemName + ' needs cleaning');
                    break;
                case '3':
                    raiseTicket(systemInfo.systemName + ' Just has someone complaining for no reason');
                    break;
            }
            break;

    }
});