acoustic-teacher-17454
08/09/2023, 3:19 AMacoustic-teacher-17454
08/16/2023, 11:41 PMworkflow.intentMatched = false;
// Check if intents exists and has at least one item
if (event.nlu && event.nlu.intents && event.nlu.intents.length > 0) {
const intentConfidence = event.nlu.intents[0].confidence;
if (intentConfidence > 0.75) {
workflow.intentMatched = true;
}
Then at the start of my Main workflow, if intentMatched is True, it goes into the prepared responses. If not, it directs to an AI Task that can answer questions, guard-railed to the company domain of knowledge. 😀
It looks like you could do the same thing, but in an Execute Code card, which could give you the flexibility to do it in a sub-workflow or even per-intent.