0.1.0 • Published 4 years ago

tuliplivechat v0.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Tulip Live Chat

This project hosts the JavaScript chat widget that connects customers using a web portal, to stores and associates using the Tulip LiveConnect on iOS. This feature is known as Tulip Live Chat.

The widget itself is called the LiveConnect Web Chat Widget.

Deployment

This widget can be installed either via NPM / yarn, using Google Tag Manager, or linked in HTML.

Package Manager

Include the package in your project using npm:

npm add tulip/liveconnect-web-chat-widget

or yarn

yarn add tulip/liveconnect-web-chat-widget

Using Google Tag Manager

Many e-commerce web platforms can use Google Tag Manager to inject events and actions into their storefront.

Directly in HTML

Include the widget directly in the HTML of your web site.

TODO: <script src="https://jsdelivr.com/">

Use the Widget

Initiate the TulipLiveChat object with a configuration:

const tlc_config = {
    integration_id: YOUR_INTEGRATION_ID
}
TulipLiveChat.init(tlc_config)

and open it with an action on the web site. For example:

<a href="#" onClick="javascript:TulipLiveChat.open()">
    Chat with an Associate near you!
</a>

Configuration

Configuration options are provided when initializing the widget.

The most important configuration value is the integration_id which will identify your widget to Tulip. Tulip will provide you with this value when you purchase Tulip Live Connect.

The widget can be styled and have its text changed via configuration.

Complete configuration options are described: TODO

Local Development

Tulip Live Chat uses yarn as its package manager and script runner.

yarn install

... installs all your dependencies.

You might be missing browserify and uglify-es in your command line toolkit. If so, run:

yarn installtools

"Building" makes a tuliplivechat.js bundle in build/. That will be a standalone file that can be included in a <script> tag in HTML without dependencies (see index.html example)

yarn build

You can watch for changes and test on 'index.html' using:

yarn watch

Cleaning removes the built files and node_modules:

yarn clean
0.1.0

4 years ago