AI-generated Key Takeaways
- 
          The webpage lists Schema.org-defined query pattern types for Custom Device Actions, with each type name beginning with $SchemaOrg.
- 
          These types align with standard types defined in Schema.org and some return structured data instead of a single value. 
- 
          Structured data is indicated in the table and requires adding .structuredto the parameter name in thedeviceExecutionsection to be received.
- 
          Examples are provided for implementing and receiving structured data for types like Place, Date, Time, and DateTime. 
The following table lists the Schema.org-defined query pattern types for Custom
Device Actions. The name of each type starts with $SchemaOrg. These types
correspond to the standard types defined in Schema.org.
Some of these types return structured data rather than a single value. These types are indicated in the table. See structured data for more information.
Supported Schema.org types
| Type | Example Developer Pattern | Example User Query | Supports Structured Data | 
|---|---|---|---|
| $SchemaOrg_Date | read my sms from $SchemaOrg_Date:my_dateon sms pro | read my sms from april 1st on sms pro | Yes | 
| $SchemaOrg_Number | blink the flashlight $SchemaOrg_Number:numbertimes | blink the flashlight five times | No | 
| $SchemaOrg_Time | read my sms from $SchemaOrg_Time:my_timeon sms pro | read my sms from 5 pm on sms pro | Yes | 
| $SchemaOrg_DateTime | read my sms from $SchemaOrg_DateTime:my_timeon sms pro | read my sms from yesterday noon on sms pro | Yes | 
| $SchemaOrg_DayOfWeek | show me my meetings on $SchemaOrg_DayOfWeek:day_of_week | show me my meetings on Tuesday | No | 
| $SchemaOrg_Color | turn on the $SchemaOrg_Color:my_colorstrobe light | turn on the red strobe light | No | 
| $SchemaOrg_priceCurrency | show conversion rate for $SchemaOrg_priceCurrency:curon currency app | show conversion rate for yen on currency app | No | 
| $SchemaOrg_Distance | show conversion chart for $SchemaOrg_Distance:dist | show conversion chart for kilometer | No | 
| $SchemaOrg_Temperature | set temperature to $SchemaOrg_Number:numdegrees$SchemaOrg_Temperature:temp | set temperature to 70 degrees fahrenheit | No | 
| $SchemaOrg_Organization | watch $SchemaOrg_Organization:organizationhighlights | watch lakers highlights | No | 
| show me stock price for $SchemaOrg_Organization:organization | show me stock price for Google | No | |
| $SchemaOrg_Person | show top 10 $SchemaOrg_Person:musiciansongs | show top 10 bruno mars songs | No | 
| show me news about $SchemaOrg_Person:person | show me news about bill gates | No | |
| $SchemaOrg_Place | write review for $SchemaOrg_Place:place | write review for new york | Yes | 
| show traffic on $SchemaOrg_Place:location | show traffic on mountain view | Yes | |
| $SchemaOrg_Product | write review for $SchemaOrg_Product:product | write review for google glass | No | 
| $SchemaOrg_Book | read $SchemaOrg_Book:my_book | read great expectations | No | 
| $SchemaOrg_Movie | play the $SchemaOrg_Movie:my_moviemovie | review the casablanca movie | No | 
| $SchemaOrg_TVSeries | play next episode of $SchemaOrg_TVSeries:tv_series | play next episode of friends | No | 
| $SchemaOrg_servesCuisine | show $SchemaOrg_servesCuisine:my_cuisinerestaurants | show italian restaurants | No | 
| $SchemaOrg_MusicAlbum | add $SchemaOrg_MusicAlbum:albumto my queue. | add abbey road to my queue | No | 
| $SchemaOrg_MusicRecording | add $SchemaOrg_MusicRecording:songto my favorites. | add with or without you to my favorites. | No | 
| $SchemaOrg_YesNo | $SchemaOrg_YesNo:yesno | Yes | No | 
| $SchemaOrg_URL | Add $SchemaOrg_URL:url | Add google.com | No | 
| $SchemaOrg_Email | Add $SchemaOrg_Email:email | Add john@google.com | No | 
| $SchemaOrg_PhoneNumber | Add $SchemaOrg_PhoneNumber:phonenumber | Add (777) 777-7777 | No | 
| $SchemaOrg_Text | What's that song where they say $SchemaOrg_Text:text | What's that song where they say you are my sunshine? | No | 
Structured data
Some types support structured data being passed back instead of a single value.
In the deviceExecution section, add .structured to the parameter name
to receive structured data back for these types:
"my-param-name": "$parameter-name.structured"
where my-param-name is the user-defined name that is passed back in the
params and parameter-name identifies the parameter in the query pattern.
See the following example:
Place
Query
Write review for New York
Action package
...
"intent": {
    "name": "com.example.intents.Review",
    "parameters": [
        {
            "name": "place",
            "type": "SchemaOrg_Place"
        }
    ],
    "trigger": {
        "queryPatterns": [
            "write review for $SchemaOrg_Place:place"
        ]
    }
},
...
"deviceExecution": {
    "command": "com.example.commands.Review",
    "params": {
        "placeName": "$place.structured"
    }
}
...
Returned params
See LatLng for more information.
"placeName": {
    "latitude": 40.7128,
    "longitude": 74.0060
}
Date
See Date for more information.
Returned params:
{
    "year": 2018,
    "month": 12,
    "day": 2
}
Time
See TimeOfDay for more information.
Returned params:
{
    "hours": 12,
    "minutes": 0,
    "seconds": 0,
    "nanos": 0
}
DateTime
See DateTime for more information.
Returned params:
{
    "date": {
      "year": 2018,
      "month": 11,
      "day": 30
    },
    "time": {
      "hours": 12,
      "minutes": 0,
      "seconds": 0,
      "nanos": 0
    }
}
