Options
All
  • Public
  • Public/Protected
  • All
Menu

External module DaVinci_API

Index

Functions

addContextualContacts

clearContextualContacts

  • clearContextualContacts(): Promise<void>

clickToDial

  • clickToDial(phoneNumber: string, records?: SearchRecords): Promise<void>
  • Call this when an agent preforms a click-to-dial. It will tell any Channel Apps to call this number.

    Example: if a phone number is displayed in the CRM then, when it is clicked by the agent, this event should be called to initiate a call.

    Parameters

    • phoneNumber: string

      Number to be dialed

    • Optional records: SearchRecords

      Records/entities associated to the number(e.g. lead, contact, etc..)

    Returns Promise<void>

contextualOperation

dialPadNumberClicked

  • dialPadNumberClicked(number: any): Promise<void>
  • Parameters

    • number: any

    Returns Promise<void>

enableClickToDial

  • enableClickToDial(enabled: boolean): Promise<void>
  • Use this to enable or disable click-to-dial

    Parameters

    • enabled: boolean

      This set whether or not agents should be allowed to preform click-to-dial

    Returns Promise<void>

getConfig

  • This is needed to get configuration of the app from Creators Studio.

    Returns Promise<IAppConfiguration>

    The configuration of the app provided in DaVinci Creators Studio

getPageInfo

  • Gets any records or entities on the page the agent is currently viewing.

    See registerGetPageInfo

    Alternatively use registerOnFocus to get the records every time the page changes.

    Returns Promise<SearchRecords>

    Records on the currents page

getPresence

  • All DaVinci apps can have a presence(ready, not ready, etc..). Which will then be synced across all apps.

    Use this to get the current presence and reason of the user

    Note that normally the app the manages the presence will have a list of valid presences. If you are integrating with something with it's own presence then you should have a map in your apps config in DaVinci Creators Studio that maps between that presence and the valid presences.

    See:

    Returns Promise<GetPresenceResult>

getSearchLayout

getSequenceID

  • getSequenceID(): string
  • Gets a sequential id. This can be used for scenarioIds and interactionIds in IInteractions.

    Returns string

getUserDetails

  • Get details about the current user.

    Returns Promise<UserDetails>

initializeComplete

  • This should be called after the app has registered for any events it wants to handle. The app will not receive any events until after this is called.

    This is also needed to get configuration of the app from Creators Studio. Deprecated to get configuration using initializeComplete, instead use getConfig API

    Parameters

    • Optional logger: Logger

      The logger that the DaVinci API will use if any error occurs

    Returns Promise<IAppConfiguration>

    The configuration of the app provided in DaVinci Creators Studio

isPluginVisible

  • isPluginVisible(): Promise<boolean>
  • Checks if this app is currently visible.

    Returns Promise<boolean>

isToolbarVisible

  • isToolbarVisible(): Promise<boolean>
  • This checks if the toolbar(agnet.contactcanvas.com) is visible.

    See registerIsToolbarVisible

    Returns Promise<boolean>

    true if the toolbar(agent.contactcanvas.com) is visible(maximized), or false otherwise(minimized)

loadBridgeScripts

  • loadBridgeScripts(javascriptUrls: string[]): Promise<void>
  • An app can use this to load javascript files on the CCC iframe. This is useful if the app needs access to the parent iframe to interact with the CRM.

    Parameters

    • javascriptUrls: string[]

      Urls of js files to load

    Returns Promise<void>

logout

  • logout(reason?: string): Promise<void>

onFocus

  • An app that integrates with a CRM should call this when the user navigates to a new page, record, or entity.

    See registerOnFocus

    Parameters

    • records: SearchRecords

      Any records or entities that are visible on the new page.

    Returns Promise<void>

