Great question — answering as the UphillTech team:
Cookies are the best way to handle a conversation , but because you cannot tell which text message the server replies to, it can be tricky. If you send the server 2 jobs, and they choose to reply to the first job, you have no way of knowing this. I think you have two sensible ways of doing this: Give each job a reference code (2 or 3 digits to make it easy) that the server can reply with. This is the most reliable way to do it. Use multiple - but not many - phone numbers. So that during a period of one day, or a few hours, you only send a server one job per number. Then you can recycle the pool of numbers and reuse them after the job has 'timed out'. This rather depends on what your expect...
Full answer by xmjw: https://stackoverflow.stackexchange.com/a/16211444 (CC BY-SA 4.0).
Need it done for your business? UphillTech.