Conversational Actions will be deprecated on June 13, 2023. For more information, see Conversational Actions sunset.

Schema.org Query Pattern Types

Stay organized with collections Save and categorize content based on your preferences.

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_date on sms pro read my sms from april 1st on sms pro Yes
$SchemaOrg_Number blink the flashlight $SchemaOrg_Number:number times blink the flashlight five times No
$SchemaOrg_Time read my sms from $SchemaOrg_Time:my_time on sms pro read my sms from 5 pm on sms pro Yes
$SchemaOrg_DateTime read my sms from $SchemaOrg_DateTime:my_time on 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_color strobe light turn on the red strobe light No
$SchemaOrg_priceCurrency show conversion rate for $SchemaOrg_priceCurrency:cur on 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:num degrees $SchemaOrg_Temperature:temp set temperature to 70 degrees fahrenheit No
$SchemaOrg_Organization watch $SchemaOrg_Organization:organization highlights 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:musician songs 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_movie movie 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_cuisine restaurants show italian restaurants No
$SchemaOrg_MusicAlbum add $SchemaOrg_MusicAlbum:album to my queue. add abbey road to my queue No
$SchemaOrg_MusicRecording add $SchemaOrg_MusicRecording:song to 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
    }
}