I have setup a chatbot for my customer.
For that, I have configured the bot with different dialogs and pattern to help them going to the response they seek. I also have activated the Einstein bot intent (Natural Language Processing : NLP) to let them type answer to get directly to the right dialogs.
But it's here that I have a problem. When I set a dialog with a question (with or without choices) when I write an NPL answer, the bot stop and wait another input.
Exemple: the bot asks "Are you ok?" if I respond "Agent" (word link to another dialog) the bot stop and if I rewrite "Agent" the bot start the dialogs "Agent".
Dialog config : Dialog config
Chat exemple : Chat exemple
I don't know why it's happening or how can I resolve this. I have read the documentation but nothing link to this problem.
Thanks for your time
I have found the issues. It comes from the entity that we were using. The entity was set with a standard text. So, when a user was writing some text (utterance values or not) it was store and that was good for the bot.
The solution was to create an entity of Value type. Write in it the Buttons label. Like this if a user clicks on the button or write the button label, it can be stored and go further, if not it will go on the intent recognition. And finally, if all the 2 fails, the bot goes in the conversation repair.
Here is a process Schema draw by a salesforce member
Related
I think I need some answer from discord api experts.
I'm wondering if someone can detect using bots below logics.
If we enter the server, we will have initial channel. (for example Welcome)
There some rules will be described and we will have emojis like check / symbols for the server.
And after user click, bot can detect the user id and can send direct message to him/her.
Is it possible for the outside guy of the server? (I mean without any discord related api key)
Thanks
Since I don't have exp with this just went through the discord docs, but didn't find proper resources.
I'm new to discord.js but I would like to understand. Is it possible to achieve a functionality that would send message as my current user?
I mean for example I'm normal user on a discord server and I want to send randomly some jokes every day once. But this should happen from my current user, which has the discord name.
I know I can have a bot created and registered, but this is another approach I think.
My questions are: Is this achievable with discord.js or not really? Is this functionality achiavable at all? And where do I begin?
Thanks for any help.
It is possible. It's just like making a discord BOT. But rather than making a bot application and using its token, you just use YOUR token.
This is purely for educational purposes only, and you shouldn't use it for anything else. Everything is possible, especially with discord.js.
What you are describing is a "self-bot", and is against the Terms of Service. As such, it is not supported.
Discord has made an announcement regarding self-bots before.
Here is a relevant excerpt:
Automating normal user accounts (generally called "self-bots") outside
of the OAuth2/bot API is forbidden, and can result in an account
termination if found.
I have a joke Discord bot which automatically nicknames people for the main server it's on, but I also allow some other friends to put it on their server for fun. The only issue is, the automatic rename thing also happens there.
What would the correct line of code be to make it so the lines of code responsible for the auto-nickname feature only run when someone joins a specific server and not any server with the bot?
Each guild in discord has a guild ID, witch is unique, so you could use it to determine if the bot should do the nickname change in that specific guild.
I can't show you an exact line of code since you didn't specify the language you are writing your bot in but I'll write the basic idea of it.
if (message.guild.id != "Your main guild id") return;
This assumes that you execute this on a per message basis, but since you didn't provide much more detail this is as much as I can give in terms of code example.
Another thing to consider is how to get the guild ID in the first place, firstly enable development mode in discord in case you haven't already, to do that you should:
Open your Discord settings
click on Appearance
Scroll down to Developer mode and enable it.
Once you did that, you can right click the server name and go to "Copy ID", and you have your id.
Does anyone know if it's possible to return a different message etc to the chat user if it's the very first time they are interacting with the bot?
For instance, if a user says "hello" (or anything) for the very first time, the bot might respond with, "Hello there!"
If a user says hello some time later, the bot might respond with "Hello, again!"
Looking through the developer docs I'm struggling to find an answer: https://developers.facebook.com/docs/messenger-platform
For context, I'm also using the https://api.ai service.
One way to accomplish this is to set up a "get started" button:
https://developers.facebook.com/docs/messenger-platform/messenger-profile/get-started-button
This might also be helpful:
https://developers.facebook.com/docs/messenger-platform/messenger-profile/greeting-text
(But I haven't used it myself, so I'm not sure what it does.)
Also, as already mentioned, you can store user data in your own database, and send a greeting message if you can't find the user there already.
This would currently not be possible with API.ai out of the box, you'd have to build a custom webhook that would save the user id to database and check it on new session.
As a (very) hacky workaround you could try outputting a context after the first hello and each and every other intent you use inputs and outputs that context, essentially remembering the user has talked to the bot via a 'permanent' context.
Back in the day Facebook used to let you define URLs that were something like http://facebook.com/send_a_message/user/55/pre_fill/Hi there. When you clicked that link Facebook would open up its Messenger with a "Hi there" message ready to be sent to user 55.
But then Facebook decided that "pre-filling" was bad, and outlawed it across all their APIs. Now there are a bunch of different ways to initiate a Messenger chat session, but they all amount to "start a chat with user 55", not "start a chat with user 55 using some information".
The thing is, I'd like to somehow pass information along with the link. For instance, I might want to have three different links on three different pages, and I want my chatbot to be able to respond differently based on which page the user came from. Since I can't "pre-fill" a message (eg. "Hello, I just came from page A"), I'm wondering if there is any other way to pass auxiliary information.
TLDR
I'm wondering if there's any way I can possibly provide a user with a link that, when they click it, starts up a chat session with my chatbot user, and somehow passes information to it. Using an intermediate proxy (ie. having the link go to my server, and then have my server start the chat somehow) would work, but only if I can associate the information with the user (ie. it doesn't help to know "page A" if I can't associate that with the user once they start chatting).
After researching further it would appear that the answer to my question is no: there is currently no way to pass-along supplemental information.
But here's the good news: when I filed a bug about this (which it turns out I should have filed as a feature request, sorry Facebook) I got a response saying something to the effect of "we couldn't tell you that we are currently developing this, even if we were", which I'm going to optimistically choose to interpret as a sign hope means that this functionality may be coming in the future.