- Embed the Script
- Initialize the SDK
- Customize the SDK
- Authenticate Users
1. Embed the Script
- Embed the script directly inline. See the instructions below.
- Use a tag manager to control where and how the scripts load. The ASAPP Chat SDK works with most tag managers. See the tag manager documentation for more detailed instructions.
<head>
element.
- Creates a
<script>
element that asynchronously downloads thehttps://sdk.asapp.com/chat-sdk.js
JavaScript. - Creates a global
ASAPP
function that enables you to interact with ASAPP’s JavaScript API.
2. Initialize the SDK
After you Embed the Script into the page, you can start using the JavaScript API to initialize and display the application. To initialize the ASAPP Chat SDK, call theASAPP('load')
method as seen below:
APIHostname
and AppId
values will be provided to you by ASAPP after coordination between your organization and your ASAPP Implementation Manager. Once these values have been determined and provided, you can make the following updates:
-
Replace
API_HOSTNAME
with the hostname of your ASAPP API location. This string will look something like -
Replace
APP_ID
with your Company Marker identifier. This string will look something like'examplecompany'
.
ASAPP('load')
will make a network request to your APIHostname and determine whether or not it should display the Chat SDK Badge. The Badge will display based on your company’s business hours, your trigger settings, and whether or not you have enabled the SDK in your Admin control panel.
For more advanced ways to display the ASAPP Chat SDK, see the JavaScript API Documentation.