Dialogflow Slack Cards - chatbot

I have a bit of a silly question about the Slack integration of Dialogflow.
When I use a card to the response in Slack, the buttons work perfectly. But they don't type the title nor the postback of the button to the chat. The Botframework from Microsoft works like this and I think it's easier for the user to see what he answered if he scroll up the conversation history.
My question is, is this how it is, or can I change this behavior so that on clicking a card button the text of the button is typed in the chat?
For the moment, I'm only using code to execute functions when needed.
This is the "card" I'm talking about:

You can't directly change the behavior of the card as this is internal to Slack and/or Dialogflow. There is however a workaround: If you are using a Webhook for fulfillment you can send multiple responses messages back and thus simply include the button text before the actual card. The button text will then only show up after the request is fulfilled (not immediately after the user tapped it), but that seems about the best you can get.

Related

Button function in a SendGrid Email to Trigger an external Webhook

forgive my naivete in asking this question, but I'm hoping someone can help me.
I have an email I send out through the SendGrid api using a dynamic template. The content of the email is different for each user I send it to (highly curated). I send products, their name, info, and a link to buy them.
I am looking to create a "LIKE" button next to each product for the user to interact with in the email and provide feedback on that product. That is, if they like that product but don't want to click to buy yet, they can hit "LIKE" and I'll be informed.
I am thinking I would do this through a webhook using something like integromat where a click of the button would trigger the webhook and then I would use something like airtable to update information.
Is something like this feasible? Would I just put the webhook URL in the href tag of a button? Is it possible to trigger the webhook AND then redirect to a window/tab that would acknowledge that the button was clicked?
Thank you for any feedback!
Links in an email will open a web browser outside of the email. This will make an HTTP request to the URL that you set as the HREF for the link (<a>). So, you can point that HREF directly at an endpoint on your own application and handle the request, storing the data about which user liked which product and rendering or redirecting the user to a confirmation page.
I think you may be complicating the idea by introducing the term webhook to this. I also see no reason you would want to include a third-party like Integromat to the proceedings.

Quick Replies on the Page Owner

Messenger Platform introduced Quick Replies feature, that the User can tap to answer Page Owner's request instead of typing. However, I can make it work from the User view only. Will it work from Page Owner's view, like suggestion?
Flow may be:
1. User ask Page a question
2. Bot suggest some <quick replies> based on that question (maybe use NLP)
3. Page Owner can tap <quick replies> to reply
I may call this "semi-auto reply bot". For example, in the demo here, the shop owner may double checked the response and tap to send.
No, there is not a direct way to do this. Theoretically you could basically have a customer-facing bot and a business-owner-facing bot, and then orchestrate the a flow something like this:
user messages user-facing bot
bot forwards the message to business in business-owner-facing bot with quick replies
business owner selects a quick reply
user-facing bot replies with the text of the quick reply.
You'd want to be careful of privacy concerns tho since the user's message is being forwarded on.

Is it possible to send rich responses to google home app?

