List options
Additional configuration data required by a built-in intent. Possible
values for the built-in intents: actions.intent.OPTION ->
[google.actions.v2.OptionValueSpec], actions.intent.CONFIRMATION ->
[google.actions.v2.ConfirmationValueSpec],
actions.intent.TRANSACTION_REQUIREMENTS_CHECK ->
[google.actions.v2.TransactionRequirementsCheckSpec],
actions.intent.DELIVERY_ADDRESS ->
[google.actions.v2.DeliveryAddressValueSpec],
actions.intent.TRANSACTION_DECISION ->
[google.actions.v2.TransactionDecisionValueSpec],
actions.intent.PLACE ->
[google.actions.v2.PlaceValueSpec],
actions.intent.Link ->
[google.actions.v2.LinkValueSpec]
The built-in intent name, e.g. actions.intent.TEXT
, or intents
defined in the action package. If the intent specified is not a built-in
intent, it is only used for speech biasing and the input provided by the
Google Assistant will be the actions.intent.TEXT
intent.
Optionally, a parameter of the intent that is being requested. Only valid for requested intents. Used for speech biasing.
Generated using TypeDoc
Asks to collect user's input with a list.
// Actions SDK const app = actionssdk() app.intent('actions.intent.MAIN', conv => { conv.ask('Which of these looks good?') conv.ask(new List({ items: { [SELECTION_KEY_ONE]: { title: 'Number one', synonyms: ['synonym of KEY_ONE 1', 'synonym of KEY_ONE 2'], }, [SELECTION_KEY_TWO]: { title: 'Number two', synonyms: ['synonym of KEY_TWO 1', 'synonym of KEY_TWO 2'], } } })) }) app.intent('actions.intent.OPTION', (conv, input, option) => { if (option === SELECTION_KEY_ONE) { conv.close('Number one is a great choice!') } else { conv.close('Number two is also a great choice!') } }) // Dialogflow const app = dialogflow() app.intent('Default Welcome Intent', conv => { conv.ask('Which of these looks good?') conv.ask(new List({ items: { [SELECTION_KEY_ONE]: { title: 'Number one', synonyms: ['synonym of KEY_ONE 1', 'synonym of KEY_ONE 2'], }, [SELECTION_KEY_TWO]: { title: 'Number two', synonyms: ['synonym of KEY_TWO 1', 'synonym of KEY_TWO 2'], } } })) }) // Create a Dialogflow intent with the `actions_intent_OPTION` event app.intent('Get Option', (conv, input, option) => { if (option === SELECTION_KEY_ONE) { conv.close('Number one is a great choice!') } else { conv.close('Number two is also a great choice!') } })
// Actions SDK const app = actionssdk() app.intent('actions.intent.MAIN', conv => { conv.ask('Which of these looks good?') conv.ask(new List({ items: { [SELECTION_KEY_ONE]: { title: 'Number one', synonyms: ['synonym of KEY_ONE 1', 'synonym of KEY_ONE 2'], }, [SELECTION_KEY_TWO]: { title: 'Number two', synonyms: ['synonym of KEY_TWO 1', 'synonym of KEY_TWO 2'], } } })) }) app.intent('actions.intent.OPTION', (conv, input, option) => { if (option === SELECTION_KEY_ONE) { conv.close('Number one is a great choice!') } else { conv.close('Number two is also a great choice!') } }) // Dialogflow const app = dialogflow() app.intent('Default Welcome Intent', conv => { conv.ask('Which of these looks good?') conv.ask(new List({ items: { [SELECTION_KEY_ONE]: { title: 'Number one', synonyms: ['synonym of KEY_ONE 1', 'synonym of KEY_ONE 2'], }, [SELECTION_KEY_TWO]: { title: 'Number two', synonyms: ['synonym of KEY_TWO 1', 'synonym of KEY_TWO 2'], } } })) }) // Create a Dialogflow intent with the `actions_intent_OPTION` event app.intent('Get Option', (conv, input, option) => { if (option === SELECTION_KEY_ONE) { conv.close('Number one is a great choice!') } else { conv.close('Number two is also a great choice!') } })