Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Welcome greeting message not showing On load - composer bot hosted in Web chat channel #3826

Closed
sriget opened this issue Aug 11, 2020 · 8 comments
Assignees
Labels
Type: Question Further information is requested

Comments

@sriget
Copy link

sriget commented Aug 11, 2020

Hi
This might be related to #1780
When I host the composer bot hosted in web chat channel directline, welcome greeting is not showing on load. But it shows in bot emulator. I'm using the latest composer v1.0.2 and below is the welcome dialog flow.

image

If i remove that if/else branch , greeting is displayed twice, i see thats the fix in #1780 . But is there any workaround to show the welcome greeting on load in web chat channel and in emulator both?
Any guidance will be appreciated.

Thanks,
Sri

@sriget sriget added the Needs-triage A new issue that require triage label Aug 11, 2020
@luhan2017
Copy link
Contributor

@sriget, did you use secret or token to connect to web chat channel? This is by design that, if you are using the secret to connect to web chat channel, the OnConversationUpdate will be fired twice separately and the first one is when you open webchat, and MembersAdded is bot, the second one is then user first talk to bot, the MemberAdded is user.

You could work around this by using token to connect to web chat instead of secret.

@luhan2017 luhan2017 self-assigned this Aug 11, 2020
@luhan2017 luhan2017 added Type: Question Further information is requested and removed Needs-triage A new issue that require triage labels Aug 11, 2020
@eluchsinger
Copy link

@luhan2017 wow... do you have further documentation or How To's to use the token instead of the secret?

@eluchsinger
Copy link

Looks like I am using the token already, but the Bot still doesn't start the conversation when it's hosted in the Web Chat channel.

image

@luhan2017
Copy link
Contributor

@eluchsinger , did you run this step to get token by secret? https://docs.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-authentication?view=azure-bot-service-4.0#generate-token I am not sure the token you add here is secret or token? could you please double check?

@sriget
Copy link
Author

sriget commented Aug 11, 2020

@sriget, did you use secret or token to connect to web chat channel? This is by design that, if you are using the secret to connect to web chat channel, the OnConversationUpdate will be fired twice separately and the first one is when you open webchat, and MembersAdded is bot, the second one is then user first talk to bot, the MemberAdded is user.

You could work around this by using token to connect to web chat instead of secret.

Hi @luhan2017 . I used directline secret key only. let me try with access token and see. thanks for suggestion. !

@eluchsinger
Copy link

@luhan2017 I'm getting the token from that API endpoint dynamically. The bot does not start the conversation. Only after the user writes a message, the bot starts to text back...

image

@tdurnford
Copy link
Collaborator

@eluchsinger Please take a look at the Web Chat Welcome Message documentation. It looks like you need to add a user id to the token request.

@gary-x0pa
Copy link

gary-x0pa commented Apr 7, 2021

Looks like im facing this issue too. May i know how was it resolved? Im using the token and userid but the webchat still does not show the greeting message. However after i type in something intially, it then shows the greeting the message. Is there any guide on how to resolve this with ReactWebChat?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants