Title

Global

Members

AgentState

# 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

View Source profile/agent-state.js, line 11

ConnectionType

# 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

View Source connection/auth-type.js, line 10

ChannelType

# constant ChannelType

Properties:
Name Type Description
MESSAGING ChannelType

the default channel type

LIVE_CHAT ChannelType
COBROWSE ChannelType

View Source conversation/channel-type.js, line 11

number

# constant clearConversationTimeout

The time to wait in MS after a DELETE is received before removing a conversation from the cache

View Source conversation/conversation-notification-feed.js, line 8

string

# 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

View Source connection/connection-state.js, line 14

Example
if (connection.state === ConnectionState.CONNECTED) {
    console.log('connection is connected');
}
ConnectionType

# 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

View Source connection/connection-type.js, line 10

ContentType

# constant ContentType

An enum of possible content types

Properties:
Name Type Description
PLAIN_TEXT ContentType
HOSTED_FILE ContentType
RICH_TEXT ContentType

View Source conversation/content-type.js, line 9

ConversationState

# 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

View Source conversation/conversation-state.js, line 12

csatStatus

# 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

View Source conversation/csat-status.js, line 9

DeliveryStatus

# 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

View Source conversation/delivery-status.js, line 12

DeviceFamily

# 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

View Source profile/device-family.js, line 11

DialogChangeType

# 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

View Source conversation/dialog-change-type.js, line 10

DialogCloseReason

# 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

View Source conversation/dialog-close-reason.js, line 13

DialogState

# constant DialogState

A enum of possible dialog states

Properties:
Name Type Description
OPEN DialogState
CLOSE DialogState

View Source conversation/dialog-state.js, line 13

DialogType

# 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

View Source conversation/dialog-type.js, line 13

Features

# constant Features

An enum of operating system types

Properties:
Name Type Description
CO_BROWSE Features
CO_APP Features
PHOTO_SHARING Features
FILE_SHARING Features
SECURE_FORMS Features
AUTO_MESSAGES Features
RICH_CONTENT Features
QUICK_REPLIES Features
MULTI_DIALOG Features
MARKDOWN_HYPERLINKS Features

View Source profile/features.js, line 11

Integration

# constant Integration

An enum of integration types avaialble for ClientProfile

Properties:
Name Type Description
WEB_SDK Integration
MOBILE_SDK Integration
BRAND_SDK Integration

View Source profile/integration.js, line 11

OS

# constant OS

An enum of operating system types

Properties:
Name Type Description
WINDOWS OS
LINUX OS
OSX OS
ANDROID OS
IOS OS
OTHER OS

View Source profile/os.js, line 11

ParticipantChangeType

# constant ParticipantChangeType

Properties:
Name Type Description
ADD ParticipantChangeType
REMOVE ParticipantChangeType
SUGGEST ParticipantChangeType

View Source conversation/participant-change-type.js, line 10

ParticipantChatState

# 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

View Source conversation/participant-chat-state.js, line 11

ParticipantRole

# constant ParticipantRole

Properties:
Name Type Description
CONSUMER ParticipantRole
ASSIGNED_AGENT ParticipantRole
AGENT ParticipantRole
MANAGER ParticipantRole
READER ParticipantRole
BRAND_BOT ParticipantRole
CONTROLLER ParticipantRole

View Source conversation/participant-role.js, line 11

ParticipantState

# constant ParticipantState

Properties:
Name Type Description
ACTIVE ParticipantState
SUGGESTED ParticipantState
REMOVED ParticipantState

View Source conversation/participant-state.js, line 11

RingState

# constant RingState

The different states of a ring

Properties:
Name Type Description
WAITING RingState
CANCELLED RingState
EXPIRED RingState
ACCEPTED RingState
REJECTED RingState

View Source agent-matching/ring-state.js, line 10

RoutingSubscriptionState

# 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

View Source agent-matching/routing-subscription-state.js, line 10

SubscriptionState

# 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

View Source conversation/subscription-state.js, line 10

TTRType

# constant TTRType

An enum of possible TTR types

Properties:
Name Type Description
NORMAL TTRType
URGENT TTRType
PRIORITIZED TTRType
CUSTOM TTRType

View Source conversation/ttr-type.js, line 10

UserType

# 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

View Source connection/user-type.js, line 16

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

View Source conversation/conversation-subscription.js, line 10

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

View Source connection/sde.js, line 24

# 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>

View Source connection/jwt-claims-set.js, line 14

# 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>

View Source connection/sde.js, line 78

# 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>

${accountId}.${user.id} required only for server-jwt requests

originatorRole ParticipantRole <optional>

required only for server-jwt requests

View Source api/rest/messaging/publish-message.js, line 20

Promise.<(AxiosResponse.<any>|undefined)>

Type Definitions

Object

# Address

Properties:
Name Type Description
country string
region string

View Source connection/sde.js, line 61

string

# AgentState

View Source profile/agent-state.js, line 1

string

# ContentType

View Source conversation/content-type.js, line 1

string

# ConversationState

View Source conversation/conversation-state.js, line 3

string

# csatStatus

View Source conversation/csat-status.js, line 1

Object

# CustomerAge

Properties:
Name Type Description
age number
year number
month number
day number

View Source connection/sde.js, line 46

string

# DeliveryStatus

View Source conversation/delivery-status.js, line 3

string

# DialogChangeType

View Source conversation/dialog-change-type.js, line 1

string

# DialogCloseReason

View Source conversation/dialog-close-reason.js, line 4

string

# DialogState

View Source conversation/dialog-state.js, line 4

string

# DialogType

View Source conversation/dialog-type.js, line 4

string

# ParticipantChangeType

View Source conversation/participant-change-type.js, line 1

string

# ParticipantChatState

View Source conversation/participant-chat-state.js, line 3

string

# ParticipantRole

View Source conversation/participant-role.js, line 3

string

# ParticipantState

View Source conversation/participant-state.js, line 3

Object

# PersonalContact

Properties:
Name Type Description
address Address
email string
phone string

View Source connection/sde.js, line 54

string

# RoutingSubscriptionState

View Source agent-matching/routing-subscription-state.js, line 1

string

# SubscriptionState

View Source conversation/subscription-state.js, line 1

Object

# WsApiRequest

View Source api/ws/index.js, line 6