Send additional information to the bot

Hi, I would like the bot to know the URL that the user is currently on.

Our chat widget works across our site, but for example, if the user says “Is this product still available?”, I would like the bot to have the information that the chat widget is currently on the page www.example.com/product-a (and then be able to look up info for product-a to see whether it is still available).

I’m using the REST API, like below:

{"sender": sender, "message": message}

Is there a way for the client to append to this (e.g. add current URL string), and have it available in the tracker for use in custom actions?

Or can you think of a better way?

Thank you

Hi @justingodden

You can add metadata in your API request to add the URL.

You may have to create a custom connector as the text suggest the default Inputchannel ignores all the metadata. You will get metadata info in your tracker.