If you need complete control and flexibility of how everything should be, then this can be custom coded.
Else you can also do this using a third party chatbot app called Tidio which offers a thing called ‘Flows’ where you can building something just like this and embed it onto your Wix website (since Tidio is no longer available on the Wix App Market).