Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Un modello di chiamata specifica in che modo gli utenti richiamano le azioni nel tuo progetto.
Quando gli utenti richiamano un'azione, iniziano una conversazione con questa, cioè
definito dal tuo modello di conversazione. Puoi definire le chiamate
nei seguenti modi:
Chiamata principale: questa
è l'unica chiamata obbligatoria per il tuo progetto Actions. Gli utenti pronunciano una frase
in modo simile a "Hey Google, parla con <nome visualizzato>" per soddisfare questo intent,
che solitamente gestisci, salutando l'utente con un messaggio di benvenuto.
Chiamate da link diretto:
Si tratta di chiamate facoltative che consentono di definire frasi di addestramento in un
per intenzione, in modo che gli utenti possano creare link diretti a una parte specifica del tuo
conversazione. Gli utenti possono pronunciare una frase simile a "Hey Google, parla con
<nome visualizzato> a <deep linkphrase>" per trovare una corrispondenza con questi tipi di
intenti (ad esempio, "Hey Google, parla con Facts about Google)
fatti")
Intent integrati -
Si tratta di chiamate facoltative che ti consentono di sfruttare
modelli di chiamata. Dichiarando il supporto di un intento integrato, gli utenti possono
rilevare e richiamare il tuo progetto Actions senza dover specificare
il nome visualizzato. Ad esempio, gli utenti possono dire "Hey Google, gioca" e
L'Assistente Google può presentare l'azione come opzione per la chiamata.
di Gemini Advanced.
Figura 1. Un modello di chiamata è costituito da tutti gli intent
idonei per avviare conversazioni con le tue Azioni. di Gemini Advanced.
Crea la chiamata principale
Ogni progetto Actions ha una chiamata principale predefinita che funge da predefinita
punto di ingresso nel progetto Actions.Il modello linguistico per questa chiamata
viene associato al nome visualizzato del progetto, quindi gli utenti devono solo pronunciare
una frase simile a "Hey Google, parla con <nome visualizzato>" per utilizzare
invocazione. Quando gli utenti richiamano le tue Azioni in questo modo, l'assistente
il runtime corrisponde all'intent di sistema actions.intent.MAIN.
Per creare la chiamata principale:
Crea chiamate tramite link diretto
Per creare chiamate ai link diretti, crei intent utente globali con la formazione
frasi che definiscono l'input dell'utente da impostare per il link diretto.
Gli utenti dicono il tuo nome visualizzato insieme alla frase del link diretto da includere
la chiamata a un link diretto (ad esempio, "Hey Google, parla con <
nome> a <frase link diretto>")
Creare chiamate implicite
La chiamata implicita consente agli utenti di richiamare l'azione senza utilizzare
il nome visualizzato. Per trovare le Azioni corrispondenti, Google utilizza indicatori quali gli utenti
dicendo all'assistente di fare qualcosa di simile a una frase di chiamata per uno
degli intent configurati o quando l'utente si trova in un contesto in cui le tue Azioni
sarebbero appropriate.
Gestire gli eventi di chiamata
Quando l'assistente corrisponde a uno dei tuoi intent globali, attiva un evento che
possono essere elaborati con un gestore. Le seguenti sezioni descrivono cosa il gestore
eseguire (puoi sceglierne uno o una qualsiasi combinazione dei tre).
Attiva un webhook
Il tuo gestore di intent può delegare a un servizio web attivando un evento webhook.
Per attivare un webhook e fare in modo che un servizio web gestisca la chiamata:
Prompt
Il tuo gestore di intent può rispondere con un prompt statico. In genere, richiede
gli intent di chiamata accolgono l'utente, lo orientano nell'utilizzo dell'azione oppure
rispondere con le informazioni di cui l'utente ha bisogno immediatamente (azioni one-shot).
Per gestire la corrispondenza di un intent di chiamata con un prompt:
Passare a una scena
Il tuo gestore di intent può passare a una scena per elaborare la chiamata corrispondente
l'intento. Questo ti offre la massima flessibilità per eseguire la logica. Per passare a
una scena:
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-26 UTC."],[[["\u003cp\u003eActions Builder allows you to define how users initiate conversations with your Actions using an invocation model.\u003c/p\u003e\n"],["\u003cp\u003eYou can use a main invocation, deep link invocations, or built-in intents to enable users to trigger your Actions.\u003c/p\u003e\n"],["\u003cp\u003eWhen an Action is invoked, you can handle the event through webhooks, static prompts, or transitions to specific scenes within your conversation model.\u003c/p\u003e\n"],["\u003cp\u003eDeep link invocations allow users to jump to specific parts of your Action by using targeted phrases in their requests.\u003c/p\u003e\n"],["\u003cp\u003eImplicit invocation allows users to trigger your Action without needing to know your project's display name, relying on contextual cues and system intents.\u003c/p\u003e\n"]]],["Invocation models define how users start conversations with Actions. Key invocation types include: **Main invocation**, triggered by \"Ok Google, talk to [display name]\"; **Deep link invocations**, using custom phrases like \"talk to [display name] to [deep link phrase]\"; and **Built-in intents**, allowing invocation without the display name, such as \"Ok Google, play a game\". Upon invocation, a handler can trigger a webhook, respond with a prompt, or transition to a scene for further logic processing.\n"],null,["# Build invocation models\n\nActions Builder Actions SDK\n\nAn invocation model specifies how users invoke the Actions in your project.\nWhen users invoke an Action, they begin a conversation with it, which is\ndefined by your [conversation model](/assistant/conversational/build/conversation). You can define invocations\nin the following ways:\n\n- [**Main invocation**](/assistant/conversational/build/main-invocation) - This\n is the only required invocation for your Actions project. Users say a phrase\n similar to *\"Ok Google, talk to \\\u003cdisplay name\\\u003e\"* to match this intent,\n which you typically handle by greeting the user with a welcome message.\n\n- [**Deep link invocations**](/assistant/conversational/build/deep-link-invocations) -\n These are optional invocations that let you define training phrases in a\n custom intent, so users can deep link into a specific part of your\n conversation. Users can say a phrase similar to *\"Ok Google, talk to\n \\\u003cdisplay name\\\u003e to \\\u003cdeep link phrase\\\u003e\"* to match these types of\n intents (for example, *\"Ok Google, talk to Facts about Google to get company\n facts\"*)\n\n- [**Built-in intents**](/assistant/conversational/build/built-in-intents) -\n These are optional invocations that let you take advantage of system-defined\n invocation models. By declaring support for a built-in intent, users can\n discover and invoke your Actions project without having to specify your\n display name. For example, users can say *\"Ok Google, play a game\"*, and\n Google Assistant can present your Action as an option for invocation.\n\n**Figure 1.** An invocation model consists of all the intents that are eligible to start conversations with your Actions. **Note:** Only intents that are defined in your invocation model are eligible for matching during invocation. User intents in your [conversation model](#conversation_model) aren't eligible for invocation.\n\nCreate the main invocation\n--------------------------\n\nEvery Actions project has a default, main invocation that acts as the default\nentry point into your Actions project.The language model for this invocation\nis associated with your project's display name, so users just need to say a\nphrase similar to *\"Ok Google, talk to \\\u003cdisplay name\\\u003e\"* to use this\ninvocation. When users invoke your Actions in this manner, the Assistant\nruntime matches the `actions.intent.MAIN` system intent.\n\nTo create the main invocation:\n\nCreate deep link invocations\n----------------------------\n\nTo build deep link invocations, you create global user intents with training\nphrases that define the user input that you want to set for the deep link.\nUsers say your display name in combination with the deep link phrase to carry\nout a deep link invocation (for example, *\"Ok Google, talk to \\\u003cdisplay\nname\\\u003e to \\\u003cdeep link phrase\\\u003e\"*)\n| **Note:** Intents that are associated with deep link invocations are also valid for matching during a conversation.\n\nCreate implicit invocations\n---------------------------\n\n| **Note:** Currently, only the `actions.intent.PLAY_GAME` system intent is supported. You must register for this intent in order to be eligible for implicit invocation if you built a game.\n\nImplicit invocation lets users invoke your Action without using your project's\ndisplay name. To find matching Actions, Google uses signals such as users\ntelling Assistant to do something that's similar to an invocation phrase for one\nof your configured intents, or when the user is in a context where your Actions\nwould be appropriate.\n\nHandle invocation events\n------------------------\n\nWhen Assistant matches one of your global intents, it triggers an event that you\ncan process with a handler. The following sections describe what your handler\ncan carry out (you can choose one or any combination of the three).\n\n### Trigger a webhook\n\nYour intent handler can delegate to a web service by triggering a webhook event.\nTo trigger a webhook and have a web service handle the invocation:\n| **Note:** See the [webhooks](../webhooks) documentation for more information on what you can do in your fulfillment.\n\n### Prompts\n\nYour intent handler can respond with a static prompt. Typically, prompts for\ninvocation intents welcome the user, orient them on how to use the Action, or\nrespond with the information the user needs immediately (one-shot Actions).\n\nTo handle an invocation intent match with a prompt:\n| **Note:** See the [prompts](../prompts) documentation for more information on what you can do with prompts.\n\n### Transition to a scene\n\nYour intent handler can transition to a scene to process the matched invocation\nintent. This gives you the most flexibility to carry out logic. To transition to\na scene:\n| **Note:** See the [scenes](/assistant/conversational/scenes) and [conversation models](/assistant/conversational/build/conversation) documentation for more information on how to build scenes."]]