User Inputs with Dialogflow Actions & Parameters
This is a simple example to make use of Dialogflow Actions and Parameters. We will try to identify the user’s name input and use it in a short answer.
Actions
The Action is the step the application will take when responding to a specific intent, triggered by a user input.
Parameters
Parameters are elements that connects words in the user response to entities.
Entities
Entities are used for extracting parameter values from inputs. There are three types of entities: system defaults, developer and user.
The default system entities are prefixed with @sys and they cover many common cases (name, color, date…). And you can create your custom entities.
The name parameter example
We create a new parameter, to recognize the name in the user input.
Let’s put a simple training phrase, with the user telling his name.
The parameter is reusable in the Response, with the parameter name defined earlier. It is like reusing our defined variable, with the mapped user input as value.
Try it
And the result will be
Useful Links
Xavier is a Freelance Innovation Solutions Architect and Technical Advisor. He has been working for 10 years in software development (Java, JEE, JavaScript, Angular, Node JS, React), and has solid experience as a Tech Lead and Technical Architect in different company sizes (Startup, SME, Large Enterprise), and in different sectors (Insurance, Risk Insurance, Transportation, Energy Management, Mobile Operator)
Recent Comments