Designing bots for Alexa

When designing bots for voice-first experiences, there are two considerations:
  • Not all the user interface elements available in EngageOne Converse Designer are appropriate for a voice-first experience. The following are therefore not supported:
    • The Card interaction type
    • The Message interaction type with Card buttons
    • URL buttons
    • Account Link and Account Unlink buttons
    • Phone buttons
    Note: Where the bot is intended for multiple channels then consider using a Condition action to determine the channel.
  • How you define your intentions.

Adding intentions for use with Alexa

To enable Alexa to make use of natural language understanding, your bot needs to make full use of intentions. Ideally all utterances should be defined as intentions. You can define all of these in Converse for export to Alexa or you can define a subset of the utterances in Converse and then add the rest later as part of the Alexa Skill. If this is not possible, the Converse Alexa integration provides a catch all for the utterances that you did not design for.

The utterances you define in Converse intentions should distinguish between:

  • Text that is received as a request: tell me the horoscope for gemini
  • The values that you as the designer want to get from the request: gemini
  • The slot in Alexa that holds the values: sign

You do not need to define all the utterances in Converse. You can define them later using the bulk editor in Alexa.

Example intention

In Converse, using the above example, the utterances could take this form:

  • horoscope [capricorn](sign)
  • horoscope [leo](sign)
  • horoscope [libra](sign)
  • tell me the horoscope for [leo](sign)
  • get me the horoscope for [leo](sign)
  • what's the horoscope for [leo](sign)
  • what is the horoscope for [leo](sign)

where:

  • [] identifies the utterance, or an element in the utterance, that will be configured as a slot value in Alexa
  • () identifies the name of the slot that will be configured in Alexa
In the JSON, Converse will define:
  • An intent with the same name as the Converse intention
  • The intent has samples (utterances) such as what's the horoscope for {sign}, tell me the horoscope for {sign}, and so on
  • A slot called sign
  • The slot has the sample values capricorn, leo, libra
In Converse, the slots are available through the context object and can be used in the same way as other variables in Converse. In order to avoid conflicts, consider how you name both variables and intentions.
Note: Alexa has inbuilt slot types. For example AMAZON.city. You may prefer to use these predefined city names rather than define your own in Converse.

Restrictions on intentions for use with Alexa

In Converse the names of intentions can include spaces and numbers. However, this is not supported in Alexa so the default integration will replace spaces and numbers with underscores. This may give unexpected results if you create intentions with, for example, the names 'get started' and 'get_started'.

Do not use restricted characters in utterances, such as underscores or trailing white spaces.

Please refer to the Alexa developer documentation for a complete list of restricted characters.