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.

Creating Reports to Differentiate DTMF and Voice Responses in Twilio Studio Flow

Issue

If you are using Studio’s “Gather Input and Speech voice recognition On Call” widget's and want to generate a report that shows which usage responses were submitted via keypad (DTMF) and which were submitted using voice recognition, this guide will help. There is no built-in report in the Twilio Console to distinguish between these response types, so you’ll need to generate the reporting on your side. This guide provides a solid starting point.

 

Product

Programmable Voice, Studio Flow

 

Environment

legacy Twilio Console

 

Cause

Twilio Studio doesn’t currently offer a native Console report to separate or export usage responses by input type (keypad/DTMF vs. voice). While the data is available, you’ll need to use the Studio API or Event Streams to retrieve it and organize it into a report.

 

Resolution

To distinguish between keypad (DTmf) and voice (Speech) responses in Studio surveys, follow these steps:

  1. Use the Studio API to Fetch Execution Data
  • Access the Studio Execution Context API to retrieve detailed information about each usage or execution.
  • For each execution, review the context data for the “Gather Input On Call” widget. The response will indicate whether the input was via speech or digits.
     
  • You can use below API instruction: 

GET: https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Events.json
 

Retrieve a list of Events

  1. Organize the Data:
  • The API response will include fields such as SpeechResult (for voice input) and Digits (for keypad input).
  • Export or process this data as needed to create your own report distinguishing between the two input types.
  1. Automate Data Collection (Optional):
  • Use Twilio Event Streams to send execution data (including Flow SID, Execution SID, and Step SID) to your endpoint in real time.
  • Configure Event Streams to trigger after a widget is executed or at the end of the flow, depending on your reporting needs.

 

Additional Information 

  • If you only need to check the input (digits or speech) for a specific call, you can use the Call resource API. This will show the speech or DTMF data for that call, but it does not provide a report across all Studio Flow executions.
  • For reporting across multiple survey responses or flows, the Studio Execution Context API and Event Streams are recommended.
  • There is no out-of-the-box report in the Twilio Console for this use case; developer resources are required to implement the solution.
  • More information on Studio API and Event Streams can be found in the Twilio documentation:
  1. Studio Execution Context API
  2. Twilio Event Streams
Have more questions? Submit a request
Powered by Zendesk