DIALOGGLOW can't trigger actions_intent_CANCEL and END A CONVERSATION [duplicate] - google-cloud-platform

Hey I'm a new Dialog Flow user, I love the application, but there is an issue I can't solve. My bot assistent actually is very simple is made by a simple menu with numbers, each number has a intent:
(1) How our business works
(2) Services
(3) Our benefits
(4) Project request
(5) Financial
(6) Meeting and appointments
(7) Contact
(8) Questions and technical support
Default fallback intent
Default welcome intent
Every numbers has a away to come back to the main menu, and a away to ask for a real assistent.
For exemple: Meeting and appointments (6)
We do weekly video call alignments, as well as you can follow the progress of the project on Trello. If you want to schedule a meeting time, send an email to gorilafreela#gmail.com, inform when, reasons, we use the https://meet.google.com platform for meetings. Type [X] to return to the menu. Enter [A] to request a real answer.
The problem is when the user decide to tap 'A' for request a real assistent. This should end the flow and stop doing a loop. I followed the official Google Dialog flow documentation and to finish the flow they suggested:
1 - Add event: actions_intent_CANCEL
2 - Set this intent as end of conversation
But even doing this steps, the conversation doesn't stop there. When someone call the real assistent dialog flow answer: What can I help ?, then the user ask his question, however it always go to fallback and the conversation does not finish there. I haven't integrated nodejs with dialogflow yet, but I think it isn't necessary to force a quit conversation. What can I do?

Related

Dialog flow, stuck in a loop conversation, can't trigger cancel event

Hey I'm a new Dialog Flow user, I love the application, but there is an issue I can't solve. My bot assistent actually is very simple is made by a simple menu with numbers, each number has a intent:
(1) How our business works
(2) Services
(3) Our benefits
(4) Project request
(5) Financial
(6) Meeting and appointments
(7) Contact
(8) Questions and technical support
Default fallback intent
Default welcome intent
Every numbers has a away to come back to the main menu, and a away to ask for a real assistent.
For exemple: Meeting and appointments (6)
We do weekly video call alignments, as well as you can follow the progress of the project on Trello. If you want to schedule a meeting time, send an email to gorilafreela#gmail.com, inform when, reasons, we use the https://meet.google.com platform for meetings. Type [X] to return to the menu. Enter [A] to request a real answer.
The problem is when the user decide to tap 'A' for request a real assistent. This should end the flow and stop doing a loop. I followed the official Google Dialog flow documentation and to finish the flow they suggested:
1 - Add event: actions_intent_CANCEL
2 - Set this intent as end of conversation
But even doing this steps, the conversation doesn't stop there. When someone call the real assistent dialog flow answer: What can I help ?, then the user ask his question, however it always go to fallback and the conversation does not finish there. I haven't integrated nodejs with dialogflow yet, but I think it isn't necessary to force a quit conversation. What can I do?

automic uc4 - email script fired off unexpectedly

In my UC4 work flow, I set up an email script, to email the team the completion of job. This script is set up on a dependency on 'ANY-OK' of a previous job.
However, the email script was always fired off in the beginning of the workflow, instead of the end/ When I open the job monitor, while previous jobs were still running, the email script shows as status - 'waiting for pre-predecessor' .
So how the email was sent when the email script is still 'waiting for pre-predecessor'?
two remarks:
is the "generate at runtime" flag set - otherwise this might be set up during generation time
is the mail-job started from somewhere else (different workflow, different schedule, via script command uc_activate_object, etc.) - if so and the information of recipient, message is "hardcoded" you will get the mail regardless if reached in the workflow. Check in the statistic-records, when and from which parent it was started
When we set up jobs in automic, our dependencies are set to the previous object completing with the 'all states must match' circle checked. Then we have an ELSE 'block. Some people have funky pre or postconditions. Also, it's not uncommon for yet another workflow to kick off another object within another job, which is also super fun to chase down. Automic compared to it's previous iteration Appworx is quite different, and sometimes not in a good way :)

Pepper: return to the start of the program if there is not interaction

