Gorgias logo
Gorgias logo

All articles

Pre-fill the user messageUpdated 2 months ago

This suggestion isn't an official feature of our Chat widget, so our support for it is limited - we recommend that it be implemented by someone with a technical background.


You can direct your customers to a URL where the Chat will have a pre-filled message by using the query parameter gs_chat_message=mymessage where mymessage is your custom message.

The message must be URL encoded - the message "I want information on product..." must be URL-encoded as I%20want%20information%20on%20product....

The resulting URL to your store would be www.my-store.com?gs_chat_message=I%20want%20information%20on%20product...

You can use online tools to encode a string such as urlencoder.org.


If you want to pre-fill the user message input field, you can use the following method with a string parameter:

1<script>
2GorgiasChat.init().then(function() {
3 GorgiasChat.setCurrentInput('Hello !')
4})
5</script>
Was this article helpful?
Yes
No