InteractionModel

    After implementing support for the InteractionModel interface, an end user can designate that the device can respond to a Routine by selecting it as the device that "Alexa will respond from" using the Amazon Alexa app. This also allows a user to trigger a Routine from one device and target a different device to respond.

    Make sure to familiarize yourself with the AVS interaction model voice request lifecycle.

    Version Changes

    • Support for the device's awareness of Thinking mode
    • Enables directive streaming on the event stream

      All directives sent in response to speech requests will be streamed back to the device on the HTTP/2 event channel. Streaming means that directives will be dispatched by Alexa to the device as soon as the directive is constructed. Prior to this change, if multiple directives were generated in response to a speech request, Alexa would wait until all directives were fully constructed before dispatching them to the device. This modification in Alexa's behavior helps devices reduce the user perceived latency (UPL) and offer a better experience to end users.

    Capability Assertion

    InteractionModel 1.2 may be implemented by the device on its own behalf, but not on behalf of any connected endpoints.

    New AVS integrations must assert support through Alexa.Discovery, but Alexa will continue to support existing integrations using the Capabilities API.

    Sample Object

    {
        "type": "AlexaInterface",
        "interface": "InteractionModel",
        "version": "1.2"
    }
    

    NewDialogRequest Directive

    When an interaction is initiated by Alexa, a NewDialogRequest directive with a unique dialogRequestId is sent to a client. The dialogRequestId in the payload of a NewDialogRequest directive must be set to active and executed immediately. Directives with a dialogRequestId in the header that match the dialogRequestId from NewDialogRequest directives must be processed in sequence. For more information about interactions, see the Alexa Voice Service Interaction Model.

    Sample Message

    {
      "directive": {
        "header": {
          "namespace": "InteractionModel",
          "name": "NewDialogRequest",
          "messageId": "{{STRING}}"
        },
        "payload": {
          "dialogRequestId": "{{STRING}}"
        }
      }
    }
    

    Payload Parameters

    Parameter Description Type
    dialogRequestId A dialogRequestId provided by Alexa that replaces the current dialogRequestId set on your client. Subsequent directives from Alexa will use this dialogRequestId and conform the rules defined in the Alexa Voice Service Interaction Model. string

    RequestProcessingStarted Directive

    AVS will send the RequestProcessingStarted directive to the device to indicate that it received the voice request and has begun to process it. This also applies to cloud-initiated activities and non-voice user interactions. This puts the Alexa Attention State into Thinking mode.

    The dialogRequestId in the header defines how the event must be processed according to the rules defined in the Voice Request Lifecycle.

    Sample Message

    {
      "directive": {
        "header": {
          "namespace": "InteractionModel",
          "name": "RequestProcessingStarted",
          "messageId": "{{STRING}}",
          "dialogRequestId": "{{STRING}}"
        }
        "payload": {
        }
      }
    }
    

    Note: The payload is an empty object.

    RequestProcessingCompleted Directive

    AVS will send the RequestProcessingCompleted directive to the device to indicate that all directives resulting from the request have been sent. This includes directives resulting from voice requests, cloud-initiated activities, and non-voice user interactions.

    The dialogRequestId in the header defines how the event must be processed according to the rules defined in the Voice Request Lifecycle.

    Sample Message

    {
      "directive": {
        "header": {
          "namespace": "InteractionModel",
          "name": "RequestProcessingStarted",
          "messageId": "{{STRING}}",
          "dialogRequestId": "{{STRING}}"
        }
        "payload": {
        }
      }
    }
    

    Note: The payload is an empty object.

      After implementing support for the InteractionModel interface, an end user can designate that the device can respond to a Routine by selecting it as the device that "Alexa will respond from" using the Amazon Alexa app. This also allows a user to trigger a Routine from one device and target a different device to respond.

      Make sure to familiarize yourself with the AVS interaction model voice request lifecycle.

      Capability Assertion

      InteractionModel 1.0 may be implemented by the device on its own behalf, but not on behalf of any connected endpoints.

      New AVS integrations must assert support through Alexa.Discovery, but Alexa will continue to support existing integrations using the Capabilities API.

      Sample Object

      {
          "type": "AlexaInterface",
          "interface": "InteractionModel",
          "version": "1.0"
      }
      

      NewDialogRequest Directive

      When an interaction is initiated by Alexa, a NewDialogRequest directive with a unique dialogRequestId is sent to a client. The dialogRequestId in the payload of a NewDialogRequest directive must be set to active and executed immediately. Directives with a dialogRequestId in the header that match the dialogRequestId from NewDialogRequest directives must be processed in sequence. For more information about interactions, see the Alexa Voice Service Interaction Model.

      Sample Message

      {
        "directive": {
          "header": {
            "namespace": "InteractionModel",
            "name": "NewDialogRequest",
            "messageId": "{{STRING}}"
          },
          "payload": {
            "dialogRequestId": "{{STRING}}"
          }
        }
      }
      

      Payload Parameters

      Parameter Description Type
      dialogRequestId A dialogRequestId provided by Alexa that replaces the current dialogRequestId set on your client. Subsequent directives from Alexa will use this dialogRequestId and conform the rules defined in the Alexa Voice Service Interaction Model. string