How to capture anything your users say

Capturing arbitrary text from your users

Tom Berwick
Alexa Skills Dev
2 min readDec 9, 2020

--

One of the more common questions I see with those delving into Alexa development is “how can I capture any text a user says?”.

The short answer is you can’t. There used to be a specific slot that was able to do this, but it was only available in the US region and is now not available.

The long answer is that you can do it in certain situations and only for one intent. The answer lies in a built-in searchQuery slot.

There are some caveats to its use however. It can be the only slot within your intent. For instance you couldn’t have a TODO list style skill with multiple lists where the user says “add {searchQuery} to my {listName} list” and resolve the query and the listName. e.g “alexa add finish writing a medium article to my articles list.” So you may need to think creatively about how your dialog strategy works. It might be that a user selects a list for the entirety of their session at the beginning of the interaction with your skill e.g. (Alexa response in italic)

“Alexa open super list skill”

Ok, what list are you working with today?

“My article list” (store this in your sessionAttributes)

Great, now working with your article list, what would you like to add?

“Add finishing my new Alexa article”

Okie dokie. Is there anything else?

Alternatively you could follow up every time they add something by asking what list they want to add it to. The important part here is making sure you clearly articulate and explain to your end users how your skill works to ensure a smooth user experience.

As per the docs, each sample utterance must include a “carrier phrase” as well. This simply means that the searchQuery slot can’t be the only part of an utterance, it requires some other qualifier like in our example would be “add”. Like any intent the better this is and more examples, the easier Alexa will hit the right intent.

There we go, short and sweet. If any of you have questions please leave them in the comments below.

--

--

Tom Berwick
Alexa Skills Dev

Mobile App, game and full stack developer. Constantly trying to learn new things and dabble in growth hacking