Use the Memberstack data you have during the conversation to make it more personal and avoid asking non-value-added questions.
Memberstack is great for managing user accounts and profiles. Sending data from Memberstack to Joonbot is a breeze. To do that you'll use hidden fields!
Here are the steps to follow:
1. Choose the login data you want to reuse in your Joonbot and grab their names.
2. Write a script like below and put it in the <head> of your website.
This script will pass the current user data to the bot.
It's easier if you put it in the layout so it's called on every page.
<script>
MemberStack.onReady.then(function(member) {
if(member.loggedIn) {
window.JB_USER_EMAIL = member["email"];
window.JB_USER_NAME = member["name"];
}
})
</script>
JB_USER_EMAIL and JB_USER_NAME are the hidden fields that you'll recall in your Joonbot.
Hidden fields have to start by "JB_" and must be in capital letters. For more details, you can have a look at our help article on hidden fields.
member["email"] and member["name"] are the names of your fields in Memberstack.
It depends on the form you created.
For example, if you created a form asking for the first name, last name and email and you want to reuse those data in your Joonbot, then your script can look like this:
<script>
MemberStack.onReady.then(function(member) {
if(member.loggedIn) {
window.JB_USER_EMAIL = member["email"];
window.JB_FIRST_NAME = member["first-name"];
window.JB_SECOND_NAME = member["second-name"];
}
})
</script>
For info, to reuse the memberstack data into Joonbot we use the Memberstck Front-end API. You can know more about the Memberstack Front-end API here.
3. Then, to install the widget or the embed version, add the script available in the share tab of your Joonbot account in the <head> section of the page where you want to display the Joonbot.
4. Done!
Comments
0 comments
Please sign in to leave a comment.