onPresenceChanged

  • onPresenceChanged(presence: string, reason?: string): Promise<any>
  • All DaVinci apps can have a presence(ready, not ready, etc..). Which will then be synced across all apps.

    One app has to be in charge of managing how one app's presence will effect the other apps. That app should use this to inform other apps that the presence of the agent has changed. It should be called each time the presence or reason is changed.

    See:

    Parameters

    • presence: string
    • Optional reason: string

    Returns Promise<any>

openMyCallsToday

  • openMyCallsToday(url: string): Promise<void>
  • Opens a new tab in the browser. This is originally used to open 'My Calls Today' a list of calls the agent had taken today.

    Parameters

    • url: string

      The url to open.

    Returns Promise<void>

registerClickToDial

  • registerClickToDial(callback: function): Promise<void>
  • Apps that handle interactions should use this to start an interaction when a phone number is clicked in the crm.

    Parameters

    • callback: function

      Called whenever an user preforms a click-to-dial

        • Parameters

          Returns Promise<void>

    Returns Promise<void>

registerContextualControls

  • registerContextualControls(callback: function): Promise<void>

registerEnableClickToDial

  • registerEnableClickToDial(callback: function): Promise<void>
  • Use this to be informed if click-to-dial becomes enabled or disabled

    Parameters

    • callback: function

      Called when click to dial is enabled or disabled. If clickToDialEnabled is false then the application should not allow users to preform click-to-dial requests.

        • (clickToDialEnabled: boolean): Promise<void>
        • Parameters

          • clickToDialEnabled: boolean

          Returns Promise<void>

    Returns Promise<void>

registerGetPageInfo

  • registerGetPageInfo(callback: function): Promise<void>
  • Apps that integrate with a CRM should use this to allow other apps to get any CRM entities on the page the agent is actively viewing.

    See getPageInfo

    Parameters

    • callback: function

      This function should return(via a promise) any records/entities that are currently displayed on the CRM.

    Returns Promise<void>

registerGetPresence

  • registerGetPresence(callback: function): Promise<void>
  • All DaVinci apps can have a presence(ready, not ready, etc..). Which will then be synced across all apps.

    One app has to be in charge of managing how one app's presence will effect the other apps. That app should use this to register to handler other apps asking what the current presence is.

    See:

    Parameters

    • callback: function

      This is called whenever another app wants to know the current presence of the user.

        • (): Promise<object>
        • Returns Promise<object>

    Returns Promise<void>

registerGetSearchLayout

  • registerGetSearchLayout(callback: function): Promise<void>
  • Apps that integrate with CRM should register for this event to tell other apps which fields are important in a record. The SearchLayouts should be configured either in the CRM or in the app's config in Creator Studio.

    See getSearchLayout

    Parameters

    • callback: function

      This function should return(via a promise) the configured SearchLayouts

    Returns Promise<void>

registerIsToolbarVisible

  • registerIsToolbarVisible(callback: function): Promise<void>
  • Used by apps that embed agent.contactcanvas.com into a CRM. This registers the app to handle events to check if agent.contactcanvas.com is currently visible.

    Parameters

    • callback: function

      This function when called should return(vis a promise) whether or not agent.contactcanvas.com is currently visible to the user. e.g. if agent.contactcanvas.com is minimized this should return false and if it is maximized it should return true

      See isToolbarVisible

        • (): Promise<boolean>
        • Returns Promise<boolean>

    Returns Promise<void>

registerOnFocus

  • registerOnFocus(callback: function): Promise<void>
  • Apps should use this if they want to know what page, record, or entity the agent navigates too.

    See onFocus

    Alternatively use getPageInfo to get the records on the current page.

    Parameters

    • callback: function

      Called when the user navigates to a new page, record, or entity. 'records' contains any records on the new page.

    Returns Promise<void>

registerOnInteraction

  • registerOnInteraction(callback: function): Promise<void>
  • This registers the app the handle interaction events, which is triggered each time an interaction changes.

    Parameters

    • callback: function

      This will be called each time an interaction is added or has its state changed. Apps that are integrated with a CRM should preform a screenpop when a new interaction occurs.

    Returns Promise<void>

