I'm using FAfA to track my Messenger bot's metrics and set up custom events to do so. So far so good :)
I've noticed that prior to mine, FAfA recorded events and assigned IDs to my bot's CTAs such as cta1_EntBusinessMessageWithItems_408510376182130_0 or cta1_EntMessengerCommerceCTAList_1280259528710236_0.
To be more specific, here's an excerpt of the list that prompts when I visit my "Event Debugging" section and filters by "Messenger bot CTA clicked"
What I've noticed so far :
There are three types of "Messenger bot call to action" : platform_api, messenger_composer and structured_menu
There are two categories of cta1_ IDs: cta1_EntBusiness...who only pops with a platform_api "Messenger bot CTA Type" and cta1_EntMessenger...
In cta1_EntMessengerCommerceCTAList_1280259528710236_0, the last digit is not an index. My first thought was to change it as this kind of ID is often associated with a structured_menu "Messenger bot CTA type`, index 0 would have represented the first button of the Messenger bot's menu, index 1 the second and so on.
As seen on the image posted above, there are different kind of "Click on a Messenger bot call to action" : postback_cta_success, postback_send_failed, postback_failed, postback_cta_clicked and composer_cta_double_tapped.
When creating a segment in my "Retention" section, everything gets messed up with the events parameters : "Messenger bot CTA type" shows values from "Messenger bot CTA clicked" and "Messenger bot CTA ID" shows values from "Messenger bot CTA type" !
Howevever, I tried copy & paste a CTA ID generated by FAfA in "Messenger bot CTA ID" event's parameter and it worked : a percentage more or less important of my audience were picked up.
I can deal with the bugs in my "Retention" section but I can't find which CTA in my bot is linked to the CTA IDs FAfA has generated : What action performed the user when cta1_EntBusinessMessageWithItems_408510376182130_0 successfully happened ? Which button with this cta1_EntMessengerCommerceCTAList_1280259528710236_0ID the user clicked ?
No ID has been set up as it seems you just can't do it : https://developers.facebook.com/docs/messenger-platform/webhook-reference/postback
I also did some researches on Stack & Google about the types of CTA, their IDs etc... Found nothing helpful. I'm sure I'm not the only one to face this problem with FAfA, especially among the guys who are building bots and desperately need to tracks their metrics... Please help !
Related
I have a dialogflow requirement to present user a payment link, on the click of which I must hang on 20 seconds (show some busy image or something) and then call on the next Intent.
So far I have been able to present a link using LinkOutSuggestion/BasicCard button. But I do not have idea that how I can make my program proceed further. I know there is a approach to have user input something like "Check Payment", but can we skip this altogether and just pass on to next intent post click of that LinkOutSuggestion or BasicCard Button?
The only way you could skip the part of the user having to input something in the chat is by using a Suggestion. These suggestions cannot be added to a card or open a link, but they do continue the conversation with the text that is used, so you could add a suggestion saying Check Payment.
The linkout suggestion or buttons on card do not support a click event or the possibility to continue the conversation.
I have been working lately with Dialogflow to make chatbots to do some simple tasks. For instance with webhooks and youtube api where the user ask to show him a video and then the bot just answers with the youtube video url.
E.G.
USER SAYS
Show me Neil young harvest moon
AGENT SAYS
Here you go : https://www.youtube.com/watch?v=n2MtEsrcTTs
I do this by using a custom Entity I called "YoutubeQuery" I checked "Allow Automated expansion" and unchecked "Define Synonyms" then I just added 2 values "Kavinsky Night Call" and "Indigo Night Tamino"
In my Intent I just made a couple of training phrases like these:
And everything works.
Now my issue is with a new Agent which I called Orders
I want just to get Order Id's from the firestore database, but before getting there I'm running in kind of a huge problem
I defined the order's ID entity just like the one with the youtubeQuery. And I added some example Order ID's , I want them all to Start with OD and have 4digits after example (DX0001,DX0009,DX9999)
Afterwards I made the intent
Now unless I give the EXACT order ID's from the traininphrase or the ID examples I defined in the Entity it will always give me a response with an empty parameter OrderID
I start my intent by saying "my order" then I get prompted with "What is your ID?
So when I give an ID that has not been used in the training phrases of the Intent I get an empty value in the parameters like this:
But when I give an ID that has been used in the training phrases like for instance the first one DX0808 it does work...
How can I make this work without adding all the possible order id's ranging from DX0001 to DX9999 in the training phrases or the entity.
I mean it does work for my youtube query, I can put anything there it does "catch" the value. Any help please?
It looks like the required parameter is the problem here, my suggestion would be to:
Create intent to get the order id in one sentence without reprompt (turn off required on the order id) and id is always present, ex: "my id is DX0402". Include training response where only ID is provided like "DL3932", ex. below:
Set other intent for scenario when customer wants to provide the id but it is missing, for ex. customer says: "my id" and make your bot ask for the id as an response ex. "ok, provide me your id"
If you do it, in case user doesn't provide the id, intent 2 will be triggered and after id is provided you'll trigger intent 1.
Hope this makes sense.
I'm creating a bot in DirectLine. I'm trying to use SuggestedActions to display a suggested action and I don't want to include the text attribute for that. When I try to run my code without the text attribute, I see a blank message being displayed. How can I avoid that?
My code
var msg = new builder.Message(session)
.suggestedActions(
builder.SuggestedActions.create(
session, [
builder.CardAction.imBack(session, "disconnect", "Disconnect"),
]
));
session.send(msg);
The Output i'm getting:
Per my understanding, you want a button which is shown absoluted at bottom and always display to remind your agent that he can disconnect conversation any time.
However, per me testing and understanding, in my opinion, there 2 points that it's maybe not a good idea to achieve this feature:
SuggestedAction is based on Messasge in Bot framework. And basically Bot application is for conversation. So every message between user and bot renderred in different channels should always be contained in a textbox, shown like in your capture. We cannot bypass this feature.
Per your requirements, I think you want this button should be always display unless the agent click it. But I didn't find any feature like this in Bot framework, and you may need to send this meesage additionally beside every message from bot, which is not graceful and will raise unpredictable risk.
My suggestion is that you can create a triggerAction to handle global disconnect requests. Refer https://learn.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-dialog-actions for more info.
This isn't a code related question. On https://dev.botframework.com/bots/channels , i am unable to add the cortana channel to my bot because it wont save my cortana configuration. It keeps saying "The form is not complete" and
"Please check to make sure you have filled in all required fields" when all the fields are clearly filled.
I'm not sure if this is your issue, but currently there is a bug in the Cortana config page with the Display name and Short description fields. These fields have a limit of 30 and 50 characters respectively. However they come prefilled with information from your bot settings, and if your bot description is longer than 50 characters, it will block your submission and won't say which field is the problem. Make sure your Display name is 30 characters or less and your short description 50 or less.
Update: This bug should be fixed now.
This is my first time doing cucumber, so maybe what im asking isn't wrong but it just seems like there is a better way:
So right now im going through a survey-like website as my first automation task with cucumber. It works just fine, but like most surveys theirs a lot of "Fill then out, then click Next"
so in my Feature file I have a lot of:
Then I will click 'Next'
Which matches with the step (Since the button all have the same text):
Then(/^I will click 'Next'$/) do
click_button('Next')
end
So this one step definition defines like 8-9 lines in my feature file...which I guess is ok, but my feature file just looks...ugly? Im not used to the Gherkin language AT ALL as this is my first time, but it's basically turned into a lot of:
THEN SELECT THAT THING FROM DROPDOWN
THEN CLICK THIS RADIO BUTTON
THEN SELECT THIS BUTTON
THEN CLICK NEXT
Like over and over....I mean it's human readable, but it just looks messy? is this right?
Also im not really sure when I should use "explicits" in my feature file? Like should I explicity say Im going to select 'X' (or "X", not sure if it matters) from a dropdown? or Click the 'Next' button or select the 'yes' radio button for example?
You are writing what are called imperative steps and it is indeed the wrong way to go about cucumber/gherkin.
Your steps should be saying "WHAT" you are doing and not "HOW" you are doing.
Not knowing the details of your form, let's make up a flow.
Page 1. Name
Page 2. Demographics
Page 3. Favorite football team
Page 4. Favorite basketball team
Page 5. Results page showing how popular their teams with other survey takers
Given I enter the "Are you a Bandwagon Fan Survey"
When I enter my name
And I enter my demographics
And I choose a favorite football team
And I choose a favorite basketball team
Then I should be directed to the result page
And I should see my teams ranked on a graph
The details for entering your name and clicking next should be hidden inside that stepdef. A person trying to test your app doesn't care what the name is, or what the field ID is or anything like that. They just want to know the work flow.
If you are doing scenarios to get the name page to error you simply modify your gherkin to say something like.
When I enter a name too long
Then I see a name too long error message
When I do not enter a name
Then I see a name missing error message
Again, you leave the details of too long or what the error message is to the step def (or below) unless it is critically important to the test scenario. I usually set up factory girls to handle my data and just use the text of the scenario to pull the current data. so I'll have an error message factory and within that a "name_missing" and a "name_too_long" sub-factory that provide the correct values. If I need to change or look something up, everything is in the same place...but above all it's not cluttering my gherkin.
Yes I think you want to send parameters to step definition
Then I will click 'Next'
Step definition will be
Then(/^I will click "([^"]*))*"$/) do |text|
click_button(text)
end
also above will work for
Then I will click 'OK'