-1

SMS Conversation with 2 People Scenario

I would like to create an application that can do the following:

  • one twilio phone number for the company

  • create an SMS conversation between any two people associated with the company

  • constrain that conversation to just those two people.

  • keep this conversation alive for a long time. Example: two people have SMS conversation on day one. Several days later one of the people adds a new SMS message. goal: that new message Will go properly to the second person (because the app still remembers the conversation connection)...

  • can we also use this concept to connect various pairs of other people associated with the company?

  • I am looking into this https://www.twilio.com/conversations-api however I'd appreciate any insights to know if this is the best twilio scenario to follow.

Thanks Dave


Additional Scenario Example

  • We buy 1 twilit_phone_number

  • We create conversationid-X

  • We add participant twilio_phone_number to conversationid-X

  • We add participant A to conversationid-X

  • We add participant B (JOE) to conversationid-X

  • We send a sms text to participant B (JOE) with conversationid-X

  • NEXT

  • We create conversationid-Y

  • We add participant twilio_phone_number (same number) to conversationid-X

  • We add participant C (different person) to conversationid-Y

  • We add participant B (same JOE) to conversationid-Y

  • We send a sms text to participant B (JOE) with conversationid-Y

Question: when participant B (joe) responds - which Conversation ID is he associated to at this point: conversationid-X or conversationid-Y or something else? Does his reply go to participant A or participant C?

Related questions:

  • how do we best manage Conversations within 1 twilio_phone_number?

  • how do we make sure that participant B (same JOE) always replies to the correct conversation ID ... conversationid-X or conversationid-Y

Thanks Dave


Another Issue - I'd like to add the "friendly name" to the conversation for clarity.

I checked here - https://www.twilio.com/docs/proxy and here https://www.twilio.com/docs/proxy/api/participant but still curious about the following scenario.

Thanks philnash again for your help. As I work with proxy, it is occurring to me that Communication could get confusing amongst participants.

As a quick example: if person A contacts 2 people = persons B - C.

When persons B - C reply - it might be difficult for person A to know exactly who is responding.

I noticed that part of creating a participant is entering a "friendly name". In the case above it might be helpful to somehow expose at "friendly name" when texting.

Q: is there some way using proxy, rather than masking, to do the opposite and unmask the participants by at least showing the "friendly name" to each other somehow?

Q: Is there a way to insert / attach the friendly name to the twilio phone number or to the body of the text?

Example:

Person A to person B SMS = Hello (from Person A w "friendly name")

Person A to person C SMS = Hello (from Person A w "friendly name")


Without Friendly name...

B to A SMS = Hello back (from who?)

C to A SMS = Hello back (from who?)

With Friendly name.. person A gets back 2 sms like:

Person B to person A SMS = Hello back (from Person B w "friendly name" )

Person C to person A SMS = Hello back (from Person C w "friendly name" )

It seems the only way person A can track replies is by the twilio phone number? but they may not know or care about a random twilio number so how are they supposed to Keep track of who says what? (seems like the "friendly name" could help with this...)

Q: What is the best way to set this up?

This would be helpful to know either way so thanks very much for the help.

Thanks Dave


I should also mention that this business has a central database (COMPANY_DataBase) that we use - so here is another possible scenario:

Use the database as the central switchboard for conversations between multiple pairs of people and add "friendly name" to sms body.

Example:

Person A send sms to COMPANY_DataBase - who passes it to Person B. because the database knows both participants then it could modify the outgoing SMS body and includes (from person A "friendly name") in the sms body...

Then person B send back response the COMPANY_DataBase who includes (from person B "friendly name") who passes this back to person A.

Since the company does NOT have a specific cellphone for this - is it possible to use an extra twilio phone number as the central switchboard number?

Although this might work, it sounds quite cumbersome and I'm hoping that twilio oh has some kind of method for doing this type of thing.

Thanks Dave

funtime
  • 21
  • 5

1 Answers1

0

Twilio developer evangelist here.

It is not possible for one person to be in multiple conversations with other people through just one Twilio number.

With SMS messages, there is no concept of replying to a particular message. Messages are sent and received chronologically. Therefore there is no way to decide that one message was intended for a particular recipient and another message is intended for another recipient.

To achieve this with SMS, you will need to use multiple phone numbers. This actually sounds like more of a use case for Twilio Proxy, which is built for masked conversations like you are describing. You might be interested in this article on how many phone numbers you would need. Briefly, you need as many numbers as the maximum number of concurrent conversations one person will have, but read the article for more detail.

philnash
  • 70,667
  • 10
  • 60
  • 88
  • thanks very much philnash - Twilio Proxy looks very interesting for this purpose. it says public Beta ... do you think it is stable and ready to use right now? – funtime Feb 17 '21 at 20:56
  • I would say it is definitely ready to use. It is in use as a component of [Twilio Flex](https://www.twilio.com/flex), our contact centre software. You can read more about [what beta means at Twilio here](https://support.twilio.com/hc/en-us/articles/115002413087-Twilio-Beta-Product-Support). – philnash Feb 17 '21 at 21:35
  • Thanks much philnash. I got a basic proxy demo working from the proxy docs. Next I would like to add webhooks to track the interactions etc. How can I set that up? Can I create all this in Studio? – funtime Feb 18 '21 at 17:35
  • Docs for [the available webhooks can be found here](https://www.twilio.com/docs/proxy/api/webhooks). Not sure what you mean about creating it in Studio though. – philnash Feb 18 '21 at 22:35
  • Thanks philnash I just edited the main post asking about adding the "friendly name" to the conversation for clarity. – funtime Feb 20 '21 at 16:41
  • @funtime In your question there, your user A would be interacting with B and C over different phone numbers. And to interact with B and C in the first place, they would have to know that the number corresponded to B or C in order to send the first message. The assumption there is that they know who they are contacting already. You could build your second option, using your database to insert names, but you would have to build your own version of the proxy service using the regular Twilio messaging API. – philnash Feb 21 '21 at 03:44
  • Thanks philnash - in our case A would pick a person: B or C from our web site and pass the message first to our database - where we could add the A Name to the message so it is clear to B and then sms B. Issue is B may get several sms that start from A or D or E etc. and we need to keep track of B replies since we can't add the friendly names to his sms – funtime Feb 21 '21 at 17:15
  • you mentioned: You could build your second option, using your database to insert names, but you would have to build your own version of the proxy service using the regular Twilio messaging API. --- Do you have any suggestions how to construct our own proxy service - at least some basics we could use as a guideline? – funtime Feb 21 '21 at 17:17
  • There is a [tutorial on SMS with masked phone numbers](https://www.twilio.com/docs/sms/tutorials/masked-numbers) right here. :) – philnash Feb 22 '21 at 00:27
  • Thanks much again philnash – funtime Mar 06 '21 at 18:20