registerOnLogout

  • registerOnLogout(callback: function): Promise<void>
  • Use this to receive an event when the agent logs out. This is useful if you have some other service that needs to be logged out at that time.

    See:

    Parameters

    • callback: function

      Called when the user logs out. The registered app should logout of any services when it receives this event.

        • (reason?: string): Promise<void>
        • Parameters

          • Optional reason: string

          Returns Promise<void>

    Returns Promise<void>

registerOnPresenceChanged

  • registerOnPresenceChanged(callback: function): Promise<void>
  • All DaVinci apps can have a presence(ready, not ready, etc..). Which will then be synced across all apps.

    Use this to receive an event each time the presence changes.

    Note that normally the app the manages the presence will have a list of valid presences. If you are integrating with something with it's own presence then you should have a map in your apps config in DaVinci Creators Studio that maps between that presence and the valid presences.

    See:

    Parameters

    • callback: function

      Called whenever the presence or reason of the agent changes.

        • (presence: string, reason?: string): Promise<void>
        • Parameters

          • presence: string
          • Optional reason: string

          Returns Promise<void>

    Returns Promise<void>

registerSaveActivity

  • registerSaveActivity(callback: function): Promise<void>
  • Apps that integrate with an application should register for this to create an activity/notes when the event is received.

    See saveActivity

    Parameters

    • callback: function

      This function should create or update an activity in the application. If the id of the given activity is defined then this function should update the existing activity, else this should create a new activity.

        • Parameters

          Returns Promise<string>

    Returns Promise<void>

registerScreenpop

  • registerScreenpop(callback: function): Promise<void>
  • Apps integrated with a CRM should register for this so that other apps can open record/entities in CRM if they have the record's ID, say from registerOnFocus or the like.

    See screenpop

    Parameters

    Returns Promise<void>

registerScreenpopControlChanged

  • registerScreenpopControlChanged(callback: function): Promise<void>
  • Use this to revive an event whenever screenpops are disabled or enabled.

    When disabled screen pops should not be preformed either when screenpop or setInteraction is called.

    Parameters

    • callback: function

      Called when the status of the screenpop control changes. The application should not preform screenpops when screenPopEnabled is false.

        • (screenPopEnabled: boolean): Promise<void>
        • Parameters

          • screenPopEnabled: boolean

          Returns Promise<void>

    Returns Promise<void>

registerSetPresence

  • registerSetPresence(callback: function): Promise<void>
  • All DaVinci apps can have a presence(ready, not ready, etc..). Which will then be synced across all apps.

    One app has to be in charge of managing how one app's presence will effect the other apps. That app should use this to receive events when other app's change their presence.

    See:

    Parameters

    • callback: function

      This is called when ever an app request a change in the user's presence. If the given presence/reason is not valid this function should reject. If it is valid then this function should inform the other apps using onPresenceChanged.

        • (presence: string, reason?: string): Promise<void>
        • Parameters

          • presence: string
          • Optional reason: string

          Returns Promise<void>

    Returns Promise<void>

registerSetSoftphoneHeight

  • registerSetSoftphoneHeight(callback: function): Promise<void>
  • Used by apps that embed agent.contactcanvas.com into a CRM. This registers the app to handle events to change the iframe's height.

    Parameters

    • callback: function

      Called when the height of agent.contactcanvas.com changes. The application should set the height of the iframe containing agent.contactcanvas.com to the given height(in px).

        • (height: number): Promise<void>
        • Parameters

          • height: number

          Returns Promise<void>

    Returns Promise<void>

