Options
All
  • Public
  • Public/Protected
  • All
Menu

Class to handle dispositions

Hierarchy

  • DispositionService

Index

Constructors

  • Create instance of CXoneAuth and ACDSessionManager

    @example
    const dispositionService = new DispositionService();

    Returns DispositionService

Properties

GET_SAVED_DISPOSITION: string = '/InContactAPI/services/V27.0/contacts/{contactId}/disposition'
SAVE_DISPOSITION_URI: string = '/InContactAPI/services/v27.0/agent-sessions/{sessionId}/interactions/{contactId}/disposition'
acdSession: ACDSessionManager = ...
auth: CXoneAuth
logger: CcfLogger = ...
utilService: HttpUtilService = ...

Methods

  • generateAutoSummary(caseId: string, autoSummaryPayload: AssertsShape<{ agentUUId: default<string, AnyObject, string>; appType: RequiredStringSchema<string, AnyObject>; direction: RequiredStringSchema<string, AnyObject>; eventTime: RequiredStringSchema<string, AnyObject>; masterId: default<string, AnyObject, string>; mediaType: RequiredStringSchema<string, AnyObject>; triggerReason: RequiredStringSchema<string, AnyObject> }>): Promise<HttpResponse | CXoneSdkError>
  • This API is just to notify the backend to generate the auto summary. Summary will be sent in the websocket.

    example
    generateAutoSummary({
    triggerReason: "Resolved",
    appType: "CXOneAgent",
    direction: "Inbound",
    eventTime: "2024-01-14T22:49:57.057-07:00",
    mediaType: "Digital",
    masterId: "1111",
    agentUUId: "11eb8172-8396-43d0-b76b-0242ac110004"
    })

    Parameters

    • caseId: string
    • autoSummaryPayload: AssertsShape<{ agentUUId: default<string, AnyObject, string>; appType: RequiredStringSchema<string, AnyObject>; direction: RequiredStringSchema<string, AnyObject>; eventTime: RequiredStringSchema<string, AnyObject>; masterId: default<string, AnyObject, string>; mediaType: RequiredStringSchema<string, AnyObject>; triggerReason: RequiredStringSchema<string, AnyObject> }>

      payload to generate auto summary

    Returns Promise<HttpResponse | CXoneSdkError>

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

    example
    this.dispositionService.getDispositions("123456");
    

    Parameters

    • skillId: string

      skill id to fetch the skill details

    • mediaType: MediaType

      not required but good to set. This will prevent a race condition on contacts

    • Optional contactId: string

      its optional we will need when we want to add contact ID to the dispositions passed

    Returns Promise<CXoneDisposition[]>

  • getSavedDisposition(contactId: string): Promise<AssertsShape<{ dispositionId: RequiredNumberSchema<number, AnyObject>; dispositionName: RequiredStringSchema<string, AnyObject>; dispositionedByAgendId: default<number, AnyObject, number>; lastUpdated: RequiredStringSchema<string, AnyObject>; notes: RequiredStringSchema<string, AnyObject> }>>
  • To get saved disposition

    example
    getSavedDisposition('2123');
    

    Parameters

    • contactId: string

      contact Id

    Returns Promise<AssertsShape<{ dispositionId: RequiredNumberSchema<number, AnyObject>; dispositionName: RequiredStringSchema<string, AnyObject>; dispositionedByAgendId: default<number, AnyObject, number>; lastUpdated: RequiredStringSchema<string, AnyObject>; notes: RequiredStringSchema<string, AnyObject> }>>

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

    example
    this.dispositionService.getTags("123456");
    

    Parameters

    • skillId: string

      skill id to fetch the skill details

    Returns Promise<TagsResponse | CXoneSdkError>

  • To save disposition and commitment data

    example
    saveDisposition();
    

    Parameters

    Returns Promise<HttpResponse>

  • saveTags(contactId: string, tagsPayload: AssertsShape<{ isActive: default<boolean, AnyObject, boolean>; notes: default<string, AnyObject, string>; tagId: RequiredNumberSchema<number, AnyObject>; tagName: RequiredStringSchema<string, AnyObject> }>[]): Promise<HttpResponse | CXoneSdkError>
  • To save tags

    example
    saveTags('124343', [tagId: '1', tagId: '2'])
    

    Parameters

    • contactId: string

      contact Id

    • tagsPayload: AssertsShape<{ isActive: default<boolean, AnyObject, boolean>; notes: default<string, AnyObject, string>; tagId: RequiredNumberSchema<number, AnyObject>; tagName: RequiredStringSchema<string, AnyObject> }>[]

    Returns Promise<HttpResponse | CXoneSdkError>

Generated using TypeDoc