[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-04 UTC."],[],[],null,["# Create thing\n\nAction ID\n: `actions.intent.CREATE_THING`\n\nDescription\n: Construct a new entity in an app. Populate the entity's name and type using the\n `thing.name` and `thing.description` intent parameters.\n\nExample queries\n---------------\n\n#### en-US\n\n- Save to ExampleProvider.\n- Save ExampleRestaurant to ExampleProvider.\n- Add Stairway to Heaven to ExampleProvider.\n- Save Pixel 4 to best products folder in ExampleProvider.\n\nRecommended fields\n------------------\n\nThe following fields represent essential information that users often\nprovide in queries that trigger this built-in intent:\n[`thing.name`](https://schema.googleapis.com/name) \n\nOther supported fields\n----------------------\n\nThe following fields represent information that users often provide to\ndisambiguate their needs or otherwise improve their results:\n[`thing.@type`](https://schema.googleapis.com/Thing) \n[`thing.description`](https://schema.googleapis.com/description) \n\nSupported text values by field\n------------------------------\n\n`thing.@type`\n\n- Thing\n\nInventory availability by field\n-------------------------------\n\n`thing.name`\n\n- Inline inventory\n\nSample XML files\n----------------\n\nFor information about the `shortcuts.xml` schema, see [Create shortcuts.xml](/guide/app-actions/action-schema).\n\n\n| **Deprecation notice:** Google is ending support for App Actions implemented using the\n| `actions.xml` resource file. Please use the\n| [Actions.xml migration guide](/guide/app-actions/legacy/migration-guide) to update your\n| actions to use the fully supported Android Shortcuts framework. For details on\n| the Shortcuts framework, see [App Actions overview](/guide/app-actions/overview).\n\n\u003cbr /\u003e\n\n### Handle BII parameters\n\n### shortcuts.xml\n\n\n```world-of-warcraft-toc\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003c!-- This is a sample shortcuts.xml --\u003e\n\u003cshortcuts xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n \u003ccapability android:name=\"actions.intent.CREATE_THING\"\u003e\n \u003cintent\n android:action=\"android.intent.action.VIEW\"\n android:targetPackage=\"YOUR_UNIQUE_APPLICATION_ID\"\n android:targetClass=\"YOUR_TARGET_CLASS\"\u003e\n \u003c!-- Eg. name = \"Example Entity\" --\u003e\n \u003cparameter\n android:name=\"thing.name\"\n android:key=\"name\"/\u003e\n \u003c!-- Eg. description = \"Example Destination\" --\u003e\n \u003cparameter\n android:name=\"thing.description\"\n android:key=\"description\"/\u003e\n \u003c/intent\u003e\n \u003c/capability\u003e\n\u003c/shortcuts\u003e\n \n```\n\n\u003cbr /\u003e\n\n### actions.xml\n\n\n```world-of-warcraft-toc\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003c!-- This is a sample actions.xml --\u003e\n\u003cactions\u003e\n \u003caction intentName=\"actions.intent.CREATE_THING\"\u003e\n \u003cfulfillment urlTemplate=\"myapp://custom-deeplink{?name,description}\"\u003e\n \u003c!-- e.g. name = \"Example Entity\" --\u003e\n \u003c!-- (Optional) Require a field eg.name for fulfillment with required=\"true\" --\u003e\n \u003cparameter-mapping urlParameter=\"name\" intentParameter=\"thing.name\" required=\"true\" /\u003e\n \u003c!-- e.g. description = \"Example Destination\" --\u003e\n \u003cparameter-mapping urlParameter=\"description\" intentParameter=\"thing.description\" /\u003e\n \u003c/fulfillment\u003e\n\n \u003c!-- Provide a fallback fulfillment with no required parameters. For example, to your app search or router deeplink --\u003e\n \u003cfulfillment urlTemplate=\"myapp://deeplink\" /\u003e\n \u003c/action\u003e\n\u003c/actions\u003e\n```\n\n\u003cbr /\u003e\n\n### Use inline inventory\n\n### shortcuts.xml\n\n\n`thing.name` is an\nintent parameter that supports [inline inventory](/guide/app-actions/action-schema#inline-inventory).\nBy defining a `\u003cshortcut\u003e` for `thing.name`,\nyou can uniquely identify entities that are of interest to your app or restrict\nfulfillment to the set of supported entities.\n\nIn the following example, when the user query matches the\n`name_one`\nshortcut, Assistant provides the associated shorcut identifier, `ID_ONE`, as\nthe URL parameter `name`\nto fulfillment.\n\nIf there is no inventory match, the text value received in the query for\n`thing.name` is passed\nas-is. \n\n```transact-sql\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003c!-- This is a sample shortcuts.xml --\u003e\n\u003cshortcuts xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n \u003ccapability android:name=\"actions.intent.CREATE_THING\"\u003e\n \u003cintent\n android:targetPackage=\"YOUR_UNIQUE_APPLICATION_ID\"\n android:targetClass=\"YOUR_TARGET_CLASS\"\u003e\n \u003cparameter\n android:name=\"thing.name\"\n android:key=\"name\"/\u003e\n \u003cparameter\n android:name=\"thing.description\"\n android:key=\"description\"/\u003e\n \u003c/intent\u003e\n \u003c/capability\u003e\n \u003c!-- Short and long labels must be @string resource. --\u003e\n \u003cshortcut\n android:shortcutId=\"ID_ONE\"\n android:shortcutShortLabel=\"@string/shortcut_short_label\"\n android:shortcutLongLabel=\"@string/shortcut_long_label\"\u003e\n \u003ccapability-binding android:key=\"actions.intent.CREATE_THING\"\u003e\n \u003cparameter-binding\n android:value=\"name\"\n android:key=\"thing.name\"/\u003e\n \u003c/capability-binding\u003e\n \u003c/shortcut\u003e\n\u003c/shortcuts\u003e\n \n```\n\n\u003cbr /\u003e\n\n### actions.xml\n\n\n`thing.name` is an\nintent parameter that supports [inline inventory](/guide/app-actions/action-schema#inline-inventory).\nBy defining an `\u003centity-set\u003e` for `thing.name`,\nyou can uniquely identify entities that are of interest to your app or restrict\nfulfillment to the set of supported entities.\n\nIn the following example, when the user query matches the\n`name_one`\nentity, Assistant provides the associated identifier, `ID_ONE`, as\nthe URL parameter `name`\nto fulfillment.\n\nIf there is no inventory match, the text value received in the query for\n`thing.name` is passed\nas-is. \n\n```transact-sql\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003c!-- This is a sample actions.xml --\u003e\n\u003cactions\u003e\n \u003caction intentName=\"actions.intent.CREATE_THING\"\u003e\n \u003cfulfillment urlTemplate=\"myapp://deeplink{?name}\" \u003e\n \u003c!-- name = \"ID_ONE\" or \"ID_TWO\" --\u003e\n \u003c!-- If no inventory match, name is a text value, such as \"Example Entity\" --\u003e\n \u003c!-- (Optional) Use entityMatchRequired=\"true\" to require inventory match for fulfillment --\u003e\n \u003cparameter-mapping urlParameter=\"name\" intentParameter=\"thing.name\" /\u003e\n \u003c/fulfillment\u003e\n\n \u003c!-- Define parameters with inventories here --\u003e\n \u003cparameter name=\"thing.name\"\u003e\n \u003centity-set-reference entitySetId=\"nameEntitySet\"/\u003e\n \u003c/parameter\u003e\n \u003c/action\u003e\n\n \u003centity-set entitySetId=\"nameEntitySet\"\u003e\n \u003c!-- Provide an identifier per entity --\u003e\n \u003centity identifier=\"ID_ONE\" name=\"name_one\" alternateName=\"@array/name_one_synonyms\"/\u003e\n \u003centity identifier=\"ID_TWO\" name=\"name_two\" alternateName=\"@array/name_two_synonyms\"/\u003e\n \u003c/entity-set\u003e\n\u003c/actions\u003e\n```\n\n\u003cbr /\u003e\n\nThe `url` attribute associated with the entity can be used to\ndetermine the fulfillment URL if there is an inventory match. In the following\nexample, when the user query matches the\n`name_one`\nentity, Assistant provides `myapp://deeplink/one` as the fulfillment\nURL. \n\n```transact-sql\n \u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n \u003c!-- This is a sample actions.xml --\u003e\n \u003cactions\u003e\n \u003caction intentName=\"actions.intent.CREATE_THING\"\u003e\n \u003c!-- Use url from inventory match for deep link fulfillment --\u003e\n \u003cfulfillment urlTemplate=\"{@url}\" /\u003e\n\n \u003c!-- Provide a fallback fulfillment with no required parameters. For example, to your app search or router deeplink --\u003e\n \u003cfulfillment urlTemplate=\"myapp://deeplink\" /\u003e\n\n \u003c!-- Define parameters with inventories here --\u003e\n \u003cparameter name=\"thing.name\"\u003e\n \u003centity-set-reference entitySetId=\"nameEntitySet\"/\u003e\n \u003c/parameter\u003e\n \u003c/action\u003e\n\n \u003centity-set entitySetId=\"nameEntitySet\"\u003e\n \u003c!-- Provide a URL per entity --\u003e\n \u003centity url=\"myapp://deeplink/one\" name=\"name_one\" alternateName=\"@array/name_one_synonyms\"/\u003e\n \u003centity url=\"myapp://deeplink/two\" name=\"name_two\" alternateName=\"@array/name_two_synonyms\"/\u003e\n \u003c/entity-set\u003e\n \u003c/actions\u003e\n \n```\n\n\u003cbr /\u003e\n\nJSON-LD sample\n--------------\n\nThe following JSON-LD sample provides some example values that you can\nuse in the App Actions test tool: \n\n```carbon\n{\n \"@context\": \"http://schema.org\",\n \"@type\": \"Thing\",\n \"description\": \"Example Destination\",\n \"name\": \"Example Entity\"\n}\n```"]]