Activechat Manual
  • What is Activechat?
  • New? Start here
    • The basics
    • Set up your first project
    • Install the chat widget
    • Upload the knowledge
    • Explore the CRM
    • AI-assisted live chat
      • How to set context for AI hints
    • Live chat mobile app
    • Build your first automation
  • Conversational AI
    • For Customer Service Teams
    • For Product Managers
    • For Innovation Teams
    • For Marketers
    • For e-commerce
    • For developers
  • Help Guides
    • Setting up your team
    • Managing conversations
      • Customer attributes
      • User tags and segments
      • Searching for specific users
      • Agent tags (live chat groups and queues)
      • Triggering live chat sessions from the bot
      • Notifications with the TRIGGER block
    • Managing knowledge
      • Uploading business data
      • Question answering and live chat hints
      • Fine-tuning the large language model
    • Natural language automation
    • Building automations visually
      • Customizing your welcome message
      • Adding new skills
      • Navigating skills
      • Copying skills and blocks
      • Handling errors
    • Improving your virtual agent
    • Using live chat AI hints
    • Customizing automatic website page messages
    • Tracking website actions
    • Facebook Ads automation
      • How to set up a Facebook ads bot
      • How to use buttons and quick replies in a Facebook ads chatbot
    • Lead generation
    • Zapier integrations
    • Customizing your project
      • How to customize the chat widget
      • How to customize the Facebook chat widget
      • How to change bot settings
    • Pricing guide
  • Fundamentals
    • Terminology
      • Intents and entities
      • Contexts
      • Skills and events
        • Built-in system skills
          • /start
          • /default
          • /_default_fallback
          • /_start_live_chat
          • /_page_visit
          • /_error
      • Conversation elements
        • Messages
        • Buttons
        • Quick replies
        • Galleries / carousels
    • Messaging channels
      • Website chat widget
        • Installation
        • Customization
        • Voice input
      • Chat widget landing page
      • Facebook Messenger
        • Connect your page
        • 24 hour rule
        • Message tags
        • Persistent menu
      • Telegram
      • Email
      • Twilio SMS automation
    • Intents and bot skills
    • Conversation insights
    • Grow tools
      • Landing pages
      • Messenger links and QR codes
    • Broadcasting
  • Visual builder reference
    • Sending messages
      • TEXT
      • LISTEN
      • IMAGE
      • MEDIA
      • GALLERY
      • FILE
      • EMAIL
      • SMS
      • LEAD
    • Triggering events
      • SEND
      • CATCH
      • TRIGGER
      • LIVE CHAT
    • Manipulating data
      • DATA
      • ADD TAG
      • REMOVE TAG
      • JSON
      • STATUS
      • VALIDATION
    • Conditional logic
      • SWITCH
    • Timers and delays
      • TIMER
      • WAITFOR
      • WAITUNTIL
    • E-commerce blocks
      • CATEGORY
      • PRODUCT
      • VARIATIONS
      • SIMILAR
      • UPSELLS
      • CROSSSELS
      • Shopping carts
        • ADD TO CART
        • UPDATE CART
        • SHOW CART
        • CLEAR CART
        • CREATE ORDER
    • Natural Language
      • NLP
    • System attributes
    • System events
  • Integrations
    • Google services
      • Connect your Google account
      • Google Sheets
        • Searching and updating Google Sheets data
        • Building galleries with Google Sheets data
      • Google Calendar
        • Searching for events
        • Creating and updating events
    • Shopify
    • WooCommerce
    • Dialogflow
      • Building an agent
      • Using entities
      • Slot filling
      • Context management
      • E-commerce NLP
Powered by GitBook
On this page
  • Setting up required parameters in the Dialogflow intent
  • Using Dialogflow slot filling with Activechat

Was this helpful?

  1. Integrations
  2. Dialogflow

Slot filling

PreviousUsing entitiesNextContext management

Last updated 3 years ago

Was this helpful?

Slot filling simplifies your conversational design and allows you to obtain multiple required parameter values for the from your chatbot user.

Let’s get back to our and its core “order_pizza” intent. When building this intent, we’ve introduced a “pizza_type” that allows customers to specify what kind of pizza they would like to order – Margarita, Four cheese, etc. Obviously, until the chatbot has this parameter in place, the delivery process cannot be started.

But what if the customer just says “I want pizza”? The intent will be triggered anyway, but the “pizza_type” parameter will be empty. Of course, we can check the value of this parameter with the block and ask which pizza the customer wants, but that will increase the complexity of the .

Imagine adding other parameters to the intent – like “pizza_extras”, “delivery_address”, “delivery_time” etc. If we had to check every parameter, the complexity of the skill will grow exponentially.

Luckily, if you’re using a agent for natural language understanding there’s a better way – slot filling.

Setting up required parameters in the Dialogflow intent

When you create the intent definition in Dialogflow, you can mark some (or all) parameter values as “required”. In this case, Dialogflow will keep prompting the user until these values are in place. It will use pre-defined questions to fill in the value of each parameter and mark the intent as complete only when every parameter is available.

To set slot filling prompts in Dialogflow, go to the intent definition and click the “Required” checkbox to the left of the parameter name. Then click the “Define prompts” link and enter some variations of the question that will help chatbot users fill in the value.

Declaring intent parameters as required

When you click “Define prompts”, a pop-up will appear and you will be able to enter some variations of the question that Dialogflow will ask to set the value of that parameter. As with multiple responses, one of the variations will be picked up randomly to make your chatbot conversation feel more human.

Do not forget to click “SAVE” when you’ve finished adding prompts.

Now, if you test your intent in the console and do not specify pizza type in the original utterance, Dialogflow will use these prompts to help you complete the intent.

Using Dialogflow slot filling with Activechat

To use a native Dialogflow slot filling with Activechat, you will need to make a small change to the skill that handles that intent. We’ve built the integration for maximum flexibility, so you can choose how exactly the slots should be filled – either with Dialogflow prompts or with extra questions in the skill itself.

Use this logic to make Dialogflow slot filling work with Activechat integration:

Click “RUN” to build your chatbot and deploy it to the cloud, and test your slot filling in the Messenger:

Defining prompts for “pizza_type” parameter entity
Slot filling in Dialogflow console

When Dialogflow detects a specific intent in the user’s utterance, the skill for that intent will always be triggered immediately, even if there are some required parameters missing. But you can use the $_nlp_action_complete to check if the parameters are in place. The value of this attribute will be “true” when all required parameters are available, and “false” otherwise. If some parameters are still missing, prompts from Dialogflow will be available in the $_nlp_speech attribute.

How to do Dialogflow slot filling in Activechat

IMPORTANT: if you’re using Dialogflow-style slot filling, make sure you select “New session: No” in the settings. Otherwise, each request to Dialogflow will create a new session and the history of slot filling will be lost.

Disable the “New session” in the NLP block settings
Slot filling in the actual chatbot conversation
system attribute
NLP block
intent
SWITCH
skill
Dialogflow
entity
simple pizza ordering chatbot