IntelliTicks
  • Introduction
  • Getting Started
    • Overview
    • Build your first playbook
      • Start with Pre-build Templates
      • Start from scratch
  • Installation
    • IntelliTicks Plugin Script
    • Plugin Installation
  • Facebook Messenger Bot
    • Getting Started
      • Connect Facebook Page
      • Link Playbook to Messenger
    • Testing FB Messenger Bot
  • WhatsApp Bot
    • Benefits of WhatsApp Chatbots
    • Getting Started
    • FAQs
  • AI Builder
    • Playbooks
    • Nodes
      • Add and Send Data
        • Text
        • Image
        • Links
        • Youtube
        • Gallery
        • Dynamic Node
      • Collect User Data
        • Quick Reply
        • Form
        • Datepicker
        • Web View
        • Payment
        • Rating
        • Slider
        • Ask Question
        • Mutli Selection Reply
        • Quick Reply (with branches)
      • Redirect Users
        • URL redirect
        • Conditional branching
        • Go to Playbook
        • Jump to node
      • Export & Import
        • JSON API
      • Connect Users To A Human
        • Notify Agent
        • End Automation
      • Additional
        • Wait
        • Client Javascript
        • Actions
    • Actions
    • FAQ Training
    • Keyword Training
    • Advanced
      • Advanced Actions
  • Flash Responses
    • Flash Response
    • Create Flash Response
    • Using Flash Response
  • Customizing Platform
    • Widget
      • Theme Customization
      • Chat Widget Texts in Local Language
      • Adding Start Over button
      • URL Rules
      • Advanced Customization
        • How to Easily Add Custom CSS to Chat Widget
    • Chat icon/Bot Profile Photo
    • Different chatbot on each URLs
  • Integrations
    • WordPress Integration
    • Shopify Integration
    • Shopify Installation via Private Apps
    • Google Analytics
    • Magento Integration (1.x)
    • Magento Integration (2.x)
    • LeadSquared Integration
    • Marketo Integration
    • Salesforce Integration
    • Zapier Integration
      • Data Available in Zapier
    • Zoho CRM Integration
    • Wix Integration
    • Custom/in-house CRM integration
  • How to
    • Change the Default Playbook
    • Schedule meetings on calendar
      • How to integrate calendly for meetings
      • How to integrate Acquity for meetings
      • How to Integrate YouCanBook for meetings
    • Block a User
    • Delete a User
    • Hide trigger message from website
    • How to show chatbot in right middle of website
    • Start chatbot on a button click
    • Create chatbot landing page
    • Customize Landing Page Link
    • Enable Notifications on browser
    • Popup bot on Facebook page automatically
    • How to send data to chatbot via Javascript
  • Growth Hacks
    • Facebook Retargeting
    • Messenger Ads to chatbot
  • Troubleshooting
    • Messenger Bot is not working as expected
    • How do I remove the Messenger app in Shopify?
    • Push Notification Issues
  • Partnerships
    • White-labeled Chat Platform
    • Affiliate Partnership
  • Miscellaneous
    • Languages Supported
Powered by GitBook
On this page

Was this helpful?

  1. How to

Start chatbot on a button click

PreviousHow to show chatbot in right middle of websiteNextCreate chatbot landing page

Last updated 4 years ago

Was this helpful?

You can link any playbook with a button on your website so that when a user clicks on a button on your website, the particular playbook is launched.

For this, you will have to update certain code in your website, so that a Javascript code runs on a button click. Below are the steps for the same.

Login: Login to the admin panel and go to AI builder from the left menu. (To access AI builder, you must have the Owner role. You can check your role from the Team menu on the left sidebar)

Get Playbook Id: Select any of the web playbooks you would like to run on a button click. Hover to playbook name on the left sidebar, click on 3 dots to open Menu, and click on "Copy Id". Copy the playbook Id and note it down somewhere, it will be needed in the following steps.

Update code on your website: Below is the code you need to run to start the playbook. It will trigger the playbook, the message will be shown to the user as a popup next to the chat icon. Users can click on that to open the chat widget.

iticks.call('playbook', '<playbook id>');

Below is the code which will trigger the playbook and open the chat widget as well.

iticks.call('playbook', '<playbook id>');
iticks.call('show', 'maximize');

In the above code, you need to replace the <playbook id> with the id copied in the 2nd step.

Different ways to place the code on your website.

Once you have picked the code and replaced the playbook id, below are some of the ways you can use it to run the code on button click. You can have your own way of handling click events to run the code.

  1. HTML markup onclick

<button onclick="iticks.call('playbook', '<playbook id>');iticks.call('show', 'maximize');">click me</button>

OR

<div onclick="iticks.call('playbook', '<playbook id>');iticks.call('show', 'maximize');">click me</div>

2. Using jQuery to add click event on the button(Assuming id of the button is demo, but you can use any other selector as well)

$('#demo').click(function() {
    iticks.call('playbook', '<playbook id>');
    iticks.call('show', 'maximize');
});

See Demo