Moments allows you to open any web apps right in the chat window. From a developer point of view, it’s an embedded website in iframe which is shown during a chat. Click here to read more.
How to start
You should start by preparing your first Moment app. You can use one of our examples or use our bootstrap project build on Glitch platform - it’s ready to publish, integrated with Moments SDK and easy to fork and adjust to own needs.
To simply get started with creating your moments app add
@livechat/moments-sdk as dependency to your project:
and then import
createMomentsSDK function which is exported as default from package.
Initialized method for the Moments SDK. You can pass additional properties:
title- Application title, will be placed on Moment’s titlebar
icon- URL to Application icon, will be placed on Moments title bar
Sends a message as a visitor in currently active chat. Parameters:
text- Message text
Set customer’s properties. Parameters:
customProperties- customer’s additional data object
Close Moment app.
This method has no parameters.