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
  1. JS API
  2. Backend JS SDK

Setup Backend JS SDK

PreviousBackend JS SDKNextDemo Backend SDK

Last updated 5 years ago

if you want to load acquire full backend on any page or inside your backend then follwing sdk is what you need to setup that.

First you'll need to load acquire script and use below acquire js code to configure SDK and indentify agent and account details so we can load full visitor list and all required parts of acquire.io to let agent handle all chats, visitor list etc.

You won't be able to access all parts of app.acquire.io but only dashboard part, where you real time visitor list and live statics and chats etc.

also using this sdk we'll append simple iframe inside your page, which will have funcionlaity and that iframe sholud be managed at your end. you can adjust that iframe's width height etc..that will be inside body element of your page.

make sure you've maximun possible width and height on iframe otherwise things may not work properly and this iframes also do not support responsiveness, so if your page support responsive design then inside this iframe content it won't be responsive

<script src="https://s.acquire.io/bare-backend.js"></script>

<script>
   acq_backend.load(ACCOUND_UID, AGENT_EMAIL, AGENT_API_KEY,{
      visitor_list:true, 
      // load visitors or not
      auto_close_window_on_chat_close: false, 
      // auto close window when chat close
   });
</script>

Get All Parameters

First login acquire dashboard ( ) and open Agents. You see all agents details like : ACCOUND_UID, AGENT_EMAIL, AGENT_API_KEY

How to get Agents details using API

SDK Parameters

visitor_list:true/false (default: true)

This parameters tells sdk to not load visitor list, this will be helpfull in case of where you want to automate few things.

auto_close_window_on_chat_close :true/false (default: false)

This is also helpfull parameters when you planing for some automation, suppose you open backend iframe and do something like automaic start cobrowse with visitor then you may want to close that window upon chat close, so passing true here simply means that whenver chat gets closed window will get closed too.

Automatics Cobrowse

To automating cobrowse with code, you can use following method on sdk object.

<script>
    window.acq_backend.startCoBrowse(YOUR_CODE);
</script>

Demo:

Note: This url is just for demo purpose do not use this as iframe.

if want to get all agents details use acquire agent REST API ( ). Agent API in you can get agents all details and make a own dashboard.

When you logged into you can see demo of backend intgration as well for currently logged in user on following url

https://developer.acquire.io/rest-apis/agent
https://developer.acquire.io/rest-apis/agent
app.acquire.io
https://app.acquire.io/bare-backend.html
app.acquire.io
Agents List