Start a conversation with initial parameters defined on url

(Robert Cavalcante) #1

Hello guys,

I would like to know if there is a way to catch on flow some variables that are defined on messenger url.

Example : The customer receive a url to messenger like this “www.m.me/bot?ref=HelpMePlease” and then, the first message the bot will send to customer must be : “Hello, did you said ‘HelpMePlease’ ?”

Thanks for your attention,

Bob

(Daniel Beckett) #2

@Robert_Cavalcante

When you use a ?ref= value to connect to your bot it will pass the ref value as metadata. For example you could have an action (or even catch-all flow) filtered to run only if the metadata equals a certain value:

2 Likes
(Robert Cavalcante) #3

Perfect !

This resolves my problem.

Thank you Daniel!

See ya

(Andrew Catchpole) #4

This is a great feature - thanks.
Am I correct in assuming that:
a) only the catch-all flow is ever triggered?
b) “ref” is the only metadata?

(Karen Barker) #5

Hi @Smartview_Property

If you have a keyword trigger of “Start” this would also get triggered if the user is a new user to the bot but generally we would advise using it with a catch-all flow yes.

It depends on the platform as to whether or not ref is the only metadata - on Web Messenger we collect other data which is in stored in the Metadata as follows:

(Andrew Catchpole) #6

Thanks for confirming @KarenBarker. It’s a good feature and one which I’ve now started to exploit. Regards

1 Like
(Andrew Catchpole) #7

@KarenBarker @DanielBeckett
I’ve noticed that if the initial parameter ?ref= contains the “&” special character then the “&” and all following characters are ignored and not passed in the catch-all metadata. It would be really useful if all the full parameter string including the “&” could be passed to the catch-all metadata. This is because I want to use the initial parameter and metadata in the flow to make an HTTP request without having to manipulate the metadata before passing to the HTTP function.

W3C recommends that all web servers support semicolon separators in addition to ampersand separators to allow application/x-www-form-urlencoded query strings in URLs within HTML documents without having to entity escape ampersands.

In Flowxo, characters such as Comma “,” and plus “+” characters are replaced with a blank space. A Semicolon “;” is replaced by a “,”

I have found that a simple workaround is to use %26 which is successfully passed in the metadata i.e. the %26 replaced by the “&”. It works but the query is less human readable.

I look forward to your thoughts on this point.

(Karen Barker) #8

Hi @Smartview_Property,

Unfortunately at present we do only support the ampersand separator for data being sent on a URL and therefore you will need to encode any ampersands as %26 that you want to send as part of the data I’m afraid.

I will however raise this internally as a possible future feature enhancement. :slight_smile:

(Andrew Catchpole) #9

@KarenBarker Okay thanks for confirming. At least there is a workaround and I’m still impressed by all the rich features in Flowxo. Regards Andrew :grinning:

1 Like