Filter by Url, ex: send message #1 on page ABC and send message #2 on page XYZ

(John Way) #1

Hi is there is a way to filter based on page url? This is for a Web Messenger bot.

My use case is to make the bot more intelligent by being aware of the page. That way, if the user is on product ABC and types “help”, the bot can reply with help options specifically for ABC. Similarly, if the user is on product XYZ and types “help”, the bot can reply with help options specifically for XYZ.

(Daniel Beckett) #2

Hi @John_Way,

This could be done by passing information into Metadata by using the Web Messenger API.

Thanks,
Dan

(John Way) #3

Hi @DanielBeckett,

I noticed that I can only set Metadata once per page load. Is there any work-around for that? My application is a ReactJS app, so most pages do not have a hard refresh.

(Daniel Beckett) #4

@John_Way

I’m not too sure about this, sorry. The only possible workaround I can think of is to use the sendMessage method to specify a new set of Metadata.