Configuration

Last updated:

How to use existing data from your website in your flow

When you already have data available on your website that you want to use in your flow, you can send this data to Qonfi by setting them in window.qonfiVariables in JavaScript.

window.qonfiVariables = {
    "allergies": "nuts, soja"
};
window.qonfiVariables = {
    "allergies": "nuts, soja"
};
window.qonfiVariables = {
    "allergies": "nuts, soja"
};

Once you've set your data inwindow.qonfiVariables, you can use this data as variables in your flow. For example, if we already know a user has certain allergies, we don't want to match any products that contain ingredients the user is allergic to.

Example 1: Use known customer from your website data in your flow

1. Add an if/else node to collect variables.

Screenshot 2025-04-04 at 10.33.09

Edit the answer of the if/else node and set the variables to the variables provided in window.qonfiVariables.

Screenshot 2025-04-04 at 10.27.30

2. Add if/else nodes with conditions based on the allergy variable.

In this example, we want to check for both nuts and soja allergies.

Screenshot 2025-04-04 at 10.27.14

For each if/else node, add the correct conditions to the answers. For example, for the "Nuts allergy: Yes" answer, we want to add a condition where we check if "Variable allergies -> contains -> nuts".

Screenshot 2025-04-04 at 10.34.46

3. Add the matching rules to the if/else node answers.

In the "Matching" section, add the correct matching rules to the if/else node answers so we filter out any products that contain ingredients with the users' allergies.

Screenshot 2025-04-04 at 10.26.23

Tip:The above example shows how we can use website data to match products. However, you can also use these variables to skip questions, do calculations etc.

Example 2: Starting your flow at a specific step based on an URL path

You can start your Qonfi flow at a specific step based on the URL path of the page where the flow is embedded.

This is useful when you have different entry points to the same flow. For example, you could send users directly to a specific step when they visit /car-parts/headlights/halogen, /car-parts/headlights/led, or another URL path.

You can use the URL path to set a variable in window.qonfiVariables, and then use that variable in your flow to determine where the user should start.

1. Set the URL path in window.qonfiVariables

On your website, read the current URL path and pass it to Qonfi using window.qonfiVariables. For example:

window.qonfiVariables = {
    "start_path": window.location.pathname
};
window.qonfiVariables = {
    "start_path": window.location.pathname
};
window.qonfiVariables = {
    "start_path": window.location.pathname
};

If the user visits: https://example.com/car-parts/headlights/led the start_path variable will contain: /car-parts/headlights/led.

2. Add an if/else node to check the starting path

Add an if/else node at the beginning of your flow to collect the website variables.

Screenshot 2026-09-23 at 16.53.24

Click the answer and switch to the variables tab and define the variables you want to collect.

Screenshot 2026-09-23 at 16.43.55

Next, add another if/else node to see if we already know the headlight type. Create an answer for each URL path that should start the flow at a different step.

For example:

  • Headlights/LED → Start the headlights-LED-related questions

  • Headlights/Halogen → Start the headlights-halogen-related questions

  • Unknown → Start the flow from the beginning

Screenshot 2026-09-23 at 16.47.12

Edit the answers of the if/else node and add conditions based on the start_path variable.

Screenshot 2026-09-23 at 16.44.05

This allows the flow to determine which path the user should take based on the URL they entered from.

Summary

As you can see in the screenshot below, we collect the variables, determine the entry point for a user in the "Headlights type from website" step and if this is still unknown (for example the user just entered the flow from the /car-parts/headlights path), the user will simply start with the "Headlights type" question.

Screenshot 2026-09-23 at 16.43.44

Was this article helpful?

Yes

No

Need help?

Can't find what you're looking for? Our team is happy to help.

Contact support

Live within an hour. No developers needed.

Turn doubts into confident purchases.

4.8 rating · 300+ shops already chose Qonfi
Fox
Not sure where to start?
Book a 20‑minute demo with Fox
Loading available times…