I developed a actions on google app which sends a rich response. Everything works fine in the Actions on Google simulator. Now I want to test it on my Google Home Mini but my rich responses are not told by the mini. I would like to ask if it is possible to send my rich response to the google home app? The home mini says something like "Ok, I found these hotels, look at the home app" and there are the rich responses?
You can't send users to the Home app, but you can direct them to the Assistant available through their phone. The process is roughly:
At some point in the conversation (decide what is best for you, but when you have results that require display is usually good, or if the user says something like "Show me" or "Send this to my phone"), determine if they are on a device with a screen or not. You do this by using the app.getSurfaceCapabilities() method or by looking at the JSON in the originalRequest.data.surface.capabilities property. If they're using a screen, you're all set. But if not...
Make sure they have a screen they can use. You'll do this by checking out the results from app.getAvailableSurfaces() or looking at the JSON in the (not fully documented) originalRequest.data.availableSurfaces array. If they don't have a screen, you'll need to figure out your best course of action. But if they do have a screen surface (such as their phone, currently) available...
You can request to transfer them to the new surface using the app.askForNewSurface() method, passing a message explaining why you want to do the switch, a message that will appear as a notification on the device, and what surface you need (the screen).
If the user approves, they'll get the notification on their mobile device (using that device's normal notification system). When they select the notification, the Assistant will open up and will send your Action an Event called actions_intent_NEW_SURFACE. You'll need to create an Intent that handles this Event and forwards it to your webhook.
Your webhook should confirm that it is on a useful surface, and then proceed with the conversation and send the results.
You can see more about handling different surfaces at https://developers.google.com/actions/assistant/surface-capabilities
Rich responses can appear on screen-only or audio and screen experiences.
They can contain the following components:
One or two simple responses (chat bubbles)
An optional basic card
Optional suggestion chips
An optional link-out chip
An option interface (list or carousel)
So you need to make sure that the text response is containing all the details for cases like voice only (e.g. Google home/mini/max).
However, if your users are using the assistant from a device with a screen, you can offer them a better experience with the rich responses (e.g. suggestion chips, links etc').

Automated Actions - Mouse Clicks Based on Text Displayed

I am looking for a way to automate mouse clicks based on display text on screen.
The main function is the following:
- When bot detects "Hello!" on screen of Facebook Messenger, it clicks to open conversation. Then it reads the message (messages are always the same) and depending on the messages received it clicks on Saved Replies and sends the correct message.
For example:
Bot detects "hello!" it clicks and opens the conversation. Then bot reads "Amazing Offer 20% off" so it goes to Saved Replies and sends the correct message according to that offer.
*Saved replies is a canned message function that facebook for business messages offers as a function. So basically all I need is a bot that can automate clicks and detect text on screen. It will be run from a PC using Windows.
Any suggestions?
There are three options.
1) Use the Facebook API.
Facebook have spent time and effort to build a system in which developers can interact with their products. Here is a link: https://messengerplatform.fb.com
Options that might be against their policies and will get your account blocked (or worse):
2) Chrome Extension.
Through a Chrome extension, you have the ability to scan the DOM every few seconds and interact with the elements.
This needs to be maintained as Facebook might change element positions, ids or classes. https://developer.chrome.com/extensions/getstarted
3) PhantomJs.
This is a headless browser which you can run and interact with the DOM elements. This also needs to be maintained as the DOM may change at any time.
http://phantomjs.org/page-automation.html

"Send via Phone Call" button grayed out / disabled while trying to register for Facebook developer account

I am trying to register for a Facebook developer account. So I went to developers.facebook.com and then tried to go through the registration process. During the steps, facebook requires me to provide my phone number in order to receive a confirmation code for registration. A dialog box shows up and I enter my phone number in it. But even after I do this, I am unable to click on "Send via Phone Call" button because it is grayed out / disabled as shown below. Please note that I have just put a fake phone number for the image here, but the button won't enable in spite of my putting my real phone number.
All I could do is click on "Send as Text". But the problem with that is the fact my phone can't receive text messages. So I am stuck, because I can't click on the "Send via Phone Call" and receive a call on my phone for the confirmation code.
Could someone please let me know how I get around this and complete the registration process for the developer account? Either having a way to enable the "Send via Phone Call" button or having a way to register without a phone number or another way that I am not aware of would be good.
Thanks.
I think the original comment by Tzar deserves to be an answer as its 2016 and still, works:
Short story:
The Send via phone call button is greyed out and disabled, but the functionality exists. Facebook just made a lazy/temp/quickfix by just disabling the control, not removing the functionality. What that means is if you can simply enable the button, it will work. So we need to tamper with that html.
Solution:
Do an inspect element with your browser on that button, and simply remove the disabled="1" property. Here is the tricky part: the button will remain greyed-out but it will be clickable, and i can confirm it just worked for me.