Track sms conversation with twilio and there is multiple conversation between two numbers - node.js

I am building customer service application and I have integrated Twilio for all SMS operations.
Now when customer request for the service system will generate one ticket and details will be messaged on customer's number.
and then the customer can message to my Twilio number which is service center specific(I mean each service center has been assigned one Twilio number) and service center executive can reply him back so I want to make this SMS conversation.
I can use cookies twilio SMS conversations but it won't work in the case when my application will first message as I can only set cookie when my server is actually acting as a server which will be only in receiving SMS
which is narrated in Application Initiated Conversations section in above article.
and another problem is there can be multiple tickets for single user with particular service center so how to manage it.
Any help is appreciated.

Twilio developer evangelist here.
SMS is a simple protocol that has no idea of different conversations, simply a chronologically ordered set of messages. There are two ways to get around this.
You can either insist that your user include an ID for the ticket they are referring to so that you can parse it out of the message and associate it to the right conversation.
Alternatively, you can add more than one number per service centre that can be used for different conversations.
Let me know if that helps at all.

Related

Using the Bot Framework to post to a Microsoft Teams channel with NodeJS

Is there a way to send proactive cards from a bot to a Teams channel? The use case is a channel for service tickets. Once they get posted, a user will be able to interact with them with a few actions.
I’m looking at the documentation here for sending proactive messages. At the bottom, there’s a section for ”Creating channel conversations”, with a small reference to the startReplyChain(). However, the actual code and sample on GitHub still seem to reference a conversation with a member rather than sending something proactive to a channel.
There does appear to be documentation for incoming and outgoing webhooks, which is what I may end up doing. My only real concern is that it requires using Actionable Cards, which it references as legacy everywhere. This is despite saying that you can’t send Adaptive Cards with them. Perhaps they intend to enable these connectors to send Adaptive Cards, it’s not just very clear to me if this is a long-term solution I should be focusing on.
This is definitely possible, and it's important to note that you can even send from another process/application (e.g. on a schedule from an AWS Lamba). You can see a sample here for this.
The process of sending the message is just part of the story though - you need to have certain information already saved (e.g. in your database) to know how to contact the right user, group chat, or channel conversation, but there are a few ways to get that information. The most common is, when you bot is added to the conversation, to get it from the conversationUpdate event. You'll need conversation id, service url, tenant id, and your bot's App Id (what you get in the Azure portal for your bot, and which you're using already in your app's configuration, teams manifest, etc.). You can read more about the topic here and here.
Another option, if you don't have access to conversationUpdate (e.g. the user hasn't installed your app) is to call the Graph API to install your app. It's only possible to do this to a channel (on the v1 or beta api) (see here) or to a user (see here), but on the beta api only, and not (yet?) for a group chat.

How can you send SMS for an existing phone number without Twilio?

I want to make a service for existing business so if they receive a message it automatically gets parsed by my bot and if necessary bot responds to it from the same number.
With Twilio, you need to move your number over to them, which is very inconvenient for businesses who often have land phone lines.
Twilio developer evangelist here.
You need to move numbers to Twilio in order to use the Twilio service because that is the only way that Twilio can receive calls and SMS messages from the phone network for that number.
If you are working on behalf of a business that has a landline, then why not purchase a Twilio mobile number for them that can be used for the chat bot? That way they keep their existing number for calls, but customers can interact with them in a new way via the mobile number and your chat bot.

In Twilio, what is the difference between Twilio number and logged in agent number?

In Twilio, what is the difference between Twilio number (For Customer Number) and logged in agent number?
Is every agent have unique Twilio number to receive an incoming call?
I assume agent number you are referring to is a Twilio Client name.
Twilio Number is the number you bought from Twilio which can be used in the following cases .
1.You can configure any call to this number. i.e., If the number receives any call, you can redirect to another number or say a common message or configure a ivr menu etc.,
2.To initiate a outbound call from Twilio, you can set this number as the caller id.
Twilio Client on the other hand, is used to connect our web application client(Browser) side to Twilio and vice-versa.
The Client name is created while generating Capability token which is used for setting Twilio Device in our client side.Then ,the browser tab is identified as the Client name by the Twilio. (used while dialling your browser tab)
You can set a same client name for limited number of Twilio Devices.
For detailed information on Twilio Client, visit this site.

Twilio Inbound SMS issue using Node.js

I am trying to set up a node.js app as listener for twilio inbound sms.I have created a twilio account which gave me trial sandbox number(USA).
Using this trial number I was able to successfully send SMS to verified mobile numbers But when I send SMS to the sandbox trial number my app is not able to receive the same and twilio logs also didn't show up the inbound SMS details.
I have configured the end point in twilio SMS URL and the end point is accessible.
Are there any restrictions for inbound SMLS for twilio trial sandbox number. I have sent multiple messages to the number but still no luck.
Please note am trying to send SMS to a US twilio sandbox number from India. Could you suggest what I am missing.
Twilio Developer Evangelist here,
I apologize for this issue you are running into. I have just recreated this issue, as did another member of my team. A bug report has been filed.
Keep in mind, you can still obtain a unique Twilio number while using a trial account. See the Getting Started page to get your Twilio number. This will allow you to use our API while still being on a trial account. The limitations of trial accounts can be found here.
Thanks for bringing this to our attention, we'd love to mail you a Twilio t-shirt to say thank you. Since Stack Overflow doesn't allow for private messaging, please shoot me a private message on twitter to #br0dan with your address and t-shirt size.

Sending sms and receiving delivery report in J2me

I am developing a project where I need to send an sms to the contact and if the contact doesn't receives the sms I have to send him another or choose another contact. So, for notifying my midlet of successful sms delivery i'll need to receive and read the sms delivery report.
How to read delivery report using j2me? Or Is there any other way to achieve this?
If you put your application on the Nokia store it will be automatically signed by Nokia to the 3rd party trusted domain, so the prompts will be less. Also i think if you implement SATSA JSR http://en.wikipedia.org/wiki/Security_and_Trust_Services_API_for_J2ME you can talk to the Sim card and get relevant information maybe on delivery of SMS also, but you need the app to be signed to the operator domain for permission. On the other hand, if you have an SMPP connection to a server you can send SMS to users with a port number and also view the message status there.

Resources