FAQ - NGRP/node-red-viseo-bot GitHub Wiki



Bot servers

The bot servers nodes (Botbuilder, Alexa, Dialogflow, WeChat, Messenger...) act as adapters between the flow and the different channels: they all create an object with the same template from their own responses. This object is:

  • message: the complete information of the conversation, such as...
    • message.address: address to contact the user (channel, conversation id...)
    • message.user: user complete information
    • message.attachments: images, documents, audio messages...

The content of this message object is related to the channel, and the framework normalizes common fields with:

  • payload: the user input
  • user: user complete information (regardless of the message), such as...
    • user.address: address to contact the user (channel, conversation id...)
    • user.profile: retrieved user profile information (if available) that can be used to personalize the experience
    • user.id: unique user id

This mechanism allows the conversation flow to have a uniform behavior and to deal with many different channels.

Send-card nodes

Each server node has in its global memory storage a list of active users (using the concept of conversations). Conversations rely on events (received message, sent message...) in server and send-card nodes.

When a send-card node is reached, the user.address field is used to send a message to the user.