0

I have a very simple flow based off the appointment reminder template that simply sends a reminder, waits for a reply, then based on a user response, sends an appropriate response to the user. I removed webhook widgets as this was just a test to see if the flow would keep state and respond, as expected.

Basic Twilio Flow

I have configured my phone number to send incoming SMS messages to this flow: Messaging routing for active phone number in Twilio

Additionally, the service specified simply states for messages to be handled by the sender's webhook: Service webhook config

When I initiate the flow via a REST API call, all starts just fine. My phone gets the message. In the flow log, I see the flow is now active.

When I reply to the message, I see my reply in the logs for the flow in question. However, I receive no reply from the flow. Twilio Flow Execution Log showing a REST API invocation and a response. The response does not result in action within the flow as expected.

If, however, I hook up the "Incoming Message" trigger from within the flow to one of the widgets, it executes, again, demonstrating that my messages are indeed getting routed in the general direction. (Of course, this initiates a new flow and does not resume from the state in the flow instance created by the REST API call.)

I've seen other Stack Overflow queries on similar issues. The screenshots I've included are the result of my following those suggestions to ensure that incoming messages are indeed routed to my flow. Yet, I can't seem to get the flow to respond how I would expect.

It seems I've overlooked something but, based on what I have seen in Twilio tutorials and other questions here, I can't for the life of me figure out what it is.

General Grievance
  • 4,555
  • 31
  • 31
  • 45
  • Thanks for your detailed description of the issue. I'm still trying to understand the scenario a bit better: Can you explain why you use a messaging service in the first place and don't directly hook the flow to the phone number (without a message)? My second question is regarding the flow execution screenshot. I understand that you don't want to expose your phone number here - which is good. But can you tell me if both executions have the same contact number or are these two different numbers that you used for testing? – IObert Oct 10 '22 at 13:39
  • Thanks for the response - in this particular use case, the hope is that, based on a medical appointment event, a series of reminder texts would go out at planned intervals to a patient. As such, the application initiates the conversation (via API) rather than an incoming text from the patient. – Dan Keller Oct 11 '22 at 19:59
  • As for the flow, yes, all the executions have the same contact number. – Dan Keller Oct 11 '22 at 19:59

1 Answers1

0

I'd recommend removing the messaging service from your scenario. The way I see it, it's not required and you can achieve the same result by connecting the phone number to the Studio flow.

PS: If you don't want to delete the service, it's also fine if you just remove the phone number from the sender pool of the service: enter image description here

IObert
  • 2,118
  • 1
  • 10
  • 17