Configuring Scene to Call Webhook - actions-on-google

I've created a Webhook in the Actions Console and entered a URL that should be called:
Webhook screenshot
In my Scene, I'm trying to get the Webhook invoked upon entering the Scene:
On Enter Scene screenshot
The textbox that appears after checking the Call your webhook checkbox says, "Enter handler" - but how am I supposed to reference my Webhook if the Actions Console never provided a way to enter anything but the URL?

Related

How to trigger a specific node in IBM Watson Assistant from URL

I have a website which links to a chatbot built on IBM Watson Assistant. There are some hyperlinks on the website that I want to trigger specific nodes/ intents the watson dialog.
Example: User clicks on "Provide feedback" link, the watson chatbot launches and based on the link the "provide_feedback" intent is recognised (thus preventing the user from needing to specify the intent after clicking the link).
Has anyone tried this before?
I also came across this requirement and want to mention another alternative here:
Instead of sending an input text that matches the intent of your desired node, you can also pass
Intents to use when evaluating the user input.doc
and tell the assistant to match it with confidence of 1.0.
I think this is a clean method, because you don't need to deal with disambiguation of your input text.
Then you don't need to send input text at all and the intent actually does not even need example phrases :-)
For example if you want to trigger a node that has the intent #provide_feedback
you can call this python example code:
send_message_to_chatbot(text="", intent="provide_feedback")
def send_message_to_chatbot(text="", intent=""):
message = assistant.message(
assistant_id=ASSISTANT_ID,
session_id=SESSION_ID,
input=MessageInput(
text=text,
intents=[RuntimeIntent(intent=intent, confidence=1.0)]
)
).get_result()
return message
Prerequisite is of course that the node is in the root branch of your dialog so it can be triggered.
The Watson Assistant service basically is used via a REST API. That API is invoked from the "Try it" pane in the workspace editor, from your dedicated application or maybe from widgets embedded into a website. The message call is used to send user input to Watson Assistant and to receive a chatbot response.
What you can do is to call the message API from your app and pass a specific term as input message. That term would match an intent and hence trigger a specific dialog node. As an example, if you have an intent "provide_feedback" defined for the phrase "user pressed feedback button" and you pass in exactly that phrase as input message, then the intent "provide_feedback" will match.

Conversation flow works in 'Try it out' but skips child node in app

I am making an app that predicts clothes the user is wearing. It uses the Visual Recognition tool, too, and for Conversation and VR to be communicating, I attach the intent 'suggestClothing' or 'clothResult' to the cloth items it found. I use an entity for Conversation to recognize the cloth items and respond accordingly.
The flow should be as follows:
User: how do I look?
-classifies clothes-
App to conversation: clothSuggest blackJacket
Conversation to user: "You picked the black jacket! Try out the green shirt with this outfit and show me how you look."
-classifies clothes-
App to conversation: clothResult blackJacket greenShirt
Conversation to user: "You look great in that outfit!"
All nodes have multiple responses as all clothes are in pairs. Either the user is wearing one or the other, and Conversation will then always suggest it's match.
Conversation flow looks like this
I also attempted this. Here sq123 is suggestClothing (first intent) and cq123 is clothResult:
This works fine in 'Try it out', too, but in the app, it immediately exits the branch on 'clothResult item1 item2' and matches with other conditions in the app.
What's the best way to optimize my flow to make it work in the app?
A typical reason why it works in "Try it out" and not in the app is that the context object is not returned properly.
When the app invokes the message method of the Watson Assistant API, a context object is passed. The calls are stateless and everything needed for Watson Assistant to continue a dialog is included in the context object. Thus, when your app retrieves the results from the message API, it needs to save the context and pass it back to Watson Assistant the next time the message method is invoked again (for that session and user).

Why my actions on Google doesn't recognize touch selection?

I'm writing a simple action on google without any webhooks. Every response is generated by dialogflow.
I have an intent that works flawless if I call it by speech or type but if I call it by selecting it from a list it doesn't work and the Default Fallback is called.
In the simulator it show the right "text" when I click on the list.
Have I done something wrong or did I need to specify something in the list?
This is how the list is generated
This is my intent
This is what happens in the simulator if I click on the "easyTravel" item in the list (it trigger the default fallback intent)
This is what happens in the simulator if I type "easyTravel" (the right intent is executed)
To catch a click on a list I need an intent configured to be triggered by the event actions_intent_OPTION
Only once I read this question - and your anwser - I could fix my own problem. Just to share: if you are using a webhook and are waiting for a webhook actions in your script, you can create a new intent, which has the event as #Edo states: actions_intent_OPTION. If you define an action in that intent, this is what will be trigger by your webhook. You can then get the parameter by (node.js):
const param = app.getSelectedOption();
Without the 'empty' intent, with the event and action, I was not receiving any input.

Get Started button appears but posback not coming to server

Based on this documentation Get Started Button - Messenger Platform I have created a get started button. I got this result from CURL
{
"result": "Successfully added new_thread's CTAs"
}
The button appears properly, but when clicking on the button the postback is not triggering in my webhook.
I have all the following fields in app settings
message_deliveries, message_echoes, message_reads, messages,
messaging_account_linking, messaging_checkout_updates,
messaging_optins, messaging_payments, messaging_postbacks,
messaging_referrals
Other bot text processing works properly.
Anyone faced this issue?
----[EDIT]----
It seems there are multiple page access token assigned to the hook, for each page access token we need to set the menu.
I have deleted and re-created the app then it started working

Appium+android+selenium switch

I have login scenario in which when the user click on the signin button then the next activity is opened in which there is a list. i am new to appium and find it hard how to get the validation that the login is successfull.
I didnt got success with the below
driver.switchTo().window((String)driver.getWindowHandles().toArray()[windowIndex]);
please guide how to get the current activity & move to awaiting activity, so that i can validate the object existance.
Can you just share the screenshot of the next activity and while launching your apk file with the starting activity name , there is no further need to specify the next activity names. Appium will run the next concurrent activitiesby itself.