# Implicit invocation (Dialogflow)

Implicit invocation is an interaction flow that occurs when a user makes a
request to perform some task without invoking an Action by name. The
Google Assistant attempts to match the user's request to a suitable fulfillment,
such as an Action, search result, or mobile app, then presents recommendations
to the user.

If you have deployed an Action that can help the user with their task,
implicit invocation provides a way for users to discover your Action
via the Assistant.

> [!NOTE]
> **Note:** If your Action is a game, you must register for the `actions.intent.PLAY_GAME` built-in intent in order to be eligible for implicit invocation. To learn how to implement the "Play game" intent, see the [built-in intents guide](https://developers.google.com/assistant/df-asdk/discovery/built-in-intents).

## How it works

To find matching Actions, Google uses signals such as users telling
the Assistant to do something that's similar to an invocation phrase
for one of your configured intents, or when the user is in a context where your
Action would be appropriate.

This interaction occurs as follows:

1. A user asks the Assistant to perform a task.
2. The recommendation algorithm determines that your Action can complete the user's task.
3. The Assistant recommends your Action to the user.

When the user selects your Action following implicit invocation,
the Assistant notifies your Action of the specific task that the
user requested.

The following example shows how a user can trigger an implicit invocation by
requesting a chicken soup recipe, without specifying an Action's invocation
name.

|---|---|
| **User** | Ok Google, I need a chicken soup recipe. |
|   | **\<The Assistant queries the Actions on Google platform to find suitable Actions for the user's request\>** |
| **Assistant** | Sure. For that, you might like Personal Chef. Wanna give it a try? |

If your Action's invocation phrases can't be mapped to a variety of related
user queries, it won't be recognized as relevant. For more details, see
[Best practices for writing useful invocation phrases](https://developers.google.com/assistant/df-asdk/discovery/implicit#best_practices_for_writing_useful_invocation_phrases).

Due to the evolving nature of the recommendation algorithm, Google cannot
guarantee that your Action will be recommended via implicit invocation.

> [!NOTE]
> **Note:** Implicit invocation behaves differently than a deep link. To use a deep link, users need to specify the Action explicitly by its name, along with a qualifying phrase that represents a task for your Action to handle (for example, "*Ok Google, talk to Personal Chef to look up chicken soup recipes.*").

## Add invocation phrases

This section describes how you add invocation phrases for implicit invocation
if you are using Dialogflow or Actions SDK to build your Action.

### Dialogflow

If you are using entities in your training phrases, be sure to familiarize
yourself with [requirements for phrases with entities](https://developers.google.com/assistant/df-asdk/discovery/implicit#syntax_Requirements).

In Dialogflow, your Actions and their invocation phrases are defined as
training phrases in intents that you specify for implicit invocation. You can
add support for deep links and implicit invocations to your Action using a
single-step process in the [Dialogflow console](https://console.dialogflow.com), as described in the
[Dialogflow integration guide](https://dialogflow.com/docs/integrations/actions/build#specify_actions).

> [!NOTE]
> **Note:** The maximum number of implicit invocation intents should not exceed 10. The maximum number of training phrases in each invocation intent should not exceed 10.

### Actions SDK

In the Actions SDK, your Actions and their invocation phrases are defined as
query patterns. See [Define Actions](https://developers.google.com/assistant/df-asdk/actions-sdk/define-actions) for more
information.

## Analyze and view implicit invocations

This section describes how to use the [Actions console](https://console.actions.google.com/) to analyze and view
information about implicit invocations that matched to your Action.

### Discovery analytics

The **Analytics \> Discovery** section of the [Actions console](https://console.actions.google.com) provides useful
information about what phrases prompted the Assistant to recommend your
Action and which of your intents was matched to the prompt.

You can find more information on our documentation about [console analytics and
health](https://developers.google.com/assistant/console/analytics#discovery).

### View invocation phrases

In the [Actions console](https://console.actions.google.com), you can view your Action and its invocation
phrases under **Build \> Actions**.

> [!NOTE]
> **Note:** If you're using Dialogflow and any of your Actions are not listed on this page, those missing Actions are most likely not set as additional triggering intents. Click the **Add Actions from Dialogflow** button for instructions that explain how to set your intents correctly in Dialogflow.

![](https://developers.google.com/static/assistant/df-asdk/discovery/images/discovery-console-1.png)

You can click on any of the Actions listed to view their invocation phrases.
If you're using Dialogflow, you have the option to **Add more phrases**,
which links you directly to your Action's intents in Dialogflow.

![](https://developers.google.com/static/assistant/df-asdk/discovery/images/discovery-console-2.png)

## Requirements for phrases with entities

If you are using Dialogflow, the following rules apply to [entities](https://dialogflow.com/docs/entities).
These syntax rules also apply to languages (for example, Korean and Thai) that
in practice do not use space separation between words.

- If you place an entity in a phrase, it must have a space before and after.
- You do not need to add space before the entity if it is placed at the *beginning* of a phrase.
- You do not need to add space after the entity if it is placed at the *end* of a phrase.

If an entity is not space-separated from text, Actions on Google will read the
entire phrase as a string with no value substitution for the entity.

You should test phrases that contain entities and text in the Actions simulator
to ensure that the intended meaning is retained.

To learn more, see the Dialogflow [entities overview](https://dialogflow.com/docs/entities).

## Best practices for writing useful invocation phrases

Invocation phrases offer a helpful invocation and discovery tool
for users, but you must choose them carefully. Keep the following best practices
in mind when designing your Action's invocation phrases:

- **Keep your invocation phrases specific to your Action's use cases**

  Your Action should [serve a specific purpose](https://developers.google.com/assistant/df-asdk/design), so make sure
  your invocation phrases actually describe what your Action does. For
  example, if your Action is used to book flights, don't use "*How do I get
  from $location to $location?* ". A better alternative is "*Book a flight from
  $location to $location.*".
  - If your invocation phrases contain entities, make sure all synonyms of those entities are relevant to its phrase(s) and your Action's use case overall.
- **Build phrases that include both a *verb* and an *object***

  An invocation consists of a complete sentence, which means your Action's
  invocation phrase needs to be a verb-object pair in order to be
  linguistically natural. For example, "*Easy recipe.* " wouldn't be a good
  invocation phrase because the full invocation would be "*Ok Google, Easy
  recipe.* ". A better alternative could be "*How do I make an easy recipe?* "
  which can be invoked by "*Ok Google, how do I make an easy recipe*".

Consider the following examples of bad and good invocation phrases:

**Bad invocation phrases**

- Phrase lacks a verb: *"The number five."*
- Phrase is too general: *"Travel to New York."*

**Good invocation phrases**

- Phrase has a clear verb and object: *"Hear a dad joke."*
- Phrase provides specific requests:

  - *"What should I wear today?"*
  - *"I want to play a trivia game."*
  - *"I want some baby names for girls."*

These invocation phrases may not be unique to your Action; it's up to
the Assistant to determine which Actions to suggest to users.