fbpx
Reading:
Using Leadoo’s Lookup tool to pull information from table

Leadoo Help Center

Search

Using Leadoo’s Lookup tool to pull information from table

October 3, 2024

What is it?

The Lookup tool is one of Leadoo’s advanced bot-building features, allowing you to create more dynamic and interactive conversations in your Inpage, Chat or Visual bot.

By using the Lookup tool, you can integrate logic into your bot conversations to pull results from a table stored in your account. This can be useful for suggesting products, providing articles, offering downloadable content, or displaying course dates.

Note: If you don’t see the Lookup options in your platform, contact your Customer Success Manager to activate them.

Read on for two examples of how to use the Lookup tool in either a Chatbot or Inpage bot.

Use case #1: Delivering an eBook download

In this example, we have a selection of eBooks localised for different markets. For instance, a visitor on the Australian page will receive the Australia eBook, while a visitor on the German page will receive the German eBook, and so on.

We aim to use just one bot across all pages, making it easier to implement, build, and update.

Step 1: Create Your Table of Information

First, create a table with column headers and save it as a CSV file. The table should look like this:

URLButton textAsset URL
United KingdomDownload the eBookhttps://www.leadoo.com/unitedkingdomebook.pdf
GermanyDownload the eBookhttps://www.leadoo.com/germanyebook.pdf
SpainDownload the eBookhttps://www.leadoo.com/spainebook.pdf
FranceDownload the eBookhttps://www.leadoo.com/franceebook.pdf

Note: The button text is duplicated for each row to ensure it always displays correctly.

Step 2: Upload to Leadoo

Navigate to Conversion Kit in the left-hand menu, select General Bot Settings, and then choose Look-up Table, or visit this link: Look-up Table.

Click + Add New at the bottom of the screen. Name your table, then click Quick Import in the top-right corner to upload your CSV file.

Your table will now appear below. Note: Only the first 50 rows are visible for preview.

Lookup table Lookup Using Leadoo's Lookup tool to pull information from table
Lookup table 2 Lookup Using Leadoo's Lookup tool to pull information from table

Step 3: Use your table in your bot

Next, we’ll add a simple SingleChoice node with country options as an example of how the Lookup node works. This will serve as a starting point for more complex implementations. (You can automate this step based on the webpage URL—more on that below.)

Step 4: Create a New Variable

Open the Variables Panel and create a text variable called Country.

AD 4nXerxWD2n8kUX lemxOjKcx2dH199dOauGrgMWRbQ vSaSwrpTmEPTEzWD10R39mLmOuJBYTZWWQmfIlbVSBcHueFAsBSqUj6FP nKymXyVA3XhYdSA7vxysgLutkmOlScRioe7rdoI GUdZ3tBRd Lookup Using Leadoo's Lookup tool to pull information from table

Step 5: Add a SingleChoice with Options

Add a SingleChoice node to your decision tree and apply your variable to each option.
Click Show Options > Variables, and select your variable from the dropdown.
Set the operation to Set Value to, and type the country name in the Value box.

When the visitor selects a country, the bot will set the value of the Country variable accordingly.

AD 4nXclJU PKkuPLEst8b2tZ6ri oe1X quMLrolwU2B9yRNZBV1TFMqh96TwoCsQHnbKrBsn6dE7uQDl3WkV7khVqwUjree Lookup Using Leadoo's Lookup tool to pull information from table

Step 6: Add the Look-up Query Node

Next, add a Look-up Query node from the node menu.

Choose your table under Data Source, then configure the following:

  • Column: URL
  • Operation: Is Exactly
  • Rule: Select the Country variable.

Under Save Columns, choose Button Text and Asset URL. This is the information the bot will remember for later use.
Finally, give your query a name (e.g., “eBook Results”) for easy selection in the next step.

AD 4nXdLVYUm2JPmRiYwC30iHLMyNGaEVAOmg 0JKYhaTAaYw ggNmxjq d1zxMwGWF68baBXjgGV9S9ISacbA2cQJUrisowwlL PNI7JsuJ2A0MMH5 ywo8LObmwJM1CmC8GvHQZc2 Lookup Using Leadoo's Lookup tool to pull information from table

Step 7: Display Dynamic Content in a SingleChoice Node

Now, add a SingleChoice node and click the Dynamic tab.
Enter your question as usual, then configure the dynamic content:

  • Search Result from Query: eBook Results
  • Answer Text: Button Text (This is what will be displayed on the button.)
  • URL: Asset URL (This is the hyperlink.)
  • Open URL in: New Tab
AD 4nXcsCnVVAR20V1HTe7HFpWkYXtFNOerQHbexA5nrf4O3Tg6SDoNFrMa9Uzt4lshttoBSM1cAH0zyZlSUC2IF0NbO2uuLRGNAcPaf Lookup Using Leadoo's Lookup tool to pull information from table

Step 8: Add Success and Failure Nodes

Create a node for a successful download and one to handle cases where the Lookup fails.

Tip: If the button text doesn’t appear correctly, save your bot, reopen the node, and select Asset URL again in the URL field.

Lookup Using Leadoo's Lookup tool to pull information from table

Step 9: Test Your Bot!

Before adding your bot to a webpage, you can test it by adding a default value (e.g., “United Kingdom”) in the Dynamic Variables Panel.

