How to know that a specfic incoming sms is a reply to a previous outgoing sms? - twilio

I am integrating Twilio SMS service where my users are able to send SMS messages to their clients. I would like to be able to link each reply with the sent SMS. In another word, is there any field in the Message Resource that could lead me to conclude whether the incoming message received is related to the outgoing message my user sent previously ? I need same behavior as Email send/reply functionalities.

Twilio developer evangelist here.
There is no way to do this I’m afraid, the SMS protocol has no information about users replying to a specific message. SMS is chronological, you can test this by opening your phone’s SMS app and trying to reply to the second to last message you received from someone. In SMS there’s no way to do that.
The best thing you can do is consider the messages chronologically, and assume that the reply is in response to the last message you sent to that number from the number you sent it from.
I suspect your are interested in this because you need to send notifications and get responses to those notifications and you realised you might need to send more than one notification to a user at a time but still get their responses. The best way to get around this is to use different numbers to send the different notification messages from, then when they reply you can tell which notification they were replying to by the number they sent the message to.

Related

How to send SMS from Chat flow in Studio

I have a studio flow that receives chat messages (from Whatsapp) and forward the conversation to Flex.
I'm trying to send a SMS notification to a hard-coded number as this happen.
The issue is that the SMS is never sent and the Send Message widget fails with the following log:
Failure sending message: Chat service or channel parameter missing
I understand that it's probably because the flow has a Chat context and that the widget expects a Chat Service. But I want to send a SMS.
I tried to configure the Send Message widget like this:
SEND MESSAGE FROM and SEND MESSAGE TO set and all other config fields empty
SEND MESSAGE FROM and SEND MESSAGE TO and PROGRAMMABLE CHAT SERVICE with a Messaging Service ID (which doesn't really make sense but hey...)
Neither worked.
How can I send a SMS from a Chat flow in Studio?
I was just able to knock up a quick Studio Flow that receives messages from WhatsApp and sends out an SMS to a hard-coded number and it worked for me. The way I did it was to hard code both the Send message from and Send message to numbers in the Messaging & chat config section of the Send Message widget, like this:
In this case you must ensure that the Send message from number is a Twilio number that is able to send SMS messages.

How to get sent message immediately with Send & Wait for Reply Widget - Twilio Studio

Hey Twilio Developer Evangelists, is there any way to get the sent message immediately with Send & Wait for Reply Studio Widget. It exposes three options:
Reply
No reply
Delivery Fails
But I am specifically looking for the Delivered option so, I can do something without waiting for a reply. I do want to wait for the reply but I also want to get the sent message right after it's sent. Is there any way I can achieve this? With webhooks to receive the sent message OR any other way?
With programmable messaging, Twilio gives an option to track the status of the sent message with statusCallback parameter but I do not see any option to provide a status callback in the studio widget.
Twilio developer evangelist here.
There is no way, that I know of, to achieve this in Studio. There is also no way to set a general statusCallback URL for outbound messages from a number.

Twilio SMS have status delivered but don`t receive to phone

Twilio SMS have status delivered but don`t receive to phone
I try to send other phone numbers but have the same problem
Refer to the Twilio Support page about Troubleshooting Undelivered Twilio SMS Messages;
Twilio's Support team can help investigate what went wrong with
delivering your message. Please collect 3 or more message SIDs in your
SMS logs from the last 24 hours that show these same issues, and
Open a support request.
I find the reason
for other operators dont like the same worlds for me is "points"
I delete "points" from message and SMS receive

Receiving notifications from Slack Direct messages

I'm building a simple slack bot and can currently send private messages as well as checking for the last 10 messages received within this one-to-one channel.
Is there a way of getting a POST notification to my webservice whenever the user replies, instead of having to poll and continuously check messages on that one-to-one channel?
Now you can make use of Slack events to receive notifications.
In the give use-case, 'Message' event can be used to capture message received and process accordingly.
https://api.slack.com/events/message
Bots generally work by connecting to the real-time messaging API, a WebSocket-based API that sends you events as they happen. Specifically, you should see a message event sent to you every time a message visible to your bot is sent.
To answer your question, there's no way to get an HTTP POST sent to you instead; you'll need to connect to the RTM API and listen for events that way.

IM app, how to ensure the other side received my message?

I am writing a IM app on iOS, and not sure about how to ensure that the other side has received my message. Could anyone give me some suggestions or existing frameworks?
You can have the device that receives a message send data back that confirms the message has been received. Most likely each message would be assigned a unique id that the receiving device would send back so that it knows specifically which message was received.
I am not familiar with Pubnub but looking quickly at their SDK it looks like you can send messages both directions on a single channel, or else you could setup one channel for sending messages and one channel for confirming messages.

Resources