Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Go to Haptik Website
  • Contact Us
  • Home
  • Deployment
  • Web SDK

How to deploy a bot on my website?

Written by Medha Anand

Updated on June 26th, 2023

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Getting Started
    Build Deploy Analyse Manage Account Bot Deactivation
  • Bot Building
    Essentials Smart Skills Steps User Messages Bot Responses Entities Connections Customisations User feedback collection Testing Whatsapp Bots NLU Bot Maintenance
  • Smart Agent Chat
    Set up Admin Settings MyChats Section (Agent Inbox) Live Traffic Section Teams Section Archives Section Analytics Plans on Smart Agent Chat
  • Conversation Design
    Design Basics Design Guides Designing for Platforms Designing WhatsApp Bots
  • Developer Guides
    Code Step Integration Static Step Integration Shopify Integration SETU Integration Exotel Integration CIBIL integration Freshdesk KMS Integration PayU Integration Zendesk Guide Integration Twilio Integration Razorpay Integration LeadSquared Integration USU(Unymira) Integration Helo(VivaConnect) Integration Salesforce KMS Integration Stripe Integration PayPal Integration CleverTap Integration Fynd Integration HubSpot Integration Magento Integration WooCommerce Integration Microsoft Dynamics 365 Integration
  • Deployment
    Web SDK WhatsApp Facebook Instagram Sunshine Conversation LINE Google Business Messages Telegram MS Teams Bot as an API iOS SDK Android SDK
  • External Agent Tool Setup
    Zendesk Chat Salesforce Service Cloud Freshchat Zoho NICE CXOne Gorgias
  • Analytics & Reporting
    Intelligent Analytics
  • Notifications
    SMS Notifications Success Measurement
  • Commerce Plus
    Catalog Integration Bot Building Guide Channel Deployments Unified ML Pipeline Documentation
  • Troubleshooting Guides
    Error Messages FAQs
  • Release Notes
+ More

Table of Contents

Table of Contents Introduction Prerequisites Installation Complete Example

Table of Contents

IntroductionPrerequisitesInstallationComplete Example

Introduction

The Haptik JavaScript SDK is a completely modular conversational interface. It renders a complete chat experience that can be easily integrated across different web environments.

The footprint is tiny, it supports SSL, and works asynchronously – so it won’t block your website.

Prerequisites

Before Integrating the SDK make sure you have these:

  • Business ID
  • Client ID
  • Base URL

You can acquire the above by simply clicking on the share bot option on your bot, as shown.

Installation

The installation is a fairly simple process. Add the following script at the bottom of the HTML page before the closing tag.

<script>
 window.haptikInitSettings = {
 "business-id": "<business-id>",
 "client-id": "<client-id>",
 "base-url": "<base-url>",
 };
</script>
<script
 type="text/javascript"
 charset="UTF-8"
 src="https://toolassets.haptikapi.com/platform/javascript-xdk/production/loader.js"
></script>

Complete Example

<!DOCTYPE html>
<html>
 <head>
 <title>Haptik JS SDK Integration Demo</title>
 <meta charset="UTF-8" />
 <meta content="width=device-width; initial-scale=1.0;" name="viewport" />
 </head>
 <body>
 ...Some HTML Code Snippet...
 <script>
 window.haptikInitSettings = {
 "business-id": "<business-id>",
 "client-id": "<client-id>",
 "base-url": "<base-url>",
 };
 </script>
 <script
 type="text/javascript"
 charset="UTF-8"
 src="https://toolassets.haptikapi.com/platform/javascript-xdk/production/loader.js"
 ></script>
 </body>
</html>

Ensure <meta charset="UTF-8" /> tag is added in the source code. In case it is not added, you might see some encoded or gibberish text on the bot.

Delete

Sending Notifications in a Bot with Web SDK Integration

If you integrate your bot into an Android or iOS app using Web SDK then it is not possible to send push notifications out of the box. In such cases, if you want to send push notifications you can use the Web SDK settings from the platform deployments page.

Setting up notifications

  • Go to the Platform Settings page and scroll to the Web SDK section.
  • The callback URL is auto-populated. This is a unique identifier for your business.
  • Then enter the Secret Key which is used to authenticate your business.
  • Finally, enter the Webhook URL. This is the URL the notifications will be sent as a request.
  • Save the configuration and activate it by turning the "Active" toggle on.

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • What are the SDK customization methods available?
  • Which all browsers is my website bot compatible on?

Platform

  • Conversation Studio
  • Smart Skills
  • Advanced NLU
  • Intelligent Analytics
  • Omnichannel
  • Smart Agent Chat
  • Enterprise Security
  • Integrations

Solutions

  • Conversational Commerce
  • Lead Generation
  • Customer Care
  • WhatsApp
  • Conversational IVR
  • Google Business Messages

Industries

  • Retail/ E-Commerce
  • Financial Services
  • Travel & Hospitality
  • Telecom

Knowledge

  • ROI Calculator
  • Reports & Research
  • Case Studies
  • Webinars
  • ISAT
  • Tech Blog
  • Business Blog
  • Resources
  • Haptik v/s Yellow
  • Haptik v/s Liveperson
  • Haptik v/s IBM Watson
  • Haptik v/s Verloop
  • Conversations on AI

Company

  • Why Haptik
  • About Us
  • Careers
  • News & Media
  • Awards & Recognition
  • Contact Us
  • Partnerships
  • Investor Relations

Subscribe

Sign up to recieve the latest updates

Find us on

  • Twitter-footer
  • Linkedin-footer
  • YT-footer
  • Insta-footer
  • G2-footer
  • Facebook-footer

Knowledge Base Software powered by Helpjuice

Copyright © jio Haptik Technology Limited 2021 | Data Security & Privacy Policy | GDPR

North America | Asia Pacific | Africa | enterprise@haptik.ai

Definition by Author

0
0