Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Go to https://developer.amazon.com/settings/console/home? and login.

  2. Select Alexa > Alexa Skills Kit.

  3. Select your skill from the Alexa skills list.

  4. Go to the Build > Custom > Interfaces page, and enable the CanFulfillIntentRequest interface

Can Fullfill Intent Node

You can make use the services of CanFulfillIntentRequest in Orbita projects by placing the Can Fullfill Intent Node and connecting it to the Response node as shown below.

...

You should publish the skill to Alexa after adding and deploying Can Fullfill Intent Node in Experience Designer.

The Can Fullfill Intent Node listens to the CanFulfillIntentRequests made by Alexa. The Can Fullfill Intent Node will then search for the intents within the project/skill. If the requested intent is found in the project/skill, then the corresponding response will be sent to Alexa.

In Orbita, you can only have one Can Fullfill Intent Node in a project.

Sample Canfullfill request

Code Block
{
    "session":{
      "new": true,
      "sessionId":"SessionId.4505e78b-3770-4a4e-9289-94af3028eaaa",
      "application":{
        "applicationId":"amzn1.ask.skill.218afcd2-fbc8-4c6b-b54e-8ec1edea4d6d"
      },
      "attributes":{
        "key": "string value"
      },
      "user":{
        "userId":"amzn1.ask.account.AH6N37WDVVL2VLUJDOSPVKNVZ5EF7TUYIVDNLKTDKPFGDAKD6MQ7HSVXNMTAXNAER45N3Y7KTIC3XLGM2W3G7JN3XXQ3D67TGMLOELSFHBN6N7OFTWYF5ENNH4JFSJOD52AFNNJ7W3BTA43K46C2WJHOSG274QEEJBUHEH6B6E3AJ5GJ3TWGVLRZU7GIB7F7RRS2ENV6CU5TGKY"
      }
    },
    "request":{
      "type":"CanFulfillIntentRequest",
      "requestId":"EdwRequestId.b1a08947-236d-4774-9e6e-88fe05b30d81",
      "intent":{
        "name":"MyNameIsIntent",
        "slots":{
          "name":{
            "name":"name",
            "value":"Jeff"
          }
        }
      },
      "locale":"en-US",
      "timestamp":"2020-07-14T22:02:29Z"
    },
    "context":{
      "AudioPlayer":{
        "playerActivity":"IDLE"
      },
      "System":{
        "application":{
            "applicationId":"amzn1.ask.skill.218afcd2-fbc8-4c6b-b54e-8ec1edea4d6d"
        },
        "user":{
            "userId":"amzn1.ask.account.AH6N37WDVVL2VLUJDOSPVKNVZ5EF7TUYIVDNLKTDKPFGDAKD6MQ7HSVXNMTAXNAER45N3Y7KTIC3XLGM2W3G7JN3XXQ3D67TGMLOELSFHBN6N7OFTWYF5ENNH4JFSJOD52AFNNJ7W3BTA43K46C2WJHOSG274QEEJBUHEH6B6E3AJ5GJ3TWGVLRZU7GIB7F7RRS2ENV6CU5TGKY"
        },
        "device":{
          "supportedInterfaces":{
          }
        }
      }
    },
    "version":"1.0"
  }

Sample output json if Alexa can fulfill the request.

Code Block
{
    "status": "SUCCESSFUL",
    "result": {
        "skillExecutionInfo": {
            "invocationRequest": {
                "endpoint": "https://c6b3338c46f9.ngrok.io/oeapi/9071c3b5.a5252/alexa",
                "body": {
                    "session": {
                        "new": true,
                        "sessionId": "SessionId.4505e78b-3770-4a4e-9289-94af3028eaaa",
                        "application": {
                            "applicationId": "amzn1.ask.skill.218afcd2-fbc8-4c6b-b54e-8ec1edea4d6d"
                        },
                        "attributes": {
                            "key": "string value"
                        },
                        "user": {
                            "userId": "amzn1.ask.account.AH6N37WDVVL2VLUJDOSPVKNVZ5EF7TUYIVDNLKTDKPFGDAKD6MQ7HSVXNMTAXNAER45N3Y7KTIC3XLGM2W3G7JN3XXQ3D67TGMLOELSFHBN6N7OFTWYF5ENNH4JFSJOD52AFNNJ7W3BTA43K46C2WJHOSG274QEEJBUHEH6B6E3AJ5GJ3TWGVLRZU7GIB7F7RRS2ENV6CU5TGKY"
                        }
                    },
                    "request": {
                        "type": "CanFulfillIntentRequest",
                        "requestId": "EdwRequestId.b1a08947-236d-4774-9e6e-88fe05b30d81",
                        "intent": {
                            "name": "OrbitaFlowMessages",
                            "slots": {
                                "name": {
                                    "name": "name",
                                    "value": "Jeff"
                                }
                            }
                        },
                        "locale": "en-US",
                        "timestamp": "2020-07-14T22:02:29Z"
                    },
                    "context": {
                        "AudioPlayer": {
                            "playerActivity": "IDLE"
                        },
                        "System": {
                            "application": {
                                "applicationId": "amzn1.ask.skill.218afcd2-fbc8-4c6b-b54e-8ec1edea4d6d"
                            },
                            "user": {
                                "userId": "amzn1.ask.account.AH6N37WDVVL2VLUJDOSPVKNVZ5EF7TUYIVDNLKTDKPFGDAKD6MQ7HSVXNMTAXNAER45N3Y7KTIC3XLGM2W3G7JN3XXQ3D67TGMLOELSFHBN6N7OFTWYF5ENNH4JFSJOD52AFNNJ7W3BTA43K46C2WJHOSG274QEEJBUHEH6B6E3AJ5GJ3TWGVLRZU7GIB7F7RRS2ENV6CU5TGKY"
                            },
                            "device": {
                                "supportedInterfaces": {}
                            }
                        }
                    },
                    "version": "1.0"
                }
            },
            "invocationResponse": {
                "body": {
                    "version": "1.0",
                    "response": {
                        "canFulfillIntent": {
                            "canFulfill": "YES"
                        }
                    },
                    "sessionAttributes": {
                        "orbitaSessionId": "5f158976-c76e-48b5-952f-143cbdd5971c"
                    }
                }
            },
            "metrics": {
                "skillExecutionTimeInMilliseconds": 596
            }
        },
        "error": null
    }
}

