0

I'm trying to intercept messages to send to my analytics server.

I'm looking to send it some data such as: messages,intent,resulted dialog.

I tried to use the routing middleware of universalBot in this fashion:

bot.on('routing',(session)=>{ console.log(session.intent); console.log(session); })

But it seems like the intent is undefined, and the only way I manage to see it is through triggerAction => onFindAction function.

I can use this method but it seems like a hack, is there a good way to intercept the intent data with middleware?

I'm using the Node.js SDK with botbuilder-apiai

Amit be
  • 469
  • 3
  • 13
  • 1
    Possible duplicate of [Logging incoming requests in BotBuilder](https://stackoverflow.com/questions/45592351/logging-incoming-requests-in-botbuilder) – Ezequiel Jadib Oct 02 '17 at 14:16
  • It is not, as the intent is not coming from facebook - but from api.ai – Amit be Oct 06 '17 at 19:04

0 Answers0