Options
All
  • Public
  • Public/Protected
  • All
Menu

Class to handle the contacts

Hierarchy

  • ContactManager

Index

Constructors

  • example
    const contactManager = new ContactManager();
    

    Returns ContactManager

Properties

acdSession: ACDSessionManager = ...
adminService: AdminService = ...
conferenceCallEvent: Subject<string> = ...
contactService: ContactService = ...
cxoneVoiceContact: CXoneVoiceContact = ...
dispositionService: DispositionService = ...
dispositionsData: Record<string, CXoneDisposition[]> = {}
logger: Logger = ...
onCoBrowseEvent: Subject<CoBrowseEvent> = ...
onDigitalContactNewMessageEvent: Subject<{ contactId: string; interactionId: string; message: AssertsShape<{ _changes: default<default<Assign<ObjectShape, { currentValue: MixedSchema<any, AnyObject, any>; fieldName: default<string, AnyObject, string> }>, AnyObject, TypeOfShape<Assign<ObjectShape, { currentValue: MixedSchema<any, AnyObject, any>; fieldName: default<string, AnyObject, string> }>>, AssertsShape<Assign<ObjectShape, { currentValue: MixedSchema<any, AnyObject, any>; fieldName: default<string, AnyObject, string> }>>>, AnyObject, TypeOfShape<Assign<ObjectShape, { currentValue: MixedSchema<any, AnyObject, any>; fieldName: default<string, AnyObject, string> }>>[], AssertsShape<Assign<ObjectShape, { currentValue: MixedSchema<any, AnyObject, any>; fieldName: default<string, AnyObject, string> }>>[]>; attachments: default<default<Assign<ObjectShape, { blobUrl: default<string, AnyObject, string>; canBeStored: default<boolean, AnyObject, boolean>; fileName: default<string, AnyObject, string>; friendlyName: default<string, AnyObject, string>; id: RequiredStringSchema<string, AnyObject>; isInline: RequiredBooleanSchema<boolean, AnyObject>; mimeType: default<string, AnyObject, string>; previewUrl: default<string, AnyObject, string>; securedPermanentUrl: RequiredStringSchema<string, AnyObject>; url: default<string, AnyObject, string> }>, AnyObject, TypeOfShape<Assign<ObjectShape, { blobUrl: default<string, AnyObject, string>; canBeStored: default<boolean, AnyObject, boolean>; fileName: default<string, AnyObject, string>; friendlyName: default<string, AnyObject, string>; id: RequiredStringSchema<string, AnyObject>; isInline: RequiredBooleanSchema<boolean, AnyObject>; mimeType: default<string, AnyObject, string>; previewUrl: default<string, AnyObject, string>; securedPermanentUrl: RequiredStringSchema<string, AnyObject>; url: default<string, AnyObject, string> }>>, AssertsShape<Assign<ObjectShape, { blobUrl: default<string, AnyObject, string>; canBeStored: default<boolean, AnyObject, boolean>; fileName: default<string, AnyObject, string>; friendlyName: default<string, AnyObject, string>; id: RequiredStringSchema<string, AnyObject>; isInline: RequiredBooleanSchema<boolean, AnyObject>; mimeType: default<string, AnyObject, string>; previewUrl: default<string, AnyObject, string>; securedPermanentUrl: RequiredStringSchema<string, AnyObject>; url: default<string, AnyObject, string> }>>>, AnyObject, TypeOfShape<Assign<ObjectShape, { blobUrl: default<string, AnyObject, string>; canBeStored: default<boolean, AnyObject, boolean>; fileName: default<string, AnyObject, string>; friendlyName: default<string, AnyObject, string>; id: RequiredStringSchema<string, AnyObject>; isInline: RequiredBooleanSchema<boolean, AnyObject>; mimeType: default<string, AnyObject, string>; previewUrl: default<string, AnyObject, string>; securedPermanentUrl: RequiredStringSchema<string, AnyObject>; url: default<string, AnyObject, string> }>>[], AssertsShape<Assign<ObjectShape, { blobUrl: default<string, AnyObject, string>; canBeStored: default<boolean, AnyObject, boolean>; fileName: default<string, AnyObject, string>; friendlyName: default<string, AnyObject, string>; id: RequiredStringSchema<string, AnyObject>; isInline: RequiredBooleanSchema<boolean, AnyObject>; mimeType: default<string, AnyObject, string>; previewUrl: default<string, AnyObject, string>; securedPermanentUrl: RequiredStringSchema<string, AnyObject>; url: default<string, AnyObject, string> }>>[]>; authorEndUserIdentity: any; authorNameRemoved: any; authorUser: any; channel: any; channelName: default<string, AnyObject, string>; channelType: default<string, AnyObject, string>; contactNumber: default<string, AnyObject, string>; contentRemoved: any; createdAt: RequiredStringSchema<string, AnyObject>; customerStatistics: any; delivered: default<default<Assign<ObjectShape, { deliveredAt: default<string, AnyObject, string>; isSuccess: default<boolean, AnyObject, boolean>; reason: default<string, AnyObject, string> }>, AnyObject, TypeOfShape<Assign<ObjectShape, { deliveredAt: default<string, AnyObject, string>; isSuccess: default<boolean, AnyObject, boolean>; reason: default<string, AnyObject, string> }>>, AssertsShape<Assign<ObjectShape, { deliveredAt: default<string, AnyObject, string>; isSuccess: default<boolean, AnyObject, boolean>; reason: default<string, AnyObject, string> }>>>, AnyObject, TypeOfShape<Assign<ObjectShape, { deliveredAt: default<string, AnyObject, string>; isSuccess: default<boolean, AnyObject, boolean>; reason: default<string, AnyObject, string> }>>[], AssertsShape<Assign<ObjectShape, { deliveredAt: default<string, AnyObject, string>; isSuccess: default<boolean, AnyObject, boolean>; reason: default<string, AnyObject, string> }>>[]>; deviceFingerprint: any; direction: RequiredStringSchema<string, AnyObject>; forward: any; hasAdditionalMessageContent: default<boolean, AnyObject, boolean>; id: RequiredStringSchema<string, AnyObject>; idOnExternalPlatform: default<string, AnyObject, string>; isDeletedOnExternalPlatform: RequiredBooleanSchema<boolean, AnyObject>; isHiddenOnExternalPlatform: RequiredBooleanSchema<boolean, AnyObject>; isRead: default<boolean, AnyObject, boolean>; isRelatedMessage: default<boolean, AnyObject, boolean>; isReplyAllowed: default<boolean, AnyObject, boolean>; isReplyToSpecificMessage: default<boolean, AnyObject, boolean>; messageContent: any; messageNotes: default<default<Assign<ObjectShape, { content: RequiredStringSchema<string, AnyObject>; createdAt: RequiredStringSchema<string, AnyObject>; currentAssignee: default<string, AnyObject, string>; id: RequiredStringSchema<string, AnyObject>; message: default<Assign<ObjectShape, { id: RequiredStringSchema<string, AnyObject> }>, AnyObject, TypeOfShape<Assign<ObjectShape, { id: RequiredStringSchema<string, AnyObject> }>>, AssertsShape<Assign<ObjectShape, { id: RequiredStringSchema<string, AnyObject> }>>>; status: default<Assign<ObjectShape, { type: RequiredStringSchema<string, AnyObject> }>, AnyObject, TypeOfShape<Assign<ObjectShape, { type: RequiredStringSchema<string, AnyObject> }>>, AssertsShape<Assign<ObjectShape, { type: RequiredStringSchema<string, AnyObject> }>>>; updatedAt: RequiredStringSchema<string, AnyObject>; user: any }>, AnyObject, TypeOfShape<Assign<ObjectShape, { content: RequiredStringSchema<string, AnyObject>; createdAt: RequiredStringSchema<string, AnyObject>; currentAssignee: default<string, AnyObject, string>; id: RequiredStringSchema<string, AnyObject>; message: default<Assign<ObjectShape, { id: RequiredStringSchema<string, AnyObject> }>, AnyObject, TypeOfShape<Assign<ObjectShape, { id: RequiredStringSchema<string, AnyObject> }>>, AssertsShape<Assign<ObjectShape, { id: RequiredStringSchema<string, AnyObject> }>>>; status: default<Assign<ObjectShape, { type: RequiredStringSchema<string, AnyObject> }>, AnyObject, TypeOfShape<Assign<ObjectShape, { type: RequiredStringSchema<string, AnyObject> }>>, AssertsShape<Assign<ObjectShape, { type: RequiredStringSchema<string, AnyObject> }>>>; updatedAt: RequiredStringSchema<string, AnyObject>; user: any }>>, AssertsShape<Assign<ObjectShape, { content: RequiredStringSchema<string, AnyObject>; createdAt: RequiredStringSchema<string, AnyObject>; currentAssignee: default<string, AnyObject, string>; id: RequiredStringSchema<string, AnyObject>; message: default<Assign<ObjectShape, { id: RequiredStringSchema<string, AnyObject> }>, AnyObject, TypeOfShape<Assign<ObjectShape, { id: RequiredStringSchema<string, AnyObject> }>>, AssertsShape<Assign<ObjectShape, { id: RequiredStringSchema<string, AnyObject> }>>>; status: default<Assign<ObjectShape, { type: RequiredStringSchema<string, AnyObject> }>, AnyObject, TypeOfShape<Assign<ObjectShape, { type: RequiredStringSchema<string, AnyObject> }>>, AssertsShape<Assign<ObjectShape, { type: RequiredStringSchema<string, AnyObject> }>>>; updatedAt: RequiredStringSchema<string, AnyObject>; user: any }>>>, AnyObject, TypeOfShape<Assign<ObjectShape, { content: RequiredStringSchema<string, AnyObject>; createdAt: RequiredStringSchema<string, AnyObject>; currentAssignee: default<string, AnyObject, string>; id: RequiredStringSchema<string, AnyObject>; message: default<Assign<ObjectShape, { id: RequiredStringSchema<string, AnyObject> }>, AnyObject, TypeOfShape<Assign<ObjectShape, { id: RequiredStringSchema<string, AnyObject> }>>, AssertsShape<Assign<ObjectShape, { id: RequiredStringSchema<string, AnyObject> }>>>; status: default<Assign<ObjectShape, { type: RequiredStringSchema<string, AnyObject> }>, AnyObject, TypeOfShape<Assign<ObjectShape, { type: RequiredStringSchema<string, AnyObject> }>>, AssertsShape<Assign<ObjectShape, { type: RequiredStringSchema<string, AnyObject> }>>>; updatedAt: RequiredStringSchema<string, AnyObject>; user: any }>>[], AssertsShape<Assign<ObjectShape, { content: RequiredStringSchema<string, AnyObject>; createdAt: RequiredStringSchema<string, AnyObject>; currentAssignee: default<string, AnyObject, string>; id: RequiredStringSchema<string, AnyObject>; message: default<Assign<ObjectShape, { id: RequiredStringSchema<string, AnyObject> }>, AnyObject, TypeOfShape<Assign<ObjectShape, { id: RequiredStringSchema<string, AnyObject> }>>, AssertsShape<Assign<ObjectShape, { id: RequiredStringSchema<string, AnyObject> }>>>; status: default<Assign<ObjectShape, { type: RequiredStringSchema<string, AnyObject> }>, AnyObject, TypeOfShape<Assign<ObjectShape, { type: RequiredStringSchema<string, AnyObject> }>>, AssertsShape<Assign<ObjectShape, { type: RequiredStringSchema<string, AnyObject> }>>>; updatedAt: RequiredStringSchema<string, AnyObject>; user: any }>>[]>; postId: RequiredStringSchema<string, AnyObject>; reactionStatistics: any; readAt: default<string, AnyObject, string>; recipients: default<default<Assign<ObjectShape, { idOnExternalPlatform: RequiredStringSchema<string, AnyObject>; isPrimary: RequiredBooleanSchema<boolean, AnyObject>; isPrivate: RequiredBooleanSchema<boolean, AnyObject>; name: RequiredStringSchema<string, AnyObject> }>, AnyObject, TypeOfShape<Assign<ObjectShape, { idOnExternalPlatform: RequiredStringSchema<string, AnyObject>; isPrimary: RequiredBooleanSchema<boolean, AnyObject>; isPrivate: RequiredBooleanSchema<boolean, AnyObject>; name: RequiredStringSchema<string, AnyObject> }>>, AssertsShape<Assign<ObjectShape, { idOnExternalPlatform: RequiredStringSchema<string, AnyObject>; isPrimary: RequiredBooleanSchema<boolean, AnyObject>; isPrivate: RequiredBooleanSchema<boolean, AnyObject>; name: RequiredStringSchema<string, AnyObject> }>>>, AnyObject, TypeOfShape<Assign<ObjectShape, { idOnExternalPlatform: RequiredStringSchema<string, AnyObject>; isPrimary: RequiredBooleanSchema<boolean, AnyObject>; isPrivate: RequiredBooleanSchema<boolean, AnyObject>; name: RequiredStringSchema<string, AnyObject> }>>[], AssertsShape<Assign<ObjectShape, { idOnExternalPlatform: RequiredStringSchema<string, AnyObject>; isPrimary: RequiredBooleanSchema<boolean, AnyObject>; isPrivate: RequiredBooleanSchema<boolean, AnyObject>; name: RequiredStringSchema<string, AnyObject> }>>[]>; replyChannel: any; replyToMessage: any; sentStatus: default<string, AnyObject, string>; tags: default<default<Assign<ObjectShape, { color: RequiredStringSchema<string, AnyObject>; id: RequiredNumberSchema<number, AnyObject>; title: RequiredStringSchema<string, AnyObject> }>, AnyObject, TypeOfShape<Assign<ObjectShape, { color: RequiredStringSchema<string, AnyObject>; id: RequiredNumberSchema<number, AnyObject>; title: RequiredStringSchema<string, AnyObject> }>>, AssertsShape<Assign<ObjectShape, { color: RequiredStringSchema<string, AnyObject>; id: RequiredNumberSchema<number, AnyObject>; title: RequiredStringSchema<string, AnyObject> }>>>, AnyObject, TypeOfShape<Assign<ObjectShape, { color: RequiredStringSchema<string, AnyObject>; id: RequiredNumberSchema<number, AnyObject>; title: RequiredStringSchema<string, AnyObject> }>>[], AssertsShape<Assign<ObjectShape, { color: RequiredStringSchema<string, AnyObject>; id: RequiredNumberSchema<number, AnyObject>; title: RequiredStringSchema<string, AnyObject> }>>[]>; threadId: RequiredStringSchema<string, AnyObject>; threadIdOnExternalPlatform: default<string, AnyObject, string>; title: default<string, AnyObject, string>; url: default<string, AnyObject, string>; xTraceId: default<string, AnyObject, string> }> }> = ...
onDigitalContactUserTypingPreviewEvent: Subject<{ eventType: string; message?: any; threadId: string }> = ...
onDispositionEvent: Subject<CXoneDisposition[] | CXoneSdkError> = ...
onTagsEvent: Subject<TagsResponse | CXoneSdkError> = ...
onUserSlotEvent: Subject<any> = ...
personalConnectionService: PersonalConnectionService = ...
skillService: SkillService = ...
tagsData: Record<string, TagsResponse> = {}
viewOnlyCases: string[] = []
voiceContactMap: Map<string, CXoneVoiceContact> = ...
voiceContactUpdateEvent: Subject<CXoneVoiceContact> = ...
voiceMailContactMap: Map<string, CXoneVoiceMailContact> = ...
voiceMailContactUpdateEvent: Subject<CXoneVoiceMailContact> = ...
voiceMailPlayBackEvent: Subject<AssertsShape<{ contactId: RequiredStringSchema<string, AnyObject>; iisHost: default<string, AnyObject, string>; playBackPaused: RequiredBooleanSchema<boolean, AnyObject>; playBackPosition: RequiredNumberSchema<number, AnyObject>; type: RequiredStringSchema<string, AnyObject>; vcHost: default<string, AnyObject, string> }>> = ...
voiceService: VoiceService = ...
workItemContactMap: Map<string, CXoneWorkItemContact> = ...
workItemContactUpdateEvent: Subject<CXoneWorkItemContact> = ...

