Can we Get Previous Dialog Task name or FAQ’s?

Actually, in my fallback task, I want to determine whether the user is coming from any other Dialog task or FAQs, or if they have returned from the fallback task again. If the previous task was other than the fallback, I want to show a different message. If it’s from the fallback, I want to show something else. If anyone knows, please let me know. Thank you.

Here’s how I solved your issue:
The current task name is stored in “context.currentTags.tags”. This would be “Fallback Task” in your case. The previous task name is stored in “context.historicTags[0].tags”. This would be the name of whatever task was executed before the Fallback Task. I compared these values and if they were equal, I knew it was a repeat of the fallback flow. I used flow controls to deliver a different message based on the comparison. Hope that helps.

1 Like