Hidden fields allow you to use data that you already have, to make your Joonbot more personal, to relate info to a specific user or simply to give you better data in your results.
Hidden fields are interesting for four things. It stores the information you already have to:
- use it during the conversation
- trigger a specific conversation based on it
- complete info you have on your users
- track where users come from (i.e. social media channels)
- segment your audience for deeper insights and analysis
How do hidden fields work?
Hidden fields allow you to add and use data that you already have directly in your conversation whatever the format you use.
Hidden fields are variables. So you can reuse them like usual variables using {{}}.
How to add hidden fields in a bot?
Hidden fields always start with "JB_", so that we avoid using keywords reserved for other usages.
Add hidden fields in a full-page bot
Adding hidden fields on a full-page format is very easy:
1. Take your full-page bot link and add a question mark in the end.
https://page.joonbot.com/03b636fa36?
2. Add your hidden fields variables with their values separated with a "&" like below.
https://page.joonbot.com/03b636fa36?JB_email=john@acme.com&JB_first_name=John
3. You have two choices:
- You can add raw info like above.
- You can use dynamic data. For example, if you have an email app that allows you to create variables like Mailchimp or Mixmax, it's very powerful!
Let's say you want to send a feedback bot to your employees. You use Mixmax and you have a mailing list with the first names. You can create an email asking for feedback like below so that you will be able to know who answered what and also be able to call everyone by his name during the conversation.
Add hidden fields in a widget or embedded chatbot
You can also add hidden fields in a widget bot:
1. Add hidden fields variables with the "window." prefix after the Joonbot widget id part.
<script async type="text/javascript"> !function () { if (window.JOONBOT_
WIDGET_ID) { console.warn("Joonbot snippet included twice"); } else {
window.JOONBOT_WIDGET_ID = "0292407f-3175-4321-8a97-8eca6c05d4d4";
window.JB_source = "landing_accounting"; var n,
o; o = document.createElement("script"); o.src = "https://js.joonbot.com/
init.js", o.defer = !0, o.type = "text/javascript", o.async = !0,
o.crossorigin = "anonymous"; n = document.getElementsByTagName("script")[0]
, n.parentNode.insertBefore(o, n); } }() </script>
2. Now, you have two choices:
- You can add raw info like above. In this case, you want to track the source to have analytics about what landing page works the best so you specify on which landing page is the bot.
- You can use dynamic data from your database. For example, you can get the name of the guy connected to your app. In this case, ask a developer to attribute the variables to data he has in the code.
Pro tip:
- Hidden fields are case-sensitive. If you add an upper-case, it will appear like that in the conversation and your results.
- You can pass text in the hidden field with a space. You need to replace the spaces with "%20" in order for the hidden field to appear with the space in the conversation and your results. Your URL would look like this:
https://page.joonbot.com/03b636fa36?JB_full_name=John%20Doe
- You can encode any character using UTF-8 percent encoding.
How to recall hidden fields?
Question and text blocks
You can recall hidden fields in an element of conversation using {{}} like a usual variable.
Logic jump
If you want to create a logic based on a hidden field, you need first to create a variable using the "variable" block that equals the hidden fields. Then you'll be able to create a logic with this new variable.
Calculation block
Unfortunately, that's not possible, Joonbot can't detect the hidden fields is a number.
URL block
Not possible also.
If you want to send a recap email to your customer, it's easy!
Zapier
Let's say you want to send the data collected in Airtable using Zapier.
So with Zapier, when you need to use the hidden field data, write it with {{}} like that:
Google Sheets
If you want to send data to Google Sheets, the same applies.
Comments
0 comments
Please sign in to leave a comment.