Automating Step 4: Visitor Selection

If you have multiple assets across many pages, manually setting this up for each one isn’t scalable. You can automate this step by adding a variable that reads the webpage URL.

Note: For this automation to work, the visitor must have interacted with the bot (e.g., by selecting an option).

Step 1: Create a New Variable

  • Create a new variable called URL.
  • In the advanced options (click the three dots), select Read from > Window, and choose an object that contains the page URL (e.g., window.location.pathname).
  • Alternatively, for more advanced users, you can use Read from > URL and write a regular expression (RegEx) to capture specific parts of the URL.
AD 4nXfzdc0nQGDR26APsL gr9H1kbYBip tvhQg4lDl55AW4df76uzG7a LBW0qdNlJf81QtklXrh7NHOVx gVBSCKQuOE4rTWOiMJ19l cKfvsBpIpsv4zAiX3mO Lookup Using Leadoo's Lookup tool to pull information from table
AD 4nXfbdkxo9JvQyfqatnZ4Afwt3lE3ngDNmRKJZ4QLc1iHv uO N8glGY6OS6ebobMuMKKCEH18QD37OKXrTgd81WAuBjn v5acJd8FdmT exxUJYz1dbHCpTcLpxOXr0D1DV54i Lookup Using Leadoo's Lookup tool to pull information from table

Step 2: Adjust the Look-up Query Conditions

Change the operation to Includes/Like and select the URL variable under Rule.

AD 4nXfhJdIkF Lookup Using Leadoo's Lookup tool to pull information from table

Step 3: Test your bot!

⚠️ Testing the bot with the Read from Window/URL option active is not possible in preview mode, as it will look at the builder’s URL. To test within the platform, set a default value (e.g., “United Kingdom”), and temporarily remove the window object or RegEx.

Use Case #2: Displaying Course Dates

In this example, we’ll help visitors find the date and location of their desired course more quickly, without them needing to search multiple pages.

Step 1: Create and Upload Your Table

Create a CSV file containing the relevant course data. It should look something like this:

Course nameLocationDateCourse URL
Software Development IntensiveLondon12th May 2024https://www.learntocode.com/softwareintesive-london
Software Development IntensiveLondon15th June 2024https://www.learntocode.com/softwareintesive-london
Software Development IntensiveEdinburgh1st July 2024https://www.learntocode.com/softwareintesive-edinburgh
Software Development IntensiveEdinburgh1st January 2025https://www.learntocode.com/softwareintesive-edinburgh
Data AnalysisLondon15th May 2024https://www.learntocode.com/data-london
Data AnalysisLondon2nd June 2024https://www.learntocode.com/data-london
Data AnalysisBirmingham3rd September 2024https://www.learntocode.com/data-birmingham
Data AnalysisLiverpool3rd September 2024https://www.learntocode.com/data-liverpool
Data AnalysisLiverpool6th February 2025https://www.learntocode.com/data-liverpool

Step 2: Upload to Leadoo

Follow the same steps as outlined above to upload your table.

Step 3: Use Table Information in Your Bot

Now, we’ll gather two pieces of information from the visitor: the course name and the location. To simplify the build, add a Dynamic Variable for each option.

AD 4nXdqYf0ojkm3 xC2Y61euulCMHZEZCONja9dGpiuUMeSi6KO0DlZIz2iDpc Lookup Using Leadoo's Lookup tool to pull information from table

Step 4: Add a Look-up Query Node

Add a Look-up Query node, selecting your course table as the data source. Set two conditions:

  • Column: Course Name
  • Operation: Includes/Like
  • Rule: Course Name Dynamic Variable
  • Column: Location
  • Operation: Includes/Like
  • Rule: Location Dynamic Variable

Save all columns and name the query (e.g., “Course Dates”).

AD 4nXef7caPndz1r9sS1O0yux 6yuOWGysApv9kq6DZyKjImKUWIdm8V9Q902q0JGzjRQXBHzouse5Jj0GO 5fTV1jX9e12Pj3Jw1Y6W Lookup Using Leadoo's Lookup tool to pull information from table

Step 5: Display the Results

Add a SingleChoice node with the following settings:

  • Search Result from Query: Course Dates
  • Answer Text: Date

Also, enable an “Other” option, such as “Enquire About This Course,” to create a potential conversion.

Step 6: Test Your bot!

Test the bot to ensure it displays the correct course dates and functions as expected.

Updating Your Lookup Tables

To update your Lookup tables, first modify your original CSV file with the new information. Ensure that existing column titles remain unchanged, and if you need to add columns, insert them on the right.
Manually update your tables in General Bot Settings > Look-up Table, by selecting the table and clicking Update Lookup to upload the new CSV file. Your table will update automatically (only the first 50 rows will be visible).

AD 4nXdtpfDn1jRkv1zQfiFOK7EhOSH5ZzKviXal3IiN5Y3mBmdlEZBCZLt6Kam0it8J O0gWOG4NdW ge6tuPGj5z Lookup Using Leadoo's Lookup tool to pull information from table

For further assistance with the Lookup tool, contact your Customer Success Manager or our support team at [email protected].

Did you find this article helpful?
0 out of 0 found this helpful

Related Stories

You can now try Leadoo for FREE