Autoresponder in helper

I am writing an online assistant for an online store. It’s a normal comm chat. The task is to make an answering machine if there are no managers in the network. Help advice. To begin with, I implemented a database of questions with answers.

1)  1
   1)  1
      1)   1
      2)   2
       ....
   2)  2
    ....
2)  2
....

It’s like calling operators of mobile companies and there, before connecting with the operator, there are options (blanks) of ready-made solutions (For something, press one. To do this, press 2, etc.)

All answer options are accompanied by actions, for example:

1)    
  1) 
  2)  

The visitor sends 1-ku to the chat and receives two options in response, sends 2 and the site is redirected to the page with directions, etc.

The question arose of how to implement the client side. Load all questions/answers to the client and process on the client side, or process all requests on the server side?


Answer 1, authority 100%

If there are not many questions and answers, you can load them into a variable when opening a chat. If otherwise, then accordingly.