How to start the Einstein Bot on specific keyword? - salesforce-service-cloud

I created an Einstein Bot on Production for WhatsApp Chat, I want it to only start only on specific keywords/messages, for example, ="test"
So that the bot doesn't reply to customers, as it is not completely ready. Please help, if you can.
I didn't find any solution, because according to me, there isn't any variable which can store the first "hi/hello" message from the customer

I resolved it.
In Welcome Dialog Box, I created a dialog Box and typed a generic message. After that, I saved the response in a variable and in Rules I checked whether the variable value is equal to the specific keyword or not.
If yes, call the dialog to another dialog box. Check the attached image for reference.

Related

generate link with that opens pre-populated message on clicking

We have service where all user interaction is done via texting (iMessage) using Sendblue. We want users to be able to refer their friends to get free credits. The easiest way we can think of would be giving that user a link to send to their friends, which, when opened, would auto-populate a message to our number, the content of that message being the referring user's number. Example:
I (phone number +1234) want to refer my friends. I send them a link, which when they click, opens a text message to +4321 (the service) with the text prepopulated with my phone number, "+1234".
Right now the entire service is run through Zapier, so ideally would be able to work through that. You can also enter Javascript blocks into Zapier to manipulate data if that would help.
The only solution I have been able to come up with so far is create a different webpage for every person's phone number, which would just be a custom html link with the above that would be clicked automatically on page open.
Is there an existing service that does this (and ideally works with Zapier)? Or would I have to do what is described above? If so, what is the easiest way to integrate that data? Is there a way to automate webpage creation?
Any and all help is appreciated!

in Kore.ai Dialog Task - How to allow user to upload and then submit a document via an API and update Workday?

We have an HR chatbot on the Kore.ai platform. I'm wondering if it's possible to allow a user to upload and submit a letter directly to our Workday HR system, using a dialog task.
We will be able to get the Workday integration through our internal TIS team to allow us to update Workday. However I don't know what is involved in the Dialog task. Does anyone have an example of the code required within the Kore.ai platform to achieve this? Any guidance is appreciated. Thank you!
I’m sorry I just saw this post. You can add the letter as an attached file you can upload to the chatbot. Also, if you find it easier we can also create a form where the user explains the reasons, like a normal letter and update it to the system. Let me know if you would like to set up a quick meeting and go through all the options ☺️

Get username without requiring it

There's an interesting problem I'm facing as an educator. I want to collect user names in a form, but when I do that, it automatically enables students to email themselves a copy of their response.
I believe there's a way to somehow poll who's responded. When you enable the "one response per user" option, it doesn't require a stored user name. I know the information is out there somewhere - I just don't know how to get to it.
Any help would be greatly appreciated!
EDIT: I neglected to be specific about the coding aspect - apologies. I'm generating the form programmatically, and wanted to know if the information is stored somewhere in the response when the one-response-per-person option is enabled. After more digging, it appears that the easiest way to deal with this is to use an extension to handle disabling the email option.
Thanks for all your help!
you cant get the user email unless you enable that option like you mentioned. yes google might internally know who you are if you were already logged-in but its not perfect because using chrome incognito mode for example would not detect the email.
one way I can think is to:
1) with apps script generate an array of all student emails and a random password. dump to a private spreadsheet and use as your database for the next script.
2) in your forms, ask first as a form question the custom username and password.
3) on another script you can generate form urls with prefilled usernames and passwords and email each student their own custom form url.
when the student opens the form to respond, the username and password would be prefilled already.
not perfect but a malicious user would need to hack the email and if they can hack their email then they could also impersonate the user logged-in.

Passing data from one web-page to other page, how to do this?

Suppose I am going to create a web page with two box, for entering the user id and user password respectively. And then once i click the submit button, it will check with the database in background whether this user exist. If it matches anyone in the database, the user id and user password will be forwarded to the other page, at the same time it will redirect to that user's main page.
Can I just use servlet to complete this task?
I found there is request.Dispatcher API but is it enough for the task?
String name = "Tom"
request.setAttribute("name",name);
RequestDispatcher dis = request.getRequestDispatcher
("Servlet2");
request.Forward(request,response);
in second servlet file
request.getAttribute("name");
//this line will display "Tom"
One more question to ask, how about clicking a link (INSTEAD OF BUTTON) to pass some data and redirect to other servlet pages? Any idea? Many thanks for your reply.
Yes, you can use a servlet for this. Whether the dispatcher is enough or not depends on the concrete functional requirements which are not fully clear from your question. The canonical approach, however, is to store the logged-in user in the session scope instead of in the request scope. Otherwise the user has to login everytime the user want to visit a restricted page.
Also, you normally would like to send a redirect after the login succeeds. This way the new URL get reflected in browser's address bar. Also this way pressing F5 afterwards won't cause any possible surprises. Forwarding from one to another servlet is at its own also somewhat a design smell. Including would have been reasonable, but forwarding not. As said, send a redirect instead.
As to using a link to submit a form, just execute JS form.submit() during the click event.
<form id="login">
...
login
</form>
An alternative is to style the button to look like a link with a little help of CSS. This way it'll also work on clients who have JS disabled (for example, the handheld users).

Best way to hide a form input field from being accessed using firebug?

I have a form which is posted to an external API. There is a parameter called customer_token which is passed as an input field. It is used for authentication by the API and every customer is assigned one token. The input field is visible in Firefox's Firebug (even though it is a hidden field).
How do I hide it?
Options
Using javascript as I thought initially
I think using javascript to create that input field at the run time before submitting the form and immediately removing the field will work but still the field will appear momentarily. So, even if a person can't manually get it, I am afraid that a crawler or spider (I don't know the exact term - but some automated script) may get the customer token. Is there a better solution for this? After form submission, the same form remains displayed.
Using one-time token concept as suggested by Ikke
I am not sure how it will work? The API needs the correct customer token value to process any request. So, even to generate a one-time token and return, a request with the customer token has to be sent. This way anyone is able to see my customer token value and they can also send a request to get a one-time token and use it. So how does it solve the problem?
Resolved
Check How to post form to my server and then to API, instead of posting directly(for security reasons)?
Thanks,
Sandeepan
This is not possible. Firebug just reads the DOM in it's actual state, so even if it's added in a later stage, it can still be retrieved.
This way of security is called Security through obscurity and is a kind of non-security. You would have to solve it another way, like letting the server do the request in stead.
You let the user submit the form to the server. Then with curl, you make the call to the webservice with the correct user code.
I don't think this is possible I'm afraid.
Firebug will still see the element if it's inserted via Javascript, as it watches the DOM tree. If this input exposes a security vulnerability then it's the job of your server-side code to validate/fix it.
More details on the API might help somebody answer this question in more detail.
I hope this helps