BookIt for Forms - Chatbot Integration with Intercom - Smart Booking Link

Have more questions? Submit a request

Contents

 

Overview

This guide will walk you through integrating your Intercom chatbot with LeanData's BookIt For Forms to provide prospects with a scheduling link directly through chat. If you have any questions during setup, feel free to contact LeanData Support.

 

Setup

Create a Custom Data Attribute in Intercom

In order to enable us to link a BookIt submission to Leads or Contacts created by your chatbot, LeanData requires that you add a new custom people attribute named ld_bookit_log_id.

⚠️ Important Note:  Please make sure the “Prevent updates via the Messenger” setting is toggled off so that LeanData can update this field with a random unique ID via Intercom’s JavaScript API.

 

Decide where in your Intercom chatbot flow you'd like to provide the prospect with a scheduling link. This should occur after you've collected all the information needed for BookIt routing.

Once that point is identified, you can configure a chatbot message that includes a link using the following format:

https://app.leandata.com/r?id=<insert org id here>&nodeName=<insert node name here>&isUsingHerokuId=true&chat=intercom&uid=<insert ld_bookit_log_id variable here>&firstname=<insert variable here>&lastname=<insert variable here>&email=<insert variable here>...

This link consists of two parts:

  1. the Base Link 
  2. Routing Data Query Parameters.
https://app.leandata.com/r?id=<insert org id here>&nodeName=<insert node name here>&isUsingHerokuId=true&chat=intercom&uid=<insert ld_bookit_log_id variable here>

You’ll need to configure the following values in your link (remove the angle brackets <> when replacing with actual values):

  • <insert org id here> — This is your “BookIt Org ID”, which LeanData uses to identify your organization. You can find this in your LeanData product under:
    BookIt > Settings > General > Scroll down to BookIt Org ID.
  • <insert node name here> — The name of the Trigger Node in your BookIt for Forms FlowBuilder graph where submissions should enter.
  • <insert ld_bookit_log_id variable here> — Intercom variable that injects the value of the ld_bookit_log_id custom data attribute (added in a prior step). Variables can be added to a link within Intercom as shown below.

 

 Routing Data Query Parameters

Next, add any data you’d like to use for routing decisions in your BookIt graph by appending them as query parameters. These use Intercom variables to pull in data from your chatbot flow.

Example:
If you want to pass a prospect’s first name, last name, email, and industry, you can append the following to the base URL, replacing <insert variable here> with the Intercom variables corresponding to each field.

&firstname=<insert variable here>&lastname=<insert variable here>&email=<insert variable here>&industry=<insert variable here>...
⚠️  Be sure to remember the exact query parameter names (left-hand side of the =  e.g., firstname, email) as you’ll need to reference these in a later configuration step.

 

New Chat Prospect Trigger Node

 

You will need to set up a New Chat Prospect Trigger Node to map the fields collected from your chatbot to your BookIt FlowBuilder graph.

From the Node Bar, drag in a New Chat Prospect Trigger Node and open it.

 

In the Form Field Mapping section, set up the mappings between the data being sent via the smart link URL to the Variables they will correspond to in your FlowBuilder graph. The Form Field API names in this case will be the keys (names specified on the left hand side of the equals sign) of the query parameters in your smart link.

 

After creating your mappings, in the Trigger Edge section, direct the Insert edge of New Chat Prospect Trigger Node to the next step in your graph or you can do so visually from within the FlowBuilder interface.

 

Webpage Setup

Finally, you will need to add the following line of code anywhere after the code used to import Intercom on the web page that hosts your chatbot.

Intercom('update', {
"ld_bookit_log_id": window.crypto.randomUUID(), });
⚠️  Note: this requires your webpage to be secure (HTTPS)


For additional assistance please submit a ticket to LeanData Support.

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share