GitBook Lens AI

The follow up prompts are a great way of expanding the original users query, by offering additional prompts that may help the user more so when searching for an answer.

How to enable lens

To turn Lens 'On' : Navigate to your 'Customize' tab and select configure as shown below. Once there, simply toggle Lens on.

Once your Lens has been activated, let's take a look at how powerful Lens can be when adding it to your Website chat, or even automating support directly on your Facebook and Instagram posts!

The magic

This tiny flow below will change the way you manage your entire automated and human assisted support!

Adding the app to your chatbot

To add the GitBook Lens AI chatbot app to your workspace, we have already created a getting started flow for you. Once you download the flow all you need to do is add your GitBook API key and SpaceID and you are ready to let the automation take over 'sorry employees' 😂

App set up

To connect your Gitbook documents takes literally 5 seconds:

  • Open the Mini-apps tab

  • Install app

Once you have selected the GitBook Lens app, it will be added to your mini apps screen. The next step is to select the settings tab 'as shown below'

Now add your GitBook API key in the area displayed below.

Creating the flow

Open up a new sub-flow in your selected channel or omnichannel project. The first node you need to create is a Question node. This enables a users to input some text so your chatbot can store it within a custom field. The type of question node is 'Message'. Let's go ahead and create the node below:

GitBook Action Step

The next step is to create an Action step. Once you have the action open - select the Integrations tab, scroll down and select the Gitbook Lens AI app. Then add it. It will now display as shown below.

Gitbook SpaceID

The next step is to open the GitBook Lens app and add your space ID into the field provided. To find your space id, naviagte to your Gitbook account and select the workspace you want to use. Within the url string you will see a long stream of random letters. This is your workspace ID.

For example, our SpaceID is: RaLazqQDW4JMiGe2iyKg

Paste your SpaceID into the box within the app as shown below.

Now we need to add the custom field values that store the users query and fields that store the responses.

Note: Ensure that the custom field in the User Query box, is the same field used in the previous question step. In our example the field that stores the users question is called {{gitquery}} and we use the same field in the User Query box above.

Response mapping: In the response mapping area we are storing two forms of data:

  • GitBook Response

  • Query Follow up response

The GitBook Response: Is the returned answer from the users query. Whereas the Query follow up response are additional question prompts that GitBook have added to help guide users to explore more answers.

Response Step

The next step is to create another question step. Within this question step the GitBook response will be displayed to the user. Along with the Query follow up response.

First create a new question step > now add the git response custom field 'that was used in the GitBook lens app under the response mapping'

Next is to save response to the other custom field gitquery. This is so that if a users askes another question it will go back through the GitBook leans app and return an additional answer.

Next, if you want to add the query follow up responses, ie: additional helpful prompts the user can tap to read more. Click the Dynamic answer button and follow the lower image here.

Dynamic response settings:

Using the custom field that the responses are stored in, copy the set up below.

Note: The section that is labeled: Limit to number of items. Means how many prompts messages would you like to display. We personally suggest 3

OK, that's you all set up and ready to automate your GitBook documents. Be sure to connect the nodes correctly as shown in the image below.

You will notice that from the last question node we have connected it back to the GitBook Lens app action node. And also connected the dynamic answer step back to the same GitBook Lens action.

Last updated