Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

twilio multiple simultaneous conversations per user

Tags:

twilio

Here's an example:

Every time a user sells a car, he has to reply to my system to say what the color of the car is that he sold (my system knows that a car was sold and what its make is but not what color it was).

If the user sells only 1 car at a time and texts back immediately, I can remember which car he is talking about by storing information about the current_car in a session variable. If, on the other hand, the user sells 3 cars simultaneously, I can't store a current_car session variable because there are 3 current cars.

How do I know which car the user is talking about when he replies to my text? Is there any way to embed a unique token in the text message I send so that the reply references the correct car out of the 3 cars?

like image 575
user531065 Avatar asked Oct 28 '25 04:10

user531065


1 Answers

Twilio API doesn't support that. Have you noticed what Twitter does for the same precise use-case? They include in the original SMS instructions such as "reply directly with ....". The user would have to type that in so keep it simple.

Alternatively, you can reply to the ambiguous messages with "There were three cars. Which sold? (reply with number 1, 2, or 3)"

like image 59
alphazero Avatar answered Oct 29 '25 18:10

alphazero



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!