Google Actions DialogFlow Add Item To Cart - dialogflow-es

I have an app that helps users find the perfect TV. It ask questions like size, cost, features, etc. Once they provide all the parameters, I send the request to my fulfillment webhook (node server using dialogflow SDK), run my logic, and return the name of the perfect tv for them. I'm using a list of TVs from Walmart.com.
For this example imagine the winning TV is a Samsung 40" HDTV UPC:12345. How can I add this item to their Walmart cart.
Thanks.

I was thinking about this the wrong way. Walmart items are hosted by Google Express. Therefore, you need to add your item to the Google Express Cart, not the Walmart cart.

Related

WooCommerce Bookings - make a booking via API

I'm creating a headless WooCommerce application and I need to create a booking for a bookable product via an API request in Node.
Woo bookings shows this on their docs - essentially it says don't use - then I raised a ticket with the Store API team here - the answer appears to suggest we add the data ourselves, that's not good as we're then running a custom version of Woo.
Does anyone know how I can make a booking in WooCommerce via an API endpoint? It must have SOME kind of API or the frontend wouldn't work?!? It's handy to have because it means the customer runs what they've always run and get all the nice stuff like reminder texts and emails for their customers.

How to handle Dialogflow list response

I am developing an app for Google Assistant using Dialogflow (using Dialogflow online interface, without any external server).
I have a list of products. Each product has an intent which is trained with its product name.
For example if I say "Product 1" the assistant will show me some information about "Product 1".
I also made an intent which lists all the products you can browse. As a response it shows a Google Assistant "List" which displays the names of all the items.
But when I click one of the items, it will type its name("Product 1") but the item name is not recognized and I got the fallback intent.
I though lists could work like suggestion chips but it looks like answers are interpreted differently.
By looking for examples I could only find examples using Dialogflow API from code (https://actions-on-google.github.io/actions-on-google-nodejs/classes/conversation_helper.list.html), and it seems that list answers are handled with a special type of intent.
Is there a way to handle list response directly from Dialogflow online interface ?
It does not handle the List or Carousel interfaces the same way it handles the suggestion chips. As you note - they trigger a special Event, which you're expected to create an Intent for.
There are a number of reasons for this, but one good one is that these tend to be fairly dynamic (they're meant to represent things like search results), so having to manage these with a Session Entity might be more difficult.
You can use the Dialogflow Inline Editor to handle them. This is essentially the same as using a fulfillment server - however Dialogflow handles most of the server management for you.

How to make a restaurant chabot information send to a interface that people can view?

I'm making a chatbot on dialogflow that can fulfill basic needs of a restaurant (booking a table, ordering food, maybe leaving a review etc.)
I have been able to make reservations for restaurants, and I know how to extract necessary information for ordering food, but what I don't know/ fully understand is the process of taking that information and the restaurant being able to see it on the other side. When I did restaurant bookings for example, the way the restaurant could see a booking would be on a Google Calendar API I connected to the dialogflow agent.
Here is an example of how the conversation would go to maybe further clarify:
I know how to do this:
User: I'd like to buy a small Dark roast coffee
Bot: Okay, is that everything?
User: Yes
Bot: Okay, Your small Dark roast is being made!
But this is completely useless if it goes no where and the restaurant can't see the order on the other side (ie: can't see it on a order screen or a program)
I know this involves some sort of fulfillment in the inline editor or possibly a heroku API, but I'm pretty new to web development so I don't fully understand how to make this order to go through so the restaurant could see it.
Any suggestions or advice?
Thanks for the help!
You have to store data/dialogs to the backend.
You need also two roles in the frontend. The customer and the restaurant. Whitch means, that you have to implement authentication (Login - Logout - Signup), and authorization based on the user.

How to use Dialogflow Phone gateway and handling it in backend platform like nodejs

I'm trying to understand phone gateway implementation in dialogflow but dont see much of documentation for how to handle in backend code using nodejs or any third party apps like twilio,viber etc.
My doubt is whether is it available for now or not and is their any documents regarding phone gateway which can be done through google mini device for voice calling?
Please correct me if I'm wrong about what I understand.
Dialogflow phone gateway is a great feature provided by Dialogflow. It is simple to activate. Just follow the instructions in the Integrations tab.
All your intents and webhook will just work fine as they do in the bot. But the response type is little different from other platforms. So check that once before building responses.
It only supports speech response that is returned to the user in the phone call.
as per Google documentation, it uses the V2Beta1 version of the API. It means you have all the normal fields of the V2 API inside the body and parameters of the webhook call (+1 "MlEnabled" field, but not important for the telefony gateway). See more here https://dialogflow.com/docs/reference/v2-beta-v2-migration-guide-api . I have also been searching for extra fields like the phone number who is calling (to use it in backend tasks like CRM lookup), but this is not there yet (I analysed the JSON response, there is nothing so far).
Some tip to integrate with Twilio (my use case too) : you can perfectly route the twilio call to a simple Twilio callflow (like checking for opening hours) then to the incoming DialogFlow number (as you would do with the black number of an IVR provider) and transfer the Dialogflow call to another incoming phone numbers (controlled by Twilio) where you do the rest of the callflow (typically the skill based routing).
Example : after the call, Twilio checks for opening hours > OK > forward to Dialogflow phone nbr for intent recognition > identify intent nbr1 > route to phone nbr1 of Twilio which is connected to a routing/queue to agent group nbr1 (idem for intents nbr2, 3, 4 ...).
In this example, some useful fields are missing in the JSON like the phone nbr of the caller(CLI), the phone number dialed, eventually some UUI ISDN field, ... that you would like to use for a CRM lookup and CTI popup. Let's keep an eye on it and maybe Google will add it in V2beta2 ...?

How to integrate api.ai bot with any booking site to book/order something?

I've made a chatbot who can talk to people and make a normal conversation. I want to develop that chatbot so that user is able to, say order a pizza from Dominoz.com or Book a ticket on expedia or add something to cart in ebay.
I've made the bot using Google's Api.Ai (diagflow). How can I integrate it with any site performing some kind of transaction. Answer with an example booking/ordering site would be highly appreciated.
Just for additional info: I think it is possible by that webhook option in fulfillment section. But how exactly? How to implement it?
You should check if there are APIs available for ordering/booking through Expedia/eBay. Dominos have exposed their APIs for ordering purposes. Following is the link for bot ordering pizza & node-dominos-api
https://hellotars.com/bot-examples/featured/pizza-ordering-chatbot/
http://riaevangelist.github.io/node-dominos-pizza-api/
https://www.youtube.com/watch?v=F68HtCtJbGA
Webhook in Dialogflow is something where your actual logic lies. You can write it in any language you're confident of & host it somewhere for Dialogflow to communicate with it. There are 2 API references v1 & v2. Your web service receives a POST request from Dialogflow. Your request/response to/from webhook should include mandatory fields mentioned at following links:
https://dialogflow.com/docs/fulfillment
https://dialogflow.com/docs/reference/agent/query

Resources