Members
# constant AgentState
Defines the agent online possibilities from
Properties:
Name | Type | Description |
---|---|---|
ONLINE |
AgentState | State that agent is online and can receive new conversations, and can handle existing conversations. This state is used both for the routing service and for UI purpose |
OFFLINE |
AgentState | State that agent is offline, and cannot get new conversations, also current conversations are not handled anymore. This for the routing service internal usage only |
AWAY |
AgentState | State that agent is currently cannot get new conversations, and current conversation will be handled after undefined time. This is for UI purpose only |
BACK_SOON |
AgentState | State that agent is currently cannot get new conversations, and current conversations will be handled on a short time. This is for UI purpose only |
# constant AuthType
The different authentication types
Properties:
Name | Type | Description |
---|---|---|
NONE |
ConnectionType | no auth yet |
CONSUMER_ANONYMOUS |
ConnectionType | consumer jwt was made without a connectorId |
CONSUMER_UNAUTHENTICATED |
ConnectionType | consumer jwt was made with a unauthenticated connectorId: type=1 |
CONSUMER_AUTHENTICATED |
ConnectionType | consumer jwt was made with a authenticated connectorId: type=2 |
CONSUMER_UNDETERMINED |
ConnectionType | consumer jwt was provided, but the type is unknown |
CONSUMER_MOCK_AUTHENTICATED |
ConnectionType | consumer jwt is a mocked consumer auth |
BRAND_AUTHENTICATED |
ConnectionType | brand bearer token was created with user/password |
# constant ChannelType
Properties:
Name | Type | Description |
---|---|---|
MESSAGING |
ChannelType | the default channel type |
LIVE_CHAT |
ChannelType | |
COBROWSE |
ChannelType |
# constant clearConversationTimeout
The time to wait in MS after a DELETE is received before removing a conversation from the cache
# constant ConnectionState
An enum of the possible connection states
Properties:
Name | Type | Description |
---|---|---|
INITIAL |
string | the initial state, no connection has been attempted |
CONNECTING |
string | the connection is in the process of connecting |
CONNECTED |
string | the connection is established and ready to be used |
FAILED_TO_CONNECT |
string | the connection has never been established |
DISCONNECTED |
string | indicates that connection was connected but has disconnected |
CLOSING |
string | the connection is in the process of closing |
CLOSED |
string | the connection has closed and was intentional |
NULL |
string | no connection is possible or will be attempted |
Example
if (connection.state === ConnectionState.CONNECTED) {
console.log('connection is connected');
}
# constant ConnectionType
Used when creating a new connection, determines how to connect to UMS
Properties:
Name | Type | Description |
---|---|---|
WEBSOCKET |
ConnectionType | Requests and notification via websocket connection, the default type |
REST |
ConnectionType | Requests made via Rest API, notifications require a different path, not currently available |
SEND_API |
ConnectionType | Requests made via Send API, notifications require a different path, not currently available |
NULL |
ConnectionType | No requests will be made, all interaction with UMS will be handled externally |
# constant ContentType
An enum of possible content types
Properties:
Name | Type | Description |
---|---|---|
PLAIN_TEXT |
ContentType | |
HOSTED_FILE |
ContentType | |
RICH_TEXT |
ContentType |
# constant ConversationState
A enum of possible conversation states
Properties:
Name | Type | Description |
---|---|---|
OPEN |
ConversationState | The main dialog is open |
CLOSE |
ConversationState | The dialog with the consumer has ended. Agent activity is still enabled in this stage. |
LOCKED |
ConversationState | In this state any change to the conversation is forbidden, including agent note and topic. |
CLOSING |
ConversationState | an SDK only state, indicating that the client has requested the conversation to be closed, but we haven't received confirmation yet |
# constant csatStatus
An enum of possible csat statuses
Properties:
Name | Type | Description |
---|---|---|
FILLED |
csatStatus | Default value when csat is updated |
PARTIALLY_FILLED |
csatStatus | |
SKIPPED |
csatStatus | |
EMPTY |
csatStatus |
# constant DeliveryStatus
Specifies the type of AcceptStatus
Properties:
Name | Type | Description |
---|---|---|
ACCEPT |
DeliveryStatus | Client should report this status when getting the event from the server |
READ |
DeliveryStatus | Client should report this status after end-user read the event |
ENRICH |
DeliveryStatus | Client that wants to enrich a specific line with metadata should use this with the relevant metadata |
ACTION |
DeliveryStatus | Rich content status when user click on content (movie/url) |
ACCESS |
DeliveryStatus | Client should report this status after accessing an external resource like file attachment |
NACK |
DeliveryStatus | Client should report this status in case a message received by it is unknown and can't be handled |
VIEWED |
DeliveryStatus | Secure form status viewed by the client |
ABORTED |
DeliveryStatus | Secure form status client didn't get the form and didn't view |
ERROR |
DeliveryStatus | Secure form status client failed to generate token, agent should send the form again |
# constant DeviceFamily
An enum of the available device families
Properties:
Name | Type | Description |
---|---|---|
DESKTOP |
DeviceFamily | |
TABLET |
DeviceFamily | |
MOBILE |
DeviceFamily | |
PDA |
DeviceFamily | |
OTHER |
DeviceFamily | |
UNKNOWN |
DeviceFamily |
# constant DialogChangeType
A enum of possible dialog change types
Properties:
Name | Type | Description |
---|---|---|
CREATE |
DialogChangeType | Creates a new dialog, rarely used by clients |
UPDATE |
DialogChangeType | Change the given dialog |
# constant DialogCloseReason
A enum of close reason values that can be passed to dialog-change when closing a dialog
Properties:
Name | Type | Description |
---|---|---|
CONSUMER |
DialogCloseReason | |
AGENT |
DialogCloseReason | |
SYSTEM |
DialogCloseReason |
# constant DialogState
A enum of possible dialog states
Properties:
Name | Type | Description |
---|---|---|
OPEN |
DialogState | |
CLOSE |
DialogState |
# constant DialogType
The dialog type, all conversations will have a MAIN dialog, others are optional. Only one dialog can be active at a time.
Properties:
Name | Type | Description |
---|---|---|
MAIN |
DialogType | |
AGENTS |
DialogType | |
OTHER |
DialogType | |
POST_SURVEY |
DialogType | |
PRE_CONVERSATION_OPT_IN |
DialogType |
# constant Features
An enum of operating system types
Properties:
# constant Integration
An enum of integration types avaialble for ClientProfile
Properties:
Name | Type | Description |
---|---|---|
WEB_SDK |
Integration | |
MOBILE_SDK |
Integration | |
BRAND_SDK |
Integration |
# constant ParticipantChangeType
Properties:
Name | Type | Description |
---|---|---|
ADD |
ParticipantChangeType | |
REMOVE |
ParticipantChangeType | |
SUGGEST |
ParticipantChangeType |
# constant ParticipantChatState
Properties:
Name | Type | Description |
---|---|---|
ACTIVE |
ParticipantChatState | |
INACTIVE |
ParticipantChatState | |
GONE |
ParticipantChatState | |
COMPOSING |
ParticipantChatState | |
PAUSE |
ParticipantChatState | |
BACKGROUND |
ParticipantChatState | Indicates that the client app is in background state, needs to be sent in order to get Push Notifications |
REMOVED |
ParticipantChatState | an SDK only state, indicating that the participant has been removed from the dialog |
# constant ParticipantRole
Properties:
Name | Type | Description |
---|---|---|
CONSUMER |
ParticipantRole | |
ASSIGNED_AGENT |
ParticipantRole | |
AGENT |
ParticipantRole | |
MANAGER |
ParticipantRole | |
READER |
ParticipantRole | |
BRAND_BOT |
ParticipantRole | |
CONTROLLER |
ParticipantRole |
# constant ParticipantState
Properties:
Name | Type | Description |
---|---|---|
ACTIVE |
ParticipantState | |
SUGGESTED |
ParticipantState | |
REMOVED |
ParticipantState |
# constant RingState
The different states of a ring
Properties:
# constant RoutingSubscriptionState
The different states of a routing task subscription.
Properties:
Name | Type | Description |
---|---|---|
INITIAL |
RoutingSubscriptionState | subscription object has been created, but subscription request has not yet been processed by UMS |
SUBSCRIBED |
RoutingSubscriptionState | subscription is active, UMS has the subscription in memory |
UNSUBSCRIBING |
RoutingSubscriptionState | a request to create the subscription has been sent to UMS, but no response has yet been received |
UNSUBSCRIBED |
RoutingSubscriptionState | an unsubscribe request has been sent to UMS and potentially processed, once in this state, no more notifications will be emitted |
DISCONNECTED |
RoutingSubscriptionState | an SDK only state indicating an unexpected disconnect occurred and the subscription no longer exists in UMS |
RESUBSCRIBING |
RoutingSubscriptionState | an SDK only state indicating we started subscribing but haven't received confirmation of the subscription yet |
FAILED_TO_SUBSCRIBE |
RoutingSubscriptionState | a failure occurred attempting to create the subscription |
# constant SubscriptionState
The different states of a conversation subscription.
Properties:
Name | Type | Description |
---|---|---|
INITIAL |
SubscriptionState | subscription object has been created, but subscription request has not yet been processed by UMS |
SUBSCRIBED |
SubscriptionState | subscription is active, UMS has the subscription in memory |
UNSUBSCRIBING |
SubscriptionState | a request to create the subscription has been sent to UMS, but no response has yet been received |
UNSUBSCRIBED |
SubscriptionState | an unsubscribe request has been sent to UMS and potentially processed, once in this state, no more notifications will be emitted |
DISCONNECTED |
SubscriptionState | an SDK only state indicating an unexpected disconnect occurred and the subscription no longer exists in UMS |
RESUBSCRIBING |
SubscriptionState | an SDK only state indicating we started subscribing but haven't received confirmation of the subscription yet |
FAILED_TO_SUBSCRIBE |
SubscriptionState | a failure occurred attempting to create the subscription |
# constant UserType
Used when creating a new connection, determines which API the user will be able to access.
Properties:
Name | Type | Description |
---|---|---|
CONSUMER |
UserType | A consumer user |
BRAND |
UserType | A brand user: Agent, Agent Manager, Campaign Manager, or Admin |
Examples
const connection = lpm.createConnection({accountId: '12345678', userType: lpm.UserType.CONSUMER});
const connection = lpm.createConnection({accountId: '12345678', userType: lpm.UserType.BRAND, authData});
# constant waitForReadyDuration
The max amount of time to wait for the ready event
Methods
# createCustomerInfoSde()
Creates a customer info sde
Parameters:
Name | Type | Description |
---|---|---|
args.cstatus |
string | |
args.ctype |
string | |
args.balance |
number | |
args.customerId |
string | |
args.lastPaymentDate |
number | |
args.registrationDate |
number | |
args.loginStatus |
number | |
args.companyBranch |
string | |
args.socialId |
string | |
args.imei |
string | |
args.userName |
string | |
args.companySize |
number | |
args.accountName |
string | |
args.role |
string |
# createJwtClaimsSet()
Creates a personal info sde
Parameters:
Name | Type | Description |
---|---|---|
args.sub |
string | |
args.iss |
string | |
args.exp |
number | |
args.iat |
number | |
args.phoneNumber |
string | |
args.preferredUsername |
string | |
args.email |
string | |
args.sdes |
Array.<Object> |
# createPersonalInfoSde()
Creates a personal info sde
Parameters:
Name | Type | Description |
---|---|---|
args.firstname |
string | |
args.lastname |
string | |
args.gender |
string | |
args.language |
string | |
args.company |
string | |
args.age |
CustomerAge | |
args.contacts |
Array.<PersonalContact> |
# async publishMessage(accountId, token, conversationId, dialogId, text, metadataopt, messageAudienceopt, quickRepliesopt, originatorIdopt, originatorRoleopt) → {Promise.<(AxiosResponse.<any>|undefined)>}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
accountId |
|||
token |
|||
conversationId |
|||
dialogId |
|||
text |
|||
metadata |
<optional> |
||
messageAudience |
<optional> |
||
quickReplies |
<optional> |
||
originatorId |
string |
<optional> |
|
originatorRole |
ParticipantRole |
<optional> |
required only for server-jwt requests |
Type Definitions
# CustomerAge
Properties:
Name | Type | Description |
---|---|---|
age |
number | |
year |
number | |
month |
number | |
day |
number |
# PersonalContact
Properties:
Name | Type | Description |
---|---|---|
address |
Address | |
email |
string | |
phone |
string |