Messenger code passing parameters to the chatbot


(Augusto Vera) #1

Hello is there a way to capture a parameter from the facebook messenger code, or even generate a FB Messenger code within Flowxo that includes a parameter to pass to the chatbot (for example store number or location) and then pass it to the chatbot flow?.


(daniel.beckett) #2

Hi @Augusto_Vera

If you’re building your bot on either the Web Messenger or Facebook messenger then you are able to pass referral parameters on the bot URL. For example, you could append a users unique referral ID as a parameter to this URL and provide them the link such as http://m.me/mybot?ref=referralID. The ref parameter is then be available as Metadata on the flow trigger.


(Augusto Vera) #3

Ok, what if you want to generate a messenger code that contains that parameter, is it via the trigger word or phrase that you pass this referral ID? then this is available also as metadata?


(daniel.beckett) #4

If using the Messenger Code from web tools then the trigger word or phrase is used to trigger a matching New Message trigger. It’s not going to pass in as metadata and instead would trigger the specified flow. Since you can generate separate Messenger Codes you could use different trigger words in a similar way that referral links would be used.


(Augusto Vera) #5

Ok I made a quick test, generated 2 codes, one with the word “Tienda1”, and another with the word “Tienda2”, then connected a chatbot, to a page, then 2 flows with the corresponding trigger words “Tienda2” and “Tienda2” but both flows are being triggered, if I scan “Tienda1” code, then Tienda1 flow responds first then Tienda2 flow responds after. If I scan “Tienda2” code, then Tienda2 flow responds first and then Tienda1 flow responds also afterwards.




(Augusto Vera) #6

Ok I rebulit the flows and codes with drastically different words and it seems to be working now, maybe they werre corrupt or somethin’


(Augusto Vera) #7

OK I found this: you cannot make a flow and then copy it, change the activation word and expect it to work. If you do that the FB code will activate both even though tere is a different trigger word in the second. You have to create it from scratch to work which is not good if you have to copy it several times and they are similar flows.


(Augusto Vera) #8

Somehow at the end it worked, even with duplicated flows, the first two never worked.


(daniel.beckett) #9

Hi @Augusto_Vera

It looks like Word & Phrase Matching was picking up a match for both flows as the trigger words were too similar. You could add a Filter to your trigger so that it only accepts an exact match or you would need to be using trigger words which aren’t similar to one another.


(Augusto Vera) #10

I see, I will do that then for very similar words, thanks for your hint!