SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

How to Track User Input From the Gather Input on Call Widget

Objective

This article explains how to track user DTMF keypresses or speech inputs captured by the Gather Input on Call widget in Twilio Studio. It also shows how to retrieve the captured values for any execution to ensure proper flow conditions.

 

Product

Twilio Studio

 

Environment

legacy Twilio Console

 

Procedure 

The Gather Input on Call widget collects user input during a call, either via:

  • DTMF keypresses
  • Speech recognition

While DTMF values are consistent, speech recognition results can vary across languages and dialects. This makes it harder to directly configure matching conditions in the Split Based On widget, compared to handling numeric inputs. To ensure proper matching, it is important to first track the exact captured speech input.

To view or retrieve the gathered input:

  1. Go to the Twilio ConsoleStudioFlows.
  2. Select your flow and open Logs.
  3. Choose the execution you want to inspect.
  4. Expand the steps and locate the Gather Input on Call widget (use its widget name if you have multiple in the flow). 

Note: If the gather widget shows timeout as the event then this widget was timed out before the input was captured, so it is recommended to increase the “Stop gathering after” field in the gather widget. If the input was captured it would either show speech or keypress in the event row for the gather input on call widget.

  1. Open the Widget & Flow Properties tab.
  • Here, you’ll find the captured input inside the flow data.

 

Additional Information

You can also fetch this flow data programmatically using the Execution Context API:

In the returned JSON, the values are stored under:
flow_data.widgets.<GatherWidgetName>.digits → for keypress input
flow_data.widgets.<GatherWidgetName>.SpeechResult → for speech input

The SpeechResult will reflect the recognition text based on the language configured in the widget settings, and may vary depending on speech recognition accuracy.

Have more questions? Submit a request
Powered by Zendesk