In this section, we will enable the webhooks for the luckyNum intent and prepare the webhook code for the logic of the luckyNum intent. Follow these steps to do so:
- Open the Intent editing page for the luckyNum intent and scroll down to the Fulfillment section. Here, turn on the Enable webhook call for this intent option.
Now, this intent will look for the response to be generated from the webhook.
- Open a text editor of your choice to create the code for the webhook so that it's in JavaScript and will run on the Node.js platform provided by Firebase:Â
'use strict';
The preceding line ensures that we use a set of coding standards that have been defined in ECMAScript 5 that provide several useful modifications to the JavaScript language, thus making it more secure and less confusing.
- Modules in JavaScript are imported into the...