Share via

MS Bot Framework: Correct Event JSON structure for HTTP request using Direct Line API 3.0

Jelle Van De Sijpe 31 Reputation points
2022-04-09T16:11:35.477+00:00

Hi,

I have implemented a bot using Azure Bot Composer and I want to use a custom event as a trigger for a welcome dialog. I implemented this trigger using bot composer as follows:

191487-image.png

However, I can't seem to trigger this event using HTTP requests. I tried following the event structure from the official repo but the bot doesn't respond to my event request. The structure that I used is:

{   
  "type": "event",   
  "channelId": "directline",   
  "from": { "id": "UnityUserId", "name": "Unity User 1" },   
  "value": "test",   
  "name": "welcome"   
}  

Is anything wrong here? I can't directly see the problem.

Azure AI Bot Service
Azure AI Bot Service

An Azure service that provides an integrated environment for bot development.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Rohit Mungi 49,131 Reputation points Microsoft Employee Moderator
    2022-04-11T11:34:20.797+00:00

    @Jelle Van De Sijpe I think your scenario is similar to the one mentioned in this issue.
    Could you check if this works with the activity event mentioned for the webchat to composer?

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.