How to: Generating a URL with your chatbot (Legacy)

A chatbot can be used in many different ways and a chatbot as a sales assistant is becoming more common every day. But how can you really use a chatbot successfully for sales? By automatically giving your customers the right product suggestions!

By asking a few targeted questions, your chatbot can easily and automatically create a link to the right page, so that customers can go directly to the desired product and complete their purchase.

Why is this useful?

If you have an online shop with many different products (or a website with a lot of targeted content), it can be difficult for customers to find what they’re looking for. A chatbot can provide the perfect solution by asking what someone is looking for and then creating a direct URL to the desired product. This way your customers only have to open the page and they are one step closer to conversion without any effort.

With this Best Practice, we show you how to set up your chatbot to automatically lead customers to the right pages.

What do you need to realise this?

A Standard, Business or an Enterprise license of Watermelon

A clear structure of URLs on your website


Get started!

As an example in this Best Practice we use the fictitious web shop of Watermelon. Here customers can buy different products, such as towels, t-shirts and hoodies, in different colours.

To make sure that customers can make the right choice between the products, but can also select a color right away, we start by setting up the Watermelon platform correctly. To do this, we first create a number of ‘Custom fields':

  1. Log in to the Watermelon platform, go to Settings by clicking on the gear icon and then select ‘Custom fields'.
  2. Create a new custom field. You can read how to do that in this article.
  3. Give the new field a recognisable name, in this example we will call this field ‘Item’.
  4. Set the field type to 'Long Text', and the 'Unique' selection to 'No'.
  5. In this example we will also create a second custom field for the colour of the product.


Now that the custom fields have been created it is time to create a new conversation. You can do this simply by following the following steps:

  1. Navigate to the Chatbot menu.
  2. Under the 'Add Knowledge' heading, create a new conversation and fill in the question variations.
  3. Start this conversation with a text module. In this example we will use, "Hello, what are you looking for?";
  4. Then add multiple-choice buttons with the products available. In this example, we will create three buttons: Towel, T-shirt, and Hoodie.


When you have created all the buttons it is important that they are linked to the first custom field. This way you ensure that the custom field is automatically filled with the content of the selected button. 

  1. Select a button and click on the round icon underneath the button and choose the option 'Auto fill custom field';
  2. Next you select which custom field you want to be filled in. In this example we will choose the 'Item' field. (Note! This option is only available when no other modules have been added under button yet)
  3. Repeat for all other product buttons and end the conversation with a 'Link to conversation' module.


Now that the customer can choose a product, it is also important that they can select the right colour. To do this, create a separate conversation for selecting the colour.

  1. Under the product button, place a 'Link to conversation' Module.
  2. Click 'Save and Close' at the top left.
  3. Create a new conversation and give it a recognisable name, in this example we'll call it 'Colour Selection'.
  4. Again, fill in any question variations and start the conversation again with a Text module. In this example, the chatbot continues with the question "What colour do you want?".
  5. Again, create multiple-choice buttons here with the available colours. We use the options Black, White, and Red here.
  6. Per button, again add the action to automatically fill in a custom field, only this time select the second custom field; Colour.
  7. Close this conversation with a 'Link to conversation' module.

Now that the customers have the ability to select both the product and the colour, let's move on to the conversation where the chatbot actually generates the URL.

  1. Create a new conversation and fill in the question variations;
  2. Start this conversation with a text module. Our example chatbot says: "Here is the link to your beautiful [item]:". To actually fill in the chosen product in the text, click on the custom field button, at the bottom of the text box. This allows you to choose which field to reuse in the chatbot's text.

  1. Next, add the URL of your website and again use the custom fields to place the filled in values at the appropriate places in the URL. In our example, the URL will be:[Item]-[colour].

In the platform, this looks like this:

  1. Finish this conversation neatly and check that in all previous conversations the 'Link to conversation' modules point to the appropriate follow-up conversations.

You are now ready to try out the chatbot!

Testing the Chatbot

Now that you've got the chatbot all set up right, we can finally see it in action!

You cannot try this feature in the internal tester, since custom fields are not filled in there. Therefore, test this on your website or on a test page.

When a customer opens the chatbot, they will now be asked what product they are looking for. When choosing the right button, the chatbot will then also save the choice in the correct custom field and then does the same with the follow-up question about the color. 

When recommending the product, you'll see that the chatbot then also automatically fills in the chosen product in the text "Here's the link to your beautiful [item]:" and then neatly fills in the product and the chosen colour in the URL as well.

All the customer has to do now is click the link. Shopping has never been so easy!

This Best Practice will make it even easier for your customers to find the right content on a website. Do you need extra help with setting up your chatbot? Please contact us and we will be happy to help you!