Linking an SMS reply to the original message - twilio

We want to be able to send an SMS using Twilio and the person receiving should be able to reply to the message thread.
How can I link the reply to the original message? (In e-mail we just put the thread->id in the reply address)
The person receiving could be in multiple threads.
Twilio seems to suggest cookies but I don't see how this could work.
Mick

Twilio developer evangelist here.
There's nothing in SMS that allows for a message to be replied to directly. If you check your own phone and its SMS application you will find that you can't reply, just send another message in chronological order.
One option you have is to buy and use multiple numbers to communicate with your users. You only need as many numbers as you have open threads with a user, but that is a way to segregate messages between your application and an end user.

Related

How to track different conversation threads between 2 participants in twilio?

I have an application which uses Twilio to send SMSs.
There is a situation where the application sends multiple messages to a person, for example a message with info about product P1, then another message with information about product P2, and so on. So my question is, when the person replys the SMS, how could I know to exactly what SMS he is replying?
Or is it possible that each SMS that my application sends to the same person creates different conversations in Twilio, so I can track each response per each different SMS?, if so, how I can do it?
If you trigger the SMS messages by API it's hard to know what messages the customers answer.
We got to solve this problem using Twilio Sync (https://www.twilio.com/docs/sync/api/document-resource) which is basically cloud storage, so when we need to trigger an SMS or Whatsapp message, we save some information on Twilio Sync, like Twilio number, client number and the messages that were sent.
When the customer answers the message, we send him to a Twilio Studio that runs a Function that read the Sync document and check if this customer comes from a message response, if yes, we get the triggered message and added on the conversations, so we know the message that customer answered.
The Sync isn't a database and has a limit, so depending on your message volume, it can not work well.

Twilio Response from a non-twilio number

When my friends text my Twilio bot, Twilio responds from another number which is not even Twilio's and is named "SMSInfo". I expect the bot to respond from the same number. I assure you that I haven't set any logic there that a response should come from another number. Also, note that "SMSInfo" is a number which often sends them verification codes for Fiverr or other things.
I just submitted a ticket to Twilio support and a bot automatically suggested me few articles. One of them solved the issue.
Sender ID change may occur when you send messages from a Twilio number
that is not local to your recipients, for example using a US Twilio
number to send SMS to Polish mobile users. This is often done to
comply with local regulations, or to ensure the highest possible
delivery rate for your messages.

How to make Incoming SMS via Twilio Appear and Generate Notifications in Bitrix

Hi I've integrated Twilio with Bitrix and am able to send outgoing sms that do reach the receiving number, but the incoming reply texts do not appear on the contact profile or generate notifications. To summarize, I need help making incoming sms appear in contact profiles and generate notifications for all/most employees.
I heard one method was to use Bitrix24 webhook for authorization and API REST for data. If this method works then I need a step-by-step on how to do it.
I have limited coding experience.
I've tried generating a Bitrix webhook and setting that as the incoming URL for the text messages in Twilio but the replies still did not appear.
Thanks.

Twilio: How to get answers from message log with just phone number

I want to get received messages of the same day of a phone number with the help of API or anything.
(I have purchased ofcourse a phone number)
**
Requirement :
**
I have a twilio app which sends 5 questions to 1000 user and users reply's to it. Like a survey. App is deployed on Azure.
I will get 5000 messages in log.
I am planning to retrieve messages by phone number and update my database from the user.
Implemented :
Implemented this https://www.twilio.com/docs/guides/sms/how-to-receive-and-reply-in-csharp. Any other idea for the requirement is also appreciated.
Twilio developer evangelist here.
I see that you've implemented the basic flow for responding to incoming SMS messages. If you are implementing surveys across a number of users my advice would be to expand on that application.
Firstly, you would need to run through your database to get all your users' phone numbers and send the first question to all of them using the Twilio REST API to send each a text message.
Then, when you receive an incoming message from one of your respondents you can find out the number that sent the message by inspecting the From parameter on the incoming request body. You can then look up your user in your database by phone number and save that response for them. Then you can use the TwiML <Message> to respond to the user and send them the next question.
This way you can collect the responses as they come in, rather than call the REST API to list all responses.
Let me know if that helps at all.

Fetch MessgaeSid (SmsSid) of the message i send. When Someone replies to my message

I am Developing a Sms Convesation Application using Twilio API. What My Application does is It Send SMS to Mobile device prompting some options to chose. Users should reply back with anyone of the given option. What i want is when someone replies back to my application, I want the MessageSid of sent message(Message sent from Application). How can I acheive this? Please Help me
Twilio evangelist here.
There is no way to get the sid of a previous message from an inbound message since we don't track that. The SMS protocol has no facility for a "conversation" in it so we don't know that the inbound message is a "reply" to anything.
What you need to do is store in your app the fact that you sent a text message to a specific phone number. Then when that user replies from that number you would be able to know that you had previously sent them a message.
Hope that helps.
Devin
I don't believe this is possible. SMS messages are "stateless", much like HTTP requests. The only thing you could use like a session id would be the phone number. What about tracking conversation history by mapping an array of MessageSids to the phone number?

Resources