I'm using Twilio Studio and have two phone numbers.
I want to start a text conversation (A) with the customer and after a certain event (like keyword "manager") occurs, I want to alert a second text conversation (B) from a new phone number with that same customer.
I was thinking it might work to forward a message from (A) to (B), but I'm not sure how to give B the phone number that (A) was texting.
First off, I'm a newbie so take what I say with a grain of salt...
I'm almost positive there are 3 or 4 tutorials that you can link together to solve your issue. I think I've read/watched all of them 4x in the last 3 days trying to self learn.
To be honest, from what I've gathered in my self teachings your answers lie within their YouTube channel and their help docs on Functions, Webhooks, HTTP Requests and maybe even TwiML Redirects. But again, I'm a new guy.
If someone who is more knowledgeable doesn't respond back then I'll try to help you because I think I can if you can bear with me. Just reply with a tag so I'll get an alert. Good Luck (to us both!)
you can retrieve the phone number of the customer by referencing off any text you sent/received from the costumer in the flow.
For instance a if you texted them it would be {{widgets.your_widgets_name_here.outbound.To}}
Then just type in this syntax {{widgets.your_widgets_name_here.outbound.To}} in the message body of the widget you are using to alert conversation (B).
It will display the Number of the costumer.
You could then put that in the send message field of any widget in that conversation by refrencing the same way {{widgets.your_widgets_name_here.inbound.body}}
Related
I can see that for all the voice interactions, behind the scenes flex is using its voice API to create a conference between caller and worker. How do I obtain the created ConferenceSid after the task has been selected and reserved?
What I would like to do is simply Get the value upon connecting.
I can see a very long and not so pretty way of getting it, which is by running a twilio function that iterates over every conference, making additional requests to see the participants. But that seems way to complex to me.
I can see in the logs that the conference friendly is being printed
ConferencesState handleConferenceUpdate WT5d0800a3ce8724fd55cf89841c48XXX
Is there anyone who can help here?
UPDATE:
#philnash below answered the question exactly.
Twilio developer evangelist here.
There seems like a couple of ways to get hold of the Conference SID in a Flex interaction.
First, the task that your worker accepts has a number of attributes that are set by Flex and relevant for the type of task it is. For a voice call, you will find a conference key, which has an object including the sid as well as entries for the participants.
Secondly, I found that the <TaskCanvas> component in the UI is passed a context that includes a conference object. That object then has a source property which expands to an object with a conferenceSid property, as well as other properties, including a participants list.
Does that point you in the right direction?
On a ride booking app, it is required communication between driver and user.
Now the case, if user A contacts the driver via website or app, call or sms can be achieved via Twilio, we don't want to expose their contact numbers to each other.
If three users A, B and C contacts the driver and driver has no app installed, in fact the driver wants call back and sms reply. How the driver can reach users on Caller ID.
There could be large number of users and we can't buy separate twilio number for each user.
Please advise the solution.
How many users are likely to need to contact each individual driver at any one time? Not many I wouldn't think.
Buy 10 Twilio numbers, assign them incrementally as users call/SMS their driver and save the assignment for user/driver numbers in your database.
If the driver calls/SMS a number in response query the database and route the call/SMS to the user it was assigned to when they called the driver.
Recycle the 1st assignment once the 11th user calls/SMS the driver, rinse and repeat.
Twilio developer evangelist here.
In order to maintain anonymous communications in this way you need as many numbers as the maximum number of relationships one person in your system has. The best explanation of this is in this article on masked text messaging with Twilio (though it applies to calls too).
Your comment on miknik's answer suggests you want to keep these relationships alive forever. This is not the way that most services build out this feature. They normally give a particular length to the relationship, Uber for example will recycle the phone number a number of minutes after a ride ends.
If you are looking for an easier way to manage this kind of number pooling and masking, check out Twilio Proxy, it handles a lot of the logic for you. It is still in developer preview right now, but you can apply for early access.
I have two numbers that forward to a single phone, one work number (A), and one personal number (B).
(A) was setup using Twilio to forward to my phone.
Is there anyway to have some sort of caller ID indicator letting me know which number is being called? That way I can distinguish whether the incoming call was for my work or personal number.
Any help would be deeply appreciated.
Thank you,
This depends on how you have it set up.
If you have your office and personal line ring a twilio number you would do something like this
First you would add a verified outbound caller ID with twilio
https://support.twilio.com/hc/en-us/articles/223180048-Adding-a-verified-outbound-caller-ID-with-Twilio
Then you on an inbound call you would grab the id of the number called. It will be listed as the To number.
https://www.twilio.com/docs/api/rest/call
Then when they call the phone you are forwarding it to you would just specify the To number from before as the From number.
https://www.twilio.com/docs/api/rest/making-calls
If you have a different set up or would like to have twilio make an announcement instead of showing that caller ID there are other work arounds for those methods too. Just let me know and I can edit my answer.
I am studying twilio's auto calling functionality for the one of our client.
Requirements:
We are handling software system of our client. And when ever there is error in
the system I need to call specific persons.
I could do above function easily on testing environment using php. But In actual scenario,
I want call on multiple number like if one person is not receiving call I must get call
on second number, third number and so on until one person receives call and understands error.
For the above functionality I have studied "Call Screening " example from site and also
communicate to support person but I didn't get exactly from the conversation.
When I call attempt_call.php from my browser I am getting xml output on browser only not any call.
Please guide me if any ready example is there that can solve my problem.
Thanks and best regards.
Piyush Merja
CallScreening didnt work for me..
I have called to one person and checked for its status if its completed then process terminated or continued to another person
I want to have a flow where I text a user, and that user can text back to trigger an event. I could have multiple outstanding messages to a user at any one time - is there anyway on receiving a text message I can figure out which message it is in reply to, without including an id number in the text message body?
Twilio evangelist here.
So, just to be clear about the problem, it sounds like you have multiple steps in your workflow that might happen in parallel, or at least before the user can response, rather than in a specific linear message/response workflow. Your app might send out 5 messages, and you want to match up each of 5 replies to a specific message.
If thats the case, then unfortunately there really isn't a direct way built into Twilio to let you match up a message reply without including some kind of ID or command in the response message.
Hope that helps.