Skip to main content

Drupal

Overview

In this guide, we'll go through how to integrate your AI Assistant into your Drupal. Here's an overview of what we'll cover:

  1. Obtaining a token for Drupal integration
  2. Syncing Knowledge Base items
  3. Adding the Quickchat AI Assitant to Drupal

Obtain token for Drupal integration

  1. Activate Drupal integration within the Integrations tab of Quickchat AI app.
  2. Copy your scenario_id and token.

Enable module

Enable the Quickchat module to provide the API client used by the sub-modules. No configuration is needed at this point.

Sync knowledge base items

Configuration

This module will add a new content type quickchat_kb (admin/structure/types/manage/quickchat_kb) and a view quickchat_kb (/admin/structure/views/view/quickchat_kb) so you can use them as a source to train your chatbot models.

You can configure the module from (/admin/config/services/quickchat-api/sync), defining:

  • A model name
  • A scenario_id
  • An API token
  • A view name: the view to use as a source of knowledge base items (you can use the one provided by the module or a custom one).
  • A view display: the display from the view name selected above.

From that screen, you can add multiple models with a different pair of token and scenario_id and view source.

View

In case you want to use a different view as the source of knowledge base items, be aware that if you want to split the results into different knowledge base items, you need to use the \n separator. Otherwise, the view results will be considered as only one knowledge base item.

Operation

Once you have configured the sync model mappings, the next step is to sync the knowledge base items for your chatbot models. You can do this by navigating to /admin/content/kb.

In this section, you will see a list of the configured models:

If you click in the title of the model to sync you will see a page similar to this one:

In the preview section you can see the knowledge base items that you are about to sync. The values displayed there are the results of the view and view display that you selected under the model configuration section.

The available actions are Update and Rebuild:

The Update action will push the knowledge base items to the selected model (scenario_id), and the Rebuild action will retrain the chatbot with the updated knowledge base items.

Add a Quickchat AI Assistant

The quickchat_chatbot sub-module adds a new block type chatbot_block where you can set the scenario_id.

Also, you can add multiple chatbot blocks with a different scenario_id for different type of pages, eg:

Once you enabled the block, visit the pages where the block should be available (visibility settings) so you can interact with the chatbot.

That’s it! 🎉 Your Drupal integration is now ready. If you have any questions or require a more complex solution with more functionality, please do not hesitate to get in touch.