I'm making a Pepper app with Choregraphe and I have a doubt:
Pepper has to maintain a conversation with a human user and the problem is that if the user "disappears", the app is in middle of an state, and if it doesn't get any interaction, it should got to the first state (return to the start of the program). The idea was to use a timeout of no response (like the timeout between machines). Is there a way to do this with Choregraphe?
PD: The project is big and there are a lot of boxes, so add a timeout box and link it to all boxes can be messy.
PD: I have been looking to make a trigger condition, but in the condition it should detect tablet interactions like touch or that user talk to the robot.
A good way is to put all the "lot of boxes" into a parent-box (new box/diagram box).
Thus when you time out, you just stop the parent box, and all the inner box will be stopped automatically.

Pepper: disable events temporally

I'm programming a Pepper app with Choregraphe to make a conversation. This conversations have some different sorted states:
Hello (start of conversation)
ask for information
Specify the information
Goodbye (end of the conversation)
To start a conversation, people have to get close to the robot and the robot has to detect a face.
The problem is that if I am in middle of the conversation and the robot detect another face, it starts the conversation at the beginning. So I need to disable the event temporally, while the robot is in a conversation. Is there a way to do it?
These are the events output of Choregraphe:
At your place, I would program it as a finite state machine: you decide your detection and the way to switch from one state to another, in a simple way. Each processing of one state is stopped when you change state.
You can download a simple state machine here: http://protolab.aldebaran.com/public/the_3_templates.zip
you cannot disable them on that format, but if you use the "subscribe to event" box, there are start/stop inputs that you can use to enable/disable the box, i.e. subscribe/unsubscribe to the events.
At the end I visit this part of documentation and looked at Engagement Modes.
To allow a wider range of behaviors, ALBasicAwareness provides 3 engagement modes that specify how “focused” the robot is on the engaged person.
“Unengaged”: (Default mode) when the robot is engaged with a user, it can be distracted by any stimulus, and engage with another person.
“FullyEngaged”: as soon as the robot is engaged with a person, it stops listening to stimuli and stays engaged with the same person. If it loses the engaged person, it will listen to stimuli again and may engage with a different person.
“SemiEngaged”: when the robot is engaged with a person, it keeps listening to the stimuli, and if it gets a stimulus, it will look in its direction, but it will always go back to the person it is engaged with. If it loses the person, it will listen to stimuli again and may engage with a different person.
I have used FullyEngaged and the robot only focuses on the first person that enter the robot Zone 1.
This is done like this:
basic_awareness = ALProxy("ALBasicAwareness", ip_robot, port_robot)
basic_awareness.setEngagementMode("FullyEngaged")
basic_awareness.startAwareness()

How to know if the user block the messenger bot

I want to know if the user blocks the chat bot. Going through the documentation I didn’t find a way to do it, so I had to create a work around.
I send a message to the user and create a flag of sending; then I use the sleep function for 10 seconds. Every time a user receives a message my code change the flag from sending to send. After 10 seconds, if the flag is still on sending means that the receiver didn’t get the message, so I infer that the chat bot is blocked.
There are some flaws with this work around like if the message takes more than 10 seconds to arrive and I don’t know why if I use the sleep function for >15 seconds, I get into a loop, and the Fb API start sending me requests.
Someone has a better solution??
I appreciate your help! (:
Check errors with code “10” subcode “2018108” or code “200” subcode “1545041”. These subcodes mostly define that user have blocked your bot/messenger conversation.
I tested today, with the latest iOS Messenger app, and I found out, that, for each of the following cases
User turns off messages
User taps on 'somethings wrong' -> report -> other / spam / inappropriate (=this is what you probably mean by 'block')
the Facebook Messenger API returns
{"error":{"message":"(#551) This person isn't available right now.","type":"OAuthException","code":551,"error_subcode":1545041,"fbtrace_id":"XXXXX"}}
Thus, the answer to your question is to check for error code 551, subcode 1545041. Be aware that you will get back the 'blocked' users lumped together with those who tapped on 'turn off messages'.
By the way, you are able to see the percentage of users who blocked a Messsenger conversation by going to the associated Facebook Page and tapping on the top row at 'Insights'.
Hope this helps others, it took me a couple of hours of my life, to learn this :)