FallBack Message storing

I have scenario that I have added some FAQ questions , if user asks a question it is not found in FAQ means that time fallback will be triggered on that time i need capture the users id username and the last message which typed by user need to pass it in API. How can I take that value userid,username and lastmessage parameters