Methods

  • VoiceMailPlayBackEventHandler(): void
  • Method to get subscribe to voiceMailPlayBackEvent

    Returns void

  • callContactEventHandler(): void
  • Method to subscribe the call contact event from the agentSession.

    Returns void

  • checkAcdContactsAvailable(): boolean
  • Method to check if any voice contact is available in VoiceContactMap

    example

    getVoiceContactMap

    Returns boolean

  • checkForExistingContact(contactEvent: ContactEventTypeAlias, contactMap: Map<string, CXoneContactType>, contactConstructor: any): any
  • example

    Parameters

    • contactEvent: ContactEventTypeAlias
    • contactMap: Map<string, CXoneContactType>
    • contactConstructor: any

    Returns any

  • coBrowseEventHandler(): void
  • initialize coBrowse event handler

    example

    coBrowseEventHandler

    Returns void

  • conferenceCallEventHandler(): void
  • Method to subscribe the conference call event from the agentSession.

    Returns void

  • connectVoiceBioHubWebSocket(): void
  • connect to websocket for voice bio hub

    Returns void

  • Used to get the disposition based on the skill id provided

    example
    cxoneClient.contactManager.getDispositions("123456");
    

    Parameters

    • skillId: string

      skill id to fetch the skill details

    • mediaType: MediaType

    Returns Promise<CXoneDisposition[] | CXoneSdkError>

  • getDispositionsOnContactEvent(skillId: string, contactId: string, mediaType: MediaType): void
  • Method to get dispositions for CallContactEvents and VoiceMailContactEvents

    example
    getDispositionsOnContactEvent(1234, 4321, MediaType.VOICE)
    

    Parameters

    • skillId: string

      skill id to fetch the skill dispositions

    • contactId: string

      used to fetch disposition

    • mediaType: MediaType

    Returns void

  • getInboundAgentDetails(ani: string): Promise<{}>
  • Get the details of calling agent in case of inbound voice interaction

    example

    getInboundAgentDetails

    Parameters

    • ani: string

      ani number(agent id)

    Returns Promise<{}>

  • getTagsOnContactEvent(skillId: string, contactId: string): void
  • Method to get tags for CallContactEvents and VoiceMailContactEvents

    example
    getTagsOnContactEvent(1234, 4321)
    

    Parameters

    • skillId: string

      skill id to fetch the skill tags

    • contactId: string

      contactId to be set on tags

    Returns void

  • Method to get voicemail skill details

    Parameters

    Returns void

  • hasAnyPersonalConnectionContact(): boolean
  • Returns whether the agent has any PC dialer calls

    example

    hasAnyPersonalConnectionContact()

    Returns boolean

  • initialize(): void
  • Method to create instance for voice and contact service and update agent permissions and call contact event

    Returns void

  • muteEventHandler(): void
  • Method to subscribe the mute event from the agentSession

    Returns void

  • Method used to get the CXoneContact

    Parameters

    Returns void

  • Used to save the disposition data provided

    example
    cxoneClient.contactManager.saveDisposition("123456",{primaryDispositionId: 456789, primaryDispositionNotes: "test notes"});
    

    Parameters

    Returns Promise<HttpResponse>

  • set / delete / find the voice contacts in map using contactID.

    Parameters

    Returns void

  • set / delete / find the voicemail contacts in map using contactID.

    Parameters

    Returns void

  • set / delete / find the work item contacts in map using contactID.

    Parameters

    Returns void

  • updateAgentPreference(): void
  • Update agent permission for voice contacts

    Returns void

  • updateAutoSummaryEventHandler(): void
  • subscribe to auto summary event

    Returns void

  • updateControlsWithNewConsultCall(masterID: string): void
  • Method to update call controls state if new consult call started and publish for primary contact

    example
    updateControlsWithNewConsultCall('1234')
    

    Parameters

    • masterID: string

      skill id to fetch the skill details

    Returns void

  • updateMuteState(isAgentMuted: boolean): void
  • Update Mute button state for voice contacts

    Parameters

    • isAgentMuted: boolean

    Returns void

  • updatePermissionsEventHandler(): void
  • subscribe the update agent permissions event

    Returns void

  • voicemailContactEventHandler(): void
  • Method to subscribe the voicemail contact event from the agentSession.

    Returns void

  • workItemContactEventHandler(): void
  • Method to subscribe the workitem contact event from the agentSession.

    Returns void

Generated using TypeDoc