Skip to content

Get Interaction Model (Alexa) v3.0.1 Help

Adds the interaction model JSON of the selected skill's latest succesful build to its output.

Note: Steps of the Alexa toolkit work only with existing custom Alexa skills with the method to host your skill's backend resources selected as Provision your own. The skill interaction model must be built with intents and slots on the Amazon developer colsole prior to building solutions with the Alexa toolkit.

How can I use the Step?

You can use this Step to retrieve the JSON of the current build of the selected skill's interaction model This can be useful while building solutions with an Alexa skill that is continuosly updated. Read more about it here.

You can use the Get Skill Status (Alexa) Step before this Step to check the status of the inteaction model. Use the Update Interaction Model (Alexa) Step in the logic on this Step's exit to substitute the interaction model retrieved by this Step.

How does the Step work?

You select an authorization and a skill. When the Step is reached in the Flow, it sends a get request to the skill. The Step adds the interactionModel object of the response to its output, and the Flow proceeds down this Step's next exit.

Prerequisites

Before building Flows using the Alexa toolkit, you must complete the following steps:

  1. Create a Custom Alexa skill with at least one intent in the Amazon developers console. Read more on how to create Alexa skills here.
  2. Install the Alexa Skill Adapter flow. See the instruction here.
  3. Create an authorization of your OneReach.ai account with the Amazon developer account. See the instructions in the Add an authorization modal of the Authorization section of an Alexa Step.

Alexa Skill Adapter Flow

The Alexa Skill Adapter Flow is required to manage the interactions between OneReach.ai and the Amazon developer console. To install it take the following steps:

  1. Add any gateway Step template from the Alexa toolkit to the Flow. For example, a Wait for Intent (Alexa) Step.
  2. Go to the Details tab of the added Step. The Authorization collapsible group contains a warning message with the Install Adapter button. Click to install the adapter Flow. After the installation is completed, a respective message should appear.

Note: In case Alexa Skill Adapter Flow is deactivated or deleted, a respective alert will pop up in the gateway Step of the Flow with a button to fix the problem.

Authorization

To set up an authorization, select one of the two options:

  • Click the Select authorization in current step option to select an authorization from the respective dropdown in this Step. Use this option when you need to:
  • Select the Inherit from previous step option to choose the authorization that was used in the last executed Step of the Alexa toolkit in the Flow. Use this option when you have already created an authorization and used it previously in the Flow.

Create a new authorization

To create a new authorization, do the following:

  1. Click the Select authorization in current step button.
  2. Click the Gear button, then Add, or select to Create new authorization in the dropdown.
  3. A modal window for creating a new authorization will pop up. Follow the instructions in the modal's collapsible. When finished, the created Authorization name should be added to the list in the dropdown. Click Gear > Refresh to update the list of authorizations.
  4. Select respective Authorization name in the Select authorization in current step dropdown.

Select authorization in current step

The Select authorization in current step dropdown lists every authorization added to your OneReach.ai account.

  • To choose an authorization, select its name in the dropdown.

The Gear button contains options to Add a new or Delete an existing authorization, as well as to Refresh the list of added authorizations.

In case some changes were made to the authorization, an option to Reauthorize is available. To do that, click the respective button, then:

  1. Click Reauthorize now in the modal window. A new Amazon tab will open.
  2. Enter the login and password of the Alexa developer account.
  3. Click Allow.

Inherit from previous step

When a Step from the Alexa toolkit is added to the Flow, you are expected to manually choose an authorization from the respective dropdown. If another Step from the toolkit is added to the Flow, the option to Inherit from previous step is chosen by default. When selected, it continues to use the same authorization as was defined in the previous Step of the toolkit without the need to select it manually.

Warning! If the Inherit from previous step option is selected, but there is no Step of the same toolkit in the Flow, the Step results in an error.

Alexa skill

If the authorization was successful, the Alexa skill dropdown should contain the list of available custom skills created in the connected Amazon developer console.

  • To choose a skill, select its name in the dropdown.

Click the Refresh button to update the list of available skills. Click the Refresh skill interaction model to get the latest version of the selected skill.

After a skill has been selected, the Step checks the following settings:

Endpoint URL

Endpoint URL should be updated automatically by the Step. In case it fails, a link to copy the Endpoint URL becomes available. To set it manually do the following:

  1. Open the Alexa developer console.
  2. Select the respective skill.
  3. Select Build > Endpoint, then select the HTTPS option as the Service Endpoint Type.
  4. Paste the Endpoint URL value in the respective field of the required region.
  5. Set the respective SSL certificate type as My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority.
  6. Click Save.
  7. Go to Build, then click Build Skill.
  8. Return to the Flow after the skill has been updated and click Refresh skill interaction model.

Auto Delegation

Auto Delegation should be turned off automatically by the Step. In case it fails, a respective alert should pop up on Step UI. To turn it off manually do the following:

  1. Open the Alexa developer console.
  2. Select the respective skill.
  3. Select Build > Interfaces.
  4. Turn off the Auto Delegation toggle.
  5. Click Save.
  6. Go to Build, then click Build Skill.
  7. Return to the Flow after the skill has been updated and click Refresh skill interaction model.

Merge field settings

The output data of the Step is stored in a JSON object under the name provided in the Merge field name. To learn more about Merge fields, their types, and how to work with them, follow this link.

Output example

The output includes the interactionModel object. See the list of available properties here.

See below the structure of the Merge field object:

json
{
  "interactionModel": {
    "languageModel": {
      "invocationName": "space",
      "intents": [
        {
          "name": "AMAZON.CancelIntent",
          "samples": []
        },
        {
          "name": "AMAZON.HelpIntent",
          "samples": []
        },
        {
          "name": "AMAZON.StopIntent",
          "samples": []
        },
        {
          "name": "AMAZON.NavigateHomeIntent",
          "samples": []
        },
        {
          "name": "AMAZON.FallbackIntent",
          "samples": []
        },
        {
          "name": "GetNewFactIntent",
          "slots": [],
          "samples": [
            "a fact",
            "a space fact",
            "tell me a fact",
            "tell me a space fact"
          ]
        }
      ],
      "types": []
    }
  }
}
{
  "interactionModel": {
    "languageModel": {
      "invocationName": "space",
      "intents": [
        {
          "name": "AMAZON.CancelIntent",
          "samples": []
        },
        {
          "name": "AMAZON.HelpIntent",
          "samples": []
        },
        {
          "name": "AMAZON.StopIntent",
          "samples": []
        },
        {
          "name": "AMAZON.NavigateHomeIntent",
          "samples": []
        },
        {
          "name": "AMAZON.FallbackIntent",
          "samples": []
        },
        {
          "name": "GetNewFactIntent",
          "slots": [],
          "samples": [
            "a fact",
            "a space fact",
            "tell me a fact",
            "tell me a space fact"
          ]
        }
      ],
      "types": []
    }
  }
}

Error handling

By default, the Step handles errors using a separate exit. If an error occurs during the Step execution, the Flow proceeds down the error exit, e.g. selected skill isn't found. For more information on error handling, follow this link.

Reporting

The Step automatically generates Reporting events during its execution, allowing for real-time tracking and analysis of its performance and user interactions. To learn more about Reporting events, follow this link.

Services dependencies

  • Alexa Skill Adapter v3.0.0 or upper

Release notes