registerSetSoftphoneWidth

  • registerSetSoftphoneWidth(callback: function): Promise<void>
  • Used by apps that embed agent.contactcanvas.com into a CRM. This registers the app to handle events to change the iframe's height.

    Parameters

    • callback: function

      Called when the width of agent.contactcanvas.com changes. The application should set the width of the iframe containing agent.contactcanvas.com to the given width(in px).

        • (width: number): Promise<void>
        • Parameters

          • width: number

          Returns Promise<void>

    Returns Promise<void>

saveActivity

  • saveActivity(activity: Activity): Promise<string>
  • Apps that create interactions should use this to save, or update, information about the interaction (notes, disposition, etc...) on the application/crm.

    If the id of the activity is defined then the existing activity will be updated, otherwise a new activity will be created.

    See registerSaveActivity

    Parameters

    Returns Promise<string>

    Id of the created or updated activity

screenpop

  • This causes a screenpop on the application of given record. This is useful if you want to open a record you received from registerOnFocus or the like.

    See registerScreenpop for more.

    Parameters

    • channel: ChannelTypes

      Type of channel that caused the screenpop

    • direction: InteractionDirectionTypes

      Direction of the interaction that caused the screenpop

    • objectId: string

      Id of the object to pop

    • objectType: string

      Type of the object to pop

    Returns Promise<void>

sendNotification

  • sendNotification(message: string, notificationType?: NotificationType): Promise<void>
  • This sends notification to framework which will be displayed in toolbar. To Do : Different notifications based on type.

    Parameters

    • message: string

      Message to be displayed on toolbar.

    • Optional notificationType: NotificationType

      Type of notification.

    Returns Promise<void>

setAppHeight

  • setAppHeight(height: number): Promise<void>
  • Set the height of this app. Whenever the height needed by your app changes you should recalculate it and call this method.

    Parameters

    • height: number

      Height in px

    Returns Promise<void>

setAppWidth

  • setAppWidth(width: number): Promise<void>
  • Set the width of this app Whenever the width needed by your app changes you should recalculate it and call this method.

    Note: this is can only be used if the location of you app as defined in Creates Studio is Top Left, Top Right, Bottom Left, or Bottom Right.

    Parameters

    • width: number

      Width in px

    Returns Promise<void>

setInteraction

  • Apps with interactions(phone calls, chats, etc..) should call this every time an interactions is added, removed, or modified.

    This is important as it allows for screenpops, activities to be saved in CRM, and statistics.

    Screenpops should not be performed if they are disabled: registerScreenpopControlChanged

    Parameters

    Returns Promise<SearchRecords>

setPluginVisible

  • setPluginVisible(isVisible: boolean): Promise<void>
  • Sets if or not the app should be visible.

    Parameters

    • isVisible: boolean

    Returns Promise<void>

setPresence

  • setPresence(presence: string, reason?: string): Promise<void>
  • All DaVinci apps can have a presence(ready, not ready, etc..). Which will then be synced across all apps.

    Use this to set the presence(and reason) of the agent. The app that manages presence will then sync this across all the apps.

    Note that normally the app the manages the presence will have a list of valid presences. If you are integrating with something with it's own presence then you should have a map in your apps config in DaVinci Creators Studio that maps between that presence and the valid presences.

    See:

    Parameters

    • presence: string

      A valid presence

    • Optional reason: string

      A string explaining why the presence was changed(ex: Break, Lunch, end of shift)

    Returns Promise<void>

setScreenpopControl

  • setScreenpopControl(enabled: boolean): Promise<void>
  • Sets whether or not screenpop is enabled.

    See registerScreenpopControlChanged for more.

    Parameters

    • enabled: boolean

    Returns Promise<void>

setToolbarEnabled

  • setToolbarEnabled(isEnabled: boolean): Promise<void>
  • This is used to enabled and disable the toolbar. If disabled then only global apps will load.

    Parameters

    • isEnabled: boolean

    Returns Promise<void>

speedDialNumberClicked

  • speedDialNumberClicked(number: any): Promise<void>
  • Parameters

    • number: any

    Returns Promise<void>

Generated using TypeDoc