- Action ID
actions.intent.UPDATE_ITEM_LIST
- Description
-
Add an item to an existing list. Determine which list to modify by filtering the user's lists using the
itemList.name
parameter. If a single list cannot be identified from the parameters, ask the user to determine which list to edit before proceeding.Once a single list is identified, add an item with the value of the
itemList.itemListElement.name
parameter.We also recommend integrating our partner solution enabling notes and list access through a native Assistant experience that works across a variety of Assistant-enabled devices.
Locale support
Functionality | Locales |
---|---|
Preview creation using App Actions test tool | en-US |
User invocation from Google Assistant | en-US |
Example queries
Recommended fields
The following fields represent essential information that users often provide in queries that trigger this built-in intent:
itemList.itemListElement.name
itemList.name
Other supported fields
The following fields represent information that users often provide to disambiguate their needs or otherwise improve their results:
itemList.@type
itemList.itemListElement.@type
Supported text values by field
Sample XML files
For information about the shortcuts.xml
schema, see Create shortcuts.xml.
Handle BII parameters
shortcuts.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample shortcuts.xml -->
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<capability android:name="actions.intent.UPDATE_ITEM_LIST">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="YOUR_UNIQUE_APPLICATION_ID"
android:targetClass="YOUR_TARGET_CLASS">
<!-- Eg. itemListName = "Grocery List" -->
<parameter
android:name="itemList.name"
android:key="itemListName"/>
<!-- Eg. itemListElementName = "Milk" -->
<parameter
android:name="itemList.itemListElement.name"
android:key="itemListElementName"/>
</intent>
</capability>
</shortcuts>
actions.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample actions.xml -->
<actions>
<action intentName="actions.intent.UPDATE_ITEM_LIST">
<fulfillment urlTemplate="myapp://custom-deeplink{?itemListName,itemListElementName}">
<!-- e.g. itemListName = "Grocery List" -->
<!-- (Optional) Require a field eg.itemListName for fulfillment with required="true" -->
<parameter-mapping urlParameter="itemListName" intentParameter="itemList.name" required="true" />
<!-- e.g. itemListElementName = "Milk" -->
<parameter-mapping urlParameter="itemListElementName" intentParameter="itemList.itemListElement.name" />
</fulfillment>
<!-- Provide a fallback fulfillment with no required parameters. For example, to your app search or router deeplink -->
<fulfillment urlTemplate="myapp://deeplink" />
</action>
</actions>
JSON-LD sample
The following JSON-LD sample provides some example values that you can use in the App Actions test tool:
{ "@context": "http://schema.org", "@type": "ItemList", "itemListElement": { "@type": "ListItem", "name": "Milk" }, "name": "Grocery List" }