0

When I change the {{contact.channel.address}} number to a different number that I receive form REST Parameters the message will not send.

I am trying to take a POST request that then triggers the Twilio Studio to call a store and tell them they have a new online order. They then press Keys to indicate how long the order will take to process and then I send a message to the customer telling them when to pick up their order.

When I keep the {{contact.channel.address}} the same the code runs correctly but when I change this it doesn't work anymore.

Found this link that says it cannot be changed for outbound call but it is possible to edit for send message

Does anyone know can I do this or is this functionality not support at all?

 curl -X POST "URL" -d "To=+1xxxxxxxxxx" -d "From=+1xxxxxxxxxx" -d "Parameters={\"orderid\":\"12345\", \"name\":\"Johen\", \"phone\":\"+1xxxxxxxxxx\"}" -u SID:AUTH

Studio Flow

Ali Ahsan
  • 985
  • 11
  • 16
Jack Kennedy
  • 18
  • 1
  • 5

1 Answers1

0

The {{contact.channel.address}} should be equal to the To you pass in when calling the Studio REST Api URL. In your example, "To=+1xxxxxxxxxx".

Alan
  • 10,465
  • 2
  • 8
  • 9
  • Hi Alan, thanks for the response! Do you know if it possible to send messages not using this? i.e I need the "To=+1xxxxxxxxxx" for the first part of the flow but I need a different number for the final part which I am trying to get from the JSON parameters but it will not send when I change {{contact.channel.address}} to say {{contact.channel.phone}} where .phone is a different number. Sorry if this isn't very clear. Thanks for your help. – Jack Kennedy Aug 13 '19 at 00:47
  • The Number to Call in the Make Outgoing Call widget is a non-editable field (greyed out). I would have to say no, and that it must be passed in. So you have multiple Make Outgoing Call widgets in your flow, making calls to two different destinations? – Alan Aug 13 '19 at 09:22
  • From the Documentation, "The To must be the Contact's phone number and cannot be changed". Make Outgoing Call https://www.twilio.com/docs/studio/widget-library#make-outgoing-call Is it possible to kick off a new Studio Flow using the Studio HTTP Request Widget, passing in the new To as a HTTP parameter used by the new flow and Make Outgoing Call widget. – Alan Aug 13 '19 at 09:32
  • Didn't know I could do this! Thanks for your help. – Jack Kennedy Aug 13 '19 at 16:58