LogoLogo
WebsiteGuide & TutorialBlogBook a Demo
1.0.0
1.0.0
  • Acquire Developers Hub
  • Acquire
    • Acquire Build Requirement
      • Requirement For Acquire
      • Acquire Speedtest
  • JS API
    • JS Live Chat API
      • Description
      • Installation
      • Visitor
      • Thread
      • Conversation
      • User Verification
    • Quick Link Support
      • One Click Button
      • Social Media Share
    • Backend JS SDK
      • Setup Backend JS SDK
      • Demo Backend SDK
    • Advanced
      • Widget UI
      • Reference
  • Co Browse APIs
    • Acquire Co Browse
      • Co Browse API
  • Acquire API Events
    • WebRTC Related Events
  • iOS
    • SDK Setup Guide
      • Getting Started
      • Integration Guide (Core)
      • Integration Guide (Lite)
      • Manual Setup iOS
      • Acquire Account ID
    • SDK Configuration Example
    • iOS Cobrowse
    • Theme Setting
    • iOS Push Notifications
    • Verify your users
  • Android
    • Getting Started
      • Integration Guide (Core)
      • Integration Guide (Lite)
      • Start using Acquire
    • Acquire APIs
    • Acquire Delegates
    • Custom UI/widget
    • Cross Platform Integrations
  • Webhook API
    • Webhooks Basic
      • Introduction
      • Webhook Integrate Steps
      • Webhook Format
    • Webhook Events
      • On Chat Start
      • On Chat Accept
      • On Chat Message
      • On Chat Close
  • REST APIs
    • OAuth
      • Authorization
      • Tracklog
    • Profiles API
      • Profile List
      • Thread
      • Feedback
      • Profile Details
      • Message
      • Tags
      • Profile Agents
      • Campaigns
      • Profile Add Update
      • Profile Delete
      • Profile Visit History
      • Sender Emails
    • Chat
      • Chat Notes
    • Analytics
      • Chat Statistics
      • Team Analytics
      • Conversion Rate
      • Chat Tag
      • Co browsing
    • Agent
      • Agents List
      • Agent add
      • Edit / Get-agent
      • Update
    • Trigger
      • Triggers List
      • Triggers Detail
    • Operating Hours
      • Save Operating Hours
      • Get Operating Hours
    • Cobrowse
  • Chatbot API
    • Chat Bot
      • Integrate Your Chatbot
      • Dialog Flow V1 Chat-Bot
      • Dialog Flow V2 Chat-Bot
      • Dialog Flow Fulfillment & Custom Response
      • IBM Watson Integration
      • Amazon Lex Bot
      • Azure's QnA Maker
      • Webhook Calling & User Verification
      • Webhook For Reset Password
  • Knowledge Base APIs
    • Help Docs Setup
      • Get FAQ Categories
      • Get Setup Details
      • Get Side List
      • Get Article
      • Get Recent Article
      • Get Categorized Articles
      • Get Suggestion
  • Errors
    • API Error Handling
      • HTTP Responses
Powered by GitBook
On this page
  • Make An Intent
  • Fulfillment Code
  1. Chatbot API
  2. Chat Bot

Dialog Flow Fulfillment & Custom Response

PreviousDialog Flow V2 Chat-BotNextIBM Watson Integration

Last updated 5 years ago

The following guide will help you build customised responses using the Dialog Flow dashboard.

It may sometimes be necessary to capture visitor details such as the name, email, hash value and browser details. This helps information is only shared with “Acquire” and are accessible only by the “Fulfillment” section. A web-hook can be created inside the Dialog Flow to help capture this information.

In Fulfillment, it is possible to create functions and then link them to a particular intent. In the event a particular question is raised, dialog flow assistant will trigger that Fulfillment function and provide a response accordingly.

Make An Intent

First, create an intent such as “Get premium amount” with the question “What is my premium amount?”. Then under "Fulfillment" heading, select "Enable the webhook call for this intent".

Fulfillment Code

Here we can set the Bot responses as required. We can develop or write custom functions such as calling of a web-hook to perform any calculations, etc.

First, create a function handler such as ‘getPremiumAmount’.

Within this handler we can make use of the method request.body.queryResult.outputContexts to capture visitor details.

Appropriate code can be written inside the function getPremiumAmount, as shown below, to calculate the premium amount for that client and the result can be passed to the Bot using the following method:

agent.add('Your premium amount is $' + premium_amount);

After creating this handler it can be mapped to an intent using the following method:

intentMap.set('get premium amount', getPremiumAmount);

This allows you to manage your own customised responses as required.

The following shows how the conversation flows and triggers the appropriate fulfilment response using the custom function getPremiumAmount.