I'm trying to make an app for Google Home that takes a users weight and says it back to them. Below is the index.js code for the intent responsible for doing this,
const functions = require('firebase-functions');
const {dialogflow} = require('actions-on-google');
const app = dialogflow({
debug: true,
});
app.intent('vitals-weight', (conv) => {
const weight = conv.parameters['weight'];
const weight_name = conv.parameters['weight-name'];
conv.ask('I have recorded that your weight is, ${weight} and ${weight-name}.');
exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app);
'weight' and 'weight-name' are the entities in the intent that store the weight and the weight unit respectively. Is this the correct approach when trying to handle user data?