Sample output json if Alexa cannot fulfill the request.

Code Block
{
    "status": "SUCCESSFUL",
    "result": {
        "skillExecutionInfo": {
            "invocationRequest": {
                "endpoint": "https://c6b3338c46f9.ngrok.io/oeapi/9071c3b5.a5252/alexa",
                "body": {
                    "session": {
                        "new": true,
                        "sessionId": "SessionId.4505e78b-3770-4a4e-9289-94af3028eaaa",
                        "application": {
                            "applicationId": "amzn1.ask.skill.218afcd2-fbc8-4c6b-b54e-8ec1edea4d6d"
                        },
                        "attributes": {
                            "key": "string value"
                        },
                        "user": {
                            "userId": "amzn1.ask.account.AH6N37WDVVL2VLUJDOSPVKNVZ5EF7TUYIVDNLKTDKPFGDAKD6MQ7HSVXNMTAXNAER45N3Y7KTIC3XLGM2W3G7JN3XXQ3D67TGMLOELSFHBN6N7OFTWYF5ENNH4JFSJOD52AFNNJ7W3BTA43K46C2WJHOSG274QEEJBUHEH6B6E3AJ5GJ3TWGVLRZU7GIB7F7RRS2ENV6CU5TGKY"
                        }
                    },
                    "request": {
                        "type": "CanFulfillIntentRequest",
                        "requestId": "EdwRequestId.b1a08947-236d-4774-9e6e-88fe05b30d81",
                        "intent": {
                            "name": "MyNameIsIntent",
                            "slots": {
                                "name": {
                                    "name": "name",
                                    "value": "Jeff"
                                }
                            }
                        },
                        "locale": "en-US",
                        "timestamp": "2020-07-14T22:02:29Z"
                    },
                    "context": {
                        "AudioPlayer": {
                            "playerActivity": "IDLE"
                        },
                        "System": {
                            "application": {
                                "applicationId": "amzn1.ask.skill.218afcd2-fbc8-4c6b-b54e-8ec1edea4d6d"
                            },
                            "user": {
                                "userId": "amzn1.ask.account.AH6N37WDVVL2VLUJDOSPVKNVZ5EF7TUYIVDNLKTDKPFGDAKD6MQ7HSVXNMTAXNAER45N3Y7KTIC3XLGM2W3G7JN3XXQ3D67TGMLOELSFHBN6N7OFTWYF5ENNH4JFSJOD52AFNNJ7W3BTA43K46C2WJHOSG274QEEJBUHEH6B6E3AJ5GJ3TWGVLRZU7GIB7F7RRS2ENV6CU5TGKY"
                            },
                            "device": {
                                "supportedInterfaces": {}
                            }
                        }
                    },
                    "version": "1.0"
                }
            },
            "invocationResponse": {
                "body": {
                    "version": "1.0",
                    "response": {
                        "canFulfillIntent": {
                            "canFulfill": "NO"
                        }
                    },
                    "sessionAttributes": {
                        "orbitaSessionId": "1248e61b-76a3-46fd-8fae-c215aff21169"
                    }
                }
            },
            "metrics": {
                "skillExecutionTimeInMilliseconds": 615
            }
        },
        "error": null
    }
}

Reference:

https://developer.amazon.com/en-US/docs/alexa/custom-skills/implement-canfulfillintentrequest-for-name-free-interaction.html

...