Bot Framework Event to Relay?

My question is:

I have a responsive map with a postback button called "thisIsMyPostback". Now I want to act on this return mail as I would like.

The problem is that this postback can also be printed to achieve the same result. In other words, clicking a button, and also just passing my bot "thisIsMyPostback" straight up, does the same.

Is there a way to separate the postback message from the message_received message? Thus, custom messaging "thisIsMyPostback" will not directly result in the same as clicking a button.

Thank!

+3


source to share


2 answers


The Responsive Maps readme on the BotFramework WebChat GitHub repo The GitHub repo states:

The action data property can be a string or can be an object. The string is passed back to your bot as the Bot Builder imBack SDK, and the object is passed as postBack. Actions with imBack appear in the chat thread as user-entered Reply. PostBack actions are not displayed.



"actions": [
          {
            "type": "Action.Submit",
            "title": "Next",
            "data": { "postBack": "thisIsMyPostback" }
          }
        ]

      

If the Activity does not have an object, the user did not click the button.

+1


source


Is there a way to separate the postback message from the message_received message? Thus, custom messaging "thisIsMyPostback" will not directly result in the same as clicking a button.

No, this is currently not possible because all posts, user or imBack / postBack are of type "post", so there is no way to tell the difference unless you added some special text to postBack and configured a triggerAction

to recognize it.



For more information on using trigger actions, see: https://docs.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-global-handlers#trigger-a-help-dialog

+1


source







All Articles