Choose Different Deep Links Based on the Slot Value


When you use the developer console to create an Alexa skill for your app or website, you can send the user to different deep links based on the value the user provides for a slot. Slots are variables within utterances.

To demonstrate how to configure an intent to use this feature, these steps start at step 3 of Tutorial: Use the Developer Console to Create a Skill for a Website.

Overview

When you specify deep links for an intent, you choose between two deep-link templates:

For example, different deep links are useful for cases where the user says, "Go to…" You can have "Go to settings" go to the settings page on your website while "Go to home page" opens the home page in your mobile app.

The following examples show how to configure the "Go to" intent, which is called COMMON_AppNav_GoPage in the developer console, in the case of a single deep link versus different deep links.

These procedures use Tutorial: Use the Developer Console to Create a Skill for a Website as the starting point for the example. You pick up at step 3 of the skill creation process.

In this case, regardless of the word the user says after "Go to," Alexa opens the home page of the website.

To add an intent with a single deep link

  1. Perform steps 1 and 2 of Tutorial: Use the Developer Console to Create a Skill for a Website.
  2. On the left, expand Step 3, and then click Intents.
  3. Scroll down to Common pre-built intents, and then expand Common Intents.
  4. From the list of common intents, next to COMMON_AppNav_GoPage, click Add Intent.
    The intent requires configuration, which you do next.
    Add common intent.
  5. In the table of Added Intents, next to COMMON_AppNav_GoPage, click Configure.
    Configure intent.
  6. Under What links should Alexa fire when a user interacts with this intent?, leave Single deep link template (default) selected.
  7. Select Add deep links for Android.
  8. For Android Link Target, select www.example.com.
  9. Click Add Android deep links.
    Add deep links for Android.
  10. In the Add a deep link dialog box, under Link type, select WEBSITE LINK.
  11. For Alexa link format, enter https://example.com, and then click Add link.
    Add link.
  12. For Deep link when Android app is not installed, enter https://example.com.
    Single deep link settings.
  13. At the top, click Save intent.

With this slot configuration, Alexa takes the user to https://example.com, regardless of whether the user says "Go to settings" or "Go to home page."

The following example shows how you can use a different deep link depending on the slot value. You configure "Go to settings" to go to the settings page while "Go to home page" opens the home page.

To add an intent that uses a different deep link depending on the slot value

  1. Perform steps 1 and 2 of Tutorial: Use the Developer Console to Create a Skill for a Website.
  2. On the left, expand Step 3, and then click Intents.
  3. Scroll down to Common pre-built intents, and then expand Common Intents.
  4. From the list of common intents, next to COMMON_AppNav_GoPage, click Add Intent.
    The intent requires configuration, which you do next.
    Add common intent.
  5. In the table of Added Intents, next to COMMON_AppNav_GoPage, click Configure.
    Configure intent.
  6. Under What links should Alexa fire when a user interacts with this intent?, select Different deep link template based on slot value.
  7. Select Add deep links for Android.
  8. Under Slot - required, click Select slot, and then click pageFeature.
  9. Click Add Android deep links.
    Add Android deep links.
  10. For Link target, select www.example.com.
  11. For Link type, select WEBSITE LINK.
  12. For Formatted deep link, enter https://example.com.
  13. For App not installed deep link, enter https://example.com.
  14. At the bottom, select home page.
  15. Click Add link.
    Deep link to home page.
  16. Below the deep link table, click Add Android deep links again.
  17. For Link target, select www.example.com.
  18. For Link type, select WEBSITE LINK.
  19. For Formatted deep link, enter https://example.com/settings.
  20. For App not installed deep link, enter https://example.com/settings.
  21. Click the home page check box.
  22. In the box under You can also add more slot values to the APPS_PageFeature slot type that is used by the pageFeature slot, enter settings, and then press enter.
  23. Click Add link.
    Deep link to settings page.
  24. Under Add default link - no slot value match, choose the following settings:
    • Android target - default linkwww.example.com
    • Link type - default linkUNIVERSAL LINK
    • Default linkhttps://www.example.com
    • App not installed default linkhttps://www.example.com
  25. At the top, click Save intent.
    You're returned to the Intents page, where you can continue to view and configure your intents.

Was this page helpful?

Last updated: Nov 17, 2023