functions/aog-webhook.js
/**
 * Registers the user for update once user selects a category.
 * @param {Conversation} conv
 * @param {string} category
 */
Registers the user for update once user selects a category.
@param {Conversation} conv
@param {string} category
Registers the user for update once user selects a category . @param { Conversation } conv @param { string } category
function registerForDailyUpdates(conv, category) {
  console.log('Register updates - ' + category);
  conv.ask(new RegisterUpdate({
    intent: 'Tell Tip',
    arguments: [{name: Parameters.CATEGORY, textValue: category}],
    frequency: 'DAILY',
  }));
}
function registerForDailyUpdates ( conv , category ) { console . log ( 'Register updates - ' + category ) ; conv . ask ( new RegisterUpdate ( { intent : 'Tell Tip' , arguments : [ { name : Parameters . CATEGORY , textValue : category } ] , frequency : 'DAILY' , } ) ) ; }
Registers the user for update once user selects a category.
Registers the user for update once user selects a category .
// NOTE: To enable updates for an intent, it must be enabled in the // Actions console. Actions -> Intent -> User updates and notifications.