0

We have explored proxy already but determined it would be too costly for how we ant to use it.

We have seen another piece of software do what we want but we are getting stuck.

Step 1:

Company AAA Twilio # ===> Lead A

Step 2:

Lead A Reply ===> Company AAA Twilio # ===> Twilio # Pool A ===> Company AAA

Step 3 (This is where we see the breakdown):

Company AAA Reply ===> Twilio # Pool A ===> Lead A

What we we want to accomplish here is:

Company AAA Reply ===> Twilio # Pool A ===> Company AAA Twilio # ===> Lead A

Below is what we are trying to accomplish for the flow of sms messages. enter image description here

  • So, you want each company to have one external number, but internally you want to set up a relationship that allows the company to use one number per person that is interacting with them. The lead only sees the company number and the company sees individual masked numbers for each lead? Is that right? – philnash Jul 05 '19 at 00:56
  • Yes that is correct. The reason we want to set it up this way is because we want to be able to use the masked numbers as pooled numbers that can be used for other lead and company relationships. – Frank Pimentel Jul 05 '19 at 06:40

1 Answers1

0

Twilio developer evangelist here.

To achieve this you kind of have to build your own version of Proxy that starts with the same number.

The key here is that when you get a new incoming message to your public facing company number you need to create a relationship in a database between the messaging user, the company and a number in your pool. With that number you need to set up two way messaging such that:

  • For an incoming message to the public company number you forward the message on to the company's private number from the pool number
  • For a message to the pool number from the company private number you forward on to the customer from the company public number

The important thing is the relationship you store in the database. It must have all three parties, the customer, the company and the number that connects them.

Note, when you have looked up the relationship, you can do the message forwarding entirely with a TwiML <Message>. You'll want to set both the to and from attributes on the <Message> element:

<Response>
  <Message to="NUMBER_TO_FORWARD_TO" from="NUMBER_TO_SEND_FROM">{{Forwarded message}}</Message>
</Response>

Let me know if this helps at all.

philnash
  • 70,667
  • 10
  • 60
  • 88