Action ID
:   `actions.intent.GET_THING`

Description
:   Search for content or entities using the default in-app search feature in an app. Populate the
    search criteria with the content or entity name using the `thing.name` intent
    parameter, and present the most relevant search results to the user.

## Example queries

#### en-US

- Find waterfall hikes on ExampleApp
- Look up summer dresses in ExampleApp

#### pt-BR

- Procura campanhas na ExampleApp.
- Acha Dark na ExampleApp pra mim.
- Acha pra mim David Gilmour na ExampleApp.

## Recommended fields

The following fields represent essential information that users often
provide in queries that trigger this built-in intent:
[`thing.name`](https://schema.googleapis.com/name)   

## Other supported fields

The following fields represent information that users often provide to
disambiguate their needs or otherwise improve their results:
[`thing.@type`](https://schema.googleapis.com/Thing)   

## Supported text values by field

`thing.@type`

- Thing

## Inventory availability by field

`thing.name`

- Web inventory

## Sample XML files

For information about the `shortcuts.xml` schema, see [Create shortcuts.xml](https://developer.android.com/guide/app-actions/action-schema).


| **Deprecation notice:** Google is ending support for App Actions implemented using the
| `actions.xml` resource file. Please use the
| [Actions.xml migration guide](https://developer.android.com/guide/app-actions/legacy/migration-guide) to update your
| actions to use the fully supported Android Shortcuts framework. For details on
| the Shortcuts framework, see [App Actions overview](https://developer.android.com/guide/app-actions/overview).

<br />

### Handle BII parameters

### shortcuts.xml


```world-of-warcraft-toc
<?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.GET_THING">
    <intent
      android:action="android.intent.action.VIEW"
      android:targetPackage="YOUR_UNIQUE_APPLICATION_ID"
      android:targetClass="YOUR_TARGET_CLASS">
      <!-- Eg. name = "Running shoes" -->
      <parameter
        android:name="thing.name"
        android:key="name"/>
    </intent>
  </capability>
</shortcuts>
      
```

<br />

### actions.xml


```world-of-warcraft-toc
<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample actions.xml -->
<actions>
  <action intentName="actions.intent.GET_THING">
    <fulfillment urlTemplate="myapp://custom-deeplink{?name}">
      <!-- e.g. name = "Running shoes" -->
      <!-- (Optional) Require a field eg.name for fulfillment with required="true" -->
      <parameter-mapping urlParameter="name" intentParameter="thing.name" required="true" />
    </fulfillment>

    <!-- Provide a fallback fulfillment with no required parameters. For example, to your app search or router deeplink -->
    <fulfillment urlTemplate="myapp://deeplink" />
  </action>
</actions>
```

<br />

### Use web inventory

`thing.name` is a field
that supports [web inventory](https://developer.android.com/guide/app-actions/action-schema#web-inventory).
In the following example, Google Assistant performs a web search for the user
query and determines the fulfillment URL. Assistant filters for search results
that match the provided `urlFilter` value of
`https://www.mywebsite.com/link1/.*`.

### shortcuts.xml


```world-of-warcraft-toc
<?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.GET_THING">
    <intent
      android:action="android.intent.action.VIEW"
      android:targetPackage="YOUR_UNIQUE_APPLICATION_ID"
      android:targetClass="YOUR_TARGET_CLASS">
      <parameter android:name="thing.name">
        <data android:pathPattern="https://www.mywebsite.com/link1/.*"/>
      </parameter>
    </intent>
  </capability>
</shortcuts>
      
```

<br />

### actions.xml


```transact-sql
<?xml version="1.0" encoding="utf-8"?>
<!-- This is a sample actions.xml -->
<actions>
  <action intentName="actions.intent.GET_THING">
    <!-- Use URL from entity match for deep link fulfillment -->
    <!-- Example: url = 'https://www.mywebsite.com/link1/item1' -->
    <fulfillment urlTemplate="{@url}" />

    <!-- Provide a fallback fulfillment with no required parameters. For example, to your app search or router deeplink -->
    <fulfillment urlTemplate="myapp://deeplink" />

    <!-- Define parameters with web inventories using urlFilter -->
    <parameter name="thing.name">
      <entity-set-reference urlFilter="https://www.mywebsite.com/link1/.*" />"/>
    </parameter>
  </action>
</actions>
```

<br />

## JSON-LD sample

The following JSON-LD sample provides some example values that you can
use in the App Actions test tool:

```carbon
{
  "@context": "http://schema.googleapis.com",
  "@type": "Thing",
  "name": "Running shoes"
}
```