web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Welcome message not sh...
Copilot Studio
Answered

Welcome message not showing in application using Direct Line and Botframework.

(0) ShareShare
ReportReport
Posted on by 9
I have built an application where i'm accessing the copilot studio bot through Direct Line authentication. I'm also using Botframework.
 
In the Copilot Studio page I have configured a welcome message, which shows up in the example bot. My problem arrises when I open that bot in the application. The welcome message does not show up.
 
Anyone that has an idea of what might cause this, and even a possible fix?
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,969 Moderator on at
     
    Sorry for your troubles.
     
    So I do not know what you mean in an App, sorry I mean it as in what type of App.
     
    What I can say is that in many cases (I won't say all), depending on where it is embedded, it will not trigger your initial Topic (default), because it doesn't see that a Conversation has actually "Started" and so therefor it won't do anything until someone types in it. That is standard behavior and is what it sounds like you are facing.
     
    I DO realize that in the Test environment it works, I would bet if you published to the Demo Website it would work (so please try that and let me know) , but in an app... even in Teams, many times they will not.
     
    Is that silly... yeah.. but is what I believe is happening to you, especially if you publish to the Demo Website and it works.
     
    I do not know of any hacks to force it to do it either, I am sure there are.. well maybe, but none I can safely recommend if I am correct in my statements and reason.
     
    While not what you want, if this answers your question please mark as such and maybe a like.
     
    But feel free to come back with more details as I am curious if it works in the Demo Site
  • Verified answer
    JL-04070750-0 Profile Picture
    9 on at
    @Michael E. Gernaey Because I have integrated this in my system with Direct Line, the demo website won't show anything because of the missing token (I believe). I am testing some solution with the botframework-webchat package called postActivity:
     
    directLine.connectionStatus$.subscribe((connectionStatus: ConnectionStatus) => {
      if (connectionStatus === ConnectionStatus.Online && !welcomeEventSent) {
        welcomeEventSent = true;
        directLine.postActivity({
          type: 'event',
          name: 'webchat/join',
          value: {
            locale: this.localeId,
            timestamp: new Date().toISOString()
          },
        } as Activity);
      }
    });
     
    though no luck..
     
    I found this stackoverflow post about backchannels to trigger events after you connect to the chat: https://stackoverflow.com/questions/56111293/botframework-how-to-fixwelcome-message-is-not-getting-displayed-to-the-user

    Do you know if this might be a viable solution? 

    EDIT: 
     
    I have found a solution to this that works. Though it will not be the "true" welcome message, it will be a second, separate topic that is triggered. 
     
    All I needed to do was to add the parameter "from: { id: "someId" } to postActivity, and then in my renderWebchat I pass the same id. As a topic I added a custom client event that listens to the event "webchat/join", and then sends the welcome message. I of course also needed to ass .subscribe() to the postActivity method.
  • Michael E. Gernaey Profile Picture
    53,969 Moderator on at
     
    Thank you for sharing your resolution. what a pain seriously :-(

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 586

#2
chiaraalina Profile Picture

chiaraalina 170 Super User 2026 Season 1

#3
deepakmehta13a Profile Picture

deepakmehta13a 118

Last 30 days Overall leaderboard