Gracias por tu visita. Esta página solo está disponible en inglés.

Automotive Property for Alexa Skills

This guide introduces the Automotive property for Alexa skill developers. When a customer is interacting with Alexa from an automotive endpoint, the customer's request to Alexa includes the Automotive property. You can adapt your skill responses to manage the interactions with customers who are using Alexa from their cars.

How the Automotive property works

Your skill can be used on any device with Alexa. If the device interacting with your skill is an automotive endpoint, which means it's a device that we have identified as intended for use in the car, the customer request to your skill includes the Automotive property in the context object, as shown in the following example.

{
  "version": "1.0",
  "session": {
    ...
  },
  "context": {
    "Automotive": {}
    ...
  },
  "request": {
    ...
  }
}

See Request Types Reference.

Sample Node.js code for the Automotive indicator

This Node.js code parses the context object to determine if the Automotive property is present in order to determine if the device is an automotive endpoint.

var isAnAutomotiveEndpoint = handlerInput.requestEnvelope.context.Automotive;
if (isAnAutomotiveEndpoint) {
     console.log("Alexa customer is an automotive endpoint");
}

Tailor your skill's responses when the Automotive property is present

Your skill can parse the request and determine if the Automotive property is present. You can design your skill to have appropriate responses in that case, following Best Practices for Designing Alexa Skills for Automotive.