I am trying to get different message from same intent. Let us consider that i have a intent Greeting , so when user say 'Hi' to Bot then bot call the Greeting intent then bot show the message "hello and welcome" to the user.
If you say Hi again to the bot then i want the different message from the bot like "hello and welcome again".
here is my intent code
new OnIntent("Greeting")
{
Actions = new List<Dialog>()
{
new CodeAction(async (dialogContext, options) =>
{
var now = DateTime.Now.TimeOfDay;
var time = now < new TimeSpan(12, 0, 0)
? "morning"
: now > new TimeSpan(19, 0, 0)
? "evening"
: "afternoon";
dialogContext.State.SetValue("dialog.greetingTime", time);
dialogContext.State.SetValue("user.name",CustmerName);
return await dialogContext.EndDialogAsync(options);
}),
new SendActivity("${HelpRootDialog()}")
}
},