How to take received message as input on whatsapp?

I am trying to automate a whatsapp query center in which users are given some choice and when they send their choice , I need to get that received data/choice for further automation.As on whatsapp web, idx
and more attributes are dynamically generated,or changed for every received message,So I am not able to think about different ways to achieve this task.Help me get this.