Wait for Intent (Alexa) v3.0.3 Help
Starts the Flow when the specified intent is invoked in an Alexa session by the end user or triggered in a Flow with a Trigger Intent Flow (Alexa) Step.
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 build a Flow that processes an Alexa session invoked with the selected intent. This is useful if you need to process a specific intent in a single Flow.
Use Request Response (Alexa), Advanced Request Response (Alexa) or Request Confirmation (Alexa) Steps in the logic on this Step's exit to continue the conversation.
How does the Step work?
You select an authorization, a skill and an intent. The Flow proceeds down this Step's exit when one of the following happens:
- The end user invokes the specified intent as the first intent in a new Alexa session.
- The Trigger Intent Flow Step receives the specified intent as the current one in an ongoing Alexa session.
Prerequsites
Before building Flows using the Alexa toolkit, you must complete the following steps:
- Create a Custom Alexa skill with at least one intent in the Amazon developers console. Read more on how to create Alexa skills here.
- Install the Alexa Skill Adapter flow. See the instruction here.
- 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:
- Add any gateway Step template from the Alexa toolkit to the Flow. For example, a Wait for Intent (Alexa) Step.
- 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:
- Create new authorization;
- Select a previously created authorization manually.
Create new authorization
To create a new authorization, do the following:
- Click the Gear button, then Add, or select to Create new authorization in the dropdown.
- 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.
- Select respective Authorization name in the dropdown.
Select authorization in current step
The Authorization 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:
- Click Reauthorize now in the modal window. A new Amazon tab will open.
- Enter the login and password of the Alexa developer account.
- Click Allow.
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:
- Open the Alexa developer console.
- Select the respective skill.
- Select Build > Endpoint, then select the HTTPS option as the Service Endpoint Type.
- Paste the Endpoint URL value in the respective field of the required region.
- 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.
- Click Save.
- Go to Build, then click Build Skill.
- 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:
- Open the Alexa developer console.
- Select the respective skill.
- Select Build > Interfaces.
- Turn off the Auto Delegation toggle.
- Click Save.
- Go to Build, then click Build Skill.
- Return to the Flow after the skill has been updated and click Refresh skill interaction model.
Intent
An intent represents an action that fulfils the end user's spoken request. You can learn more about intents here.
After a skill has been selected and its settings have been checked, the Intent name dropdown should contain all the created intents within the selected skill.
- To choose the intent, select its name in the dropdown.
Note: You can type in the Intent name manually, then click
+
. An intent name added manually must exactly match the intent name in the skill.
Output data
This section is optional and allows setting up the properties of the input object that become available as the quick access Merge field values further in the Flow.
The Step outputs the full input JSON object sent by Alexa in its request
property. The intent name and slot data are duplicated in the top-level as intentName
and slots
properties respectively.
To set up this section, do the following:
- Select which Slots to add to the output.
- Select the necessary Additional properties.
Slots
When you select an intent in the dropdown, all slots defined in the respective intent are added to the Step UI automatically. Each slot is defined by its name, which must exactly match the respective Slot name in the intent for Alexa to recognize and populate.
To add a slot manually, click the Add a slot button, then, provide the Slot name in the respective field.
Each defined slot becomes available as a Merge field value later in the Flow. To remove a slot, click the Bucket icon.
Note: If Alexa matches the end user's word or phrase with a slot, it populates the respective slot, and the Step adds it to the output. The slots defined in this section only provide quick access via Merge field values further in the Flow.
Additional properties
By default, the Step includes only the request
property in its output. To include additional properties, select them in this section.
Note: the
additionalData
property is the custom data that could be added to the request in the Trigger Intent Flow (Alexa) Step.
Advanced settings
The lifespan of the Flow is set in the Flow session timeout field. It defaults to 20 minutes, its limits are between 30 seconds and 48 hours. Examples of acceptable time formats: 32h 3m 12s
or 230m
.
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
You can select which properties to include in the Output data section.
See below the structure of the Merge field object:
{
"version": "1.0",
"session": {
"new": true,
"sessionId": "",
"application": {
"applicationId": ""
},
"attributes": {},
"user": {
"userId": ""
}
},
"context": {
"Viewports": [{
"type": "APL",
"id": "main",
"shape": "RECTANGLE",
"dpi": 213,
"presentationType": "STANDARD",
"canRotate": false,
"configuration": {
"current": {
"mode": "HUB",
"video": {
"codecs": [
"H_264_42",
"H_264_41"
]
},
"size": {
"type": "DISCRETE",
"pixelWidth": 1280,
"pixelHeight": 800
}
}
}
}],
"Viewport": {
"experiences": [{
"arcMinuteWidth": 346,
"arcMinuteHeight": 216,
"canRotate": false,
"canResize": false
}],
"mode": "HUB",
"shape": "RECTANGLE",
"pixelWidth": 1280,
"pixelHeight": 800,
"dpi": 213,
"currentPixelWidth": 1280,
"currentPixelHeight": 800,
"touch": [
"SINGLE"
],
"video": {
"codecs": [
"H_264_42",
"H_264_41"
]
}
},
"Extensions": {
"available": {
"aplext:backstack:10": {}
}
},
"Advertising": {
"advertisingId": "00000000-0000-0000-0000-000000000000",
"limitAdTracking": true
},
"System": {
"application": {
"applicationId": ""
},
"user": {
"userId": ""
},
"device": {
"deviceId": "",
"supportedInterfaces": {}
},
"apiEndpoint": "https://api.amazonalexa.com",
"apiAccessToken": ""
}
},
"request": {
"type": "IntentRequest",
"requestId": "amzn1.echo-api.request.ID",
"locale": "en-US",
"timestamp": "2022-01-18T09:49:21Z",
"intent": {
"name": "testintent",
"confirmationStatus": "NONE",
"slots": {
"testslot": {
"name": "testslot",
"confirmationStatus": "NONE",
"id": null,
"utterance": null,
"value": null,
"resolutionCount": null
}
}
},
"dialogState": "STARTED"
},
"intentName": "testintent",
"slots": {
"testslot": {
"name": "testslot",
"confirmationStatus": "NONE",
"id": null,
"utterance": null,
"value": null,
"resolutionCount": null
}
}
}
{
"version": "1.0",
"session": {
"new": true,
"sessionId": "",
"application": {
"applicationId": ""
},
"attributes": {},
"user": {
"userId": ""
}
},
"context": {
"Viewports": [{
"type": "APL",
"id": "main",
"shape": "RECTANGLE",
"dpi": 213,
"presentationType": "STANDARD",
"canRotate": false,
"configuration": {
"current": {
"mode": "HUB",
"video": {
"codecs": [
"H_264_42",
"H_264_41"
]
},
"size": {
"type": "DISCRETE",
"pixelWidth": 1280,
"pixelHeight": 800
}
}
}
}],
"Viewport": {
"experiences": [{
"arcMinuteWidth": 346,
"arcMinuteHeight": 216,
"canRotate": false,
"canResize": false
}],
"mode": "HUB",
"shape": "RECTANGLE",
"pixelWidth": 1280,
"pixelHeight": 800,
"dpi": 213,
"currentPixelWidth": 1280,
"currentPixelHeight": 800,
"touch": [
"SINGLE"
],
"video": {
"codecs": [
"H_264_42",
"H_264_41"
]
}
},
"Extensions": {
"available": {
"aplext:backstack:10": {}
}
},
"Advertising": {
"advertisingId": "00000000-0000-0000-0000-000000000000",
"limitAdTracking": true
},
"System": {
"application": {
"applicationId": ""
},
"user": {
"userId": ""
},
"device": {
"deviceId": "",
"supportedInterfaces": {}
},
"apiEndpoint": "https://api.amazonalexa.com",
"apiAccessToken": ""
}
},
"request": {
"type": "IntentRequest",
"requestId": "amzn1.echo-api.request.ID",
"locale": "en-US",
"timestamp": "2022-01-18T09:49:21Z",
"intent": {
"name": "testintent",
"confirmationStatus": "NONE",
"slots": {
"testslot": {
"name": "testslot",
"confirmationStatus": "NONE",
"id": null,
"utterance": null,
"value": null,
"resolutionCount": null
}
}
},
"dialogState": "STARTED"
},
"intentName": "testintent",
"slots": {
"testslot": {
"name": "testslot",
"confirmationStatus": "NONE",
"id": null,
"utterance": null,
"value": null,
"resolutionCount": null
}
}
}
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