List of contacts your app provides
This removes any contacts added by addContextualContacts
Call this when an agent preforms a click-to-act. 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.
Number to be acted
Records/entities associated to the number(e.g. lead, contact, etc..)
Type of transfer of which the data type must be CONTEXTUAL_OPERATION_TYPE and the acceptable values are: BlindTransfer, WarmTransfer or Conference
Interaction identification number
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.
Number to be dialed
Records/entities associated to the number(e.g. lead, contact, etc..)
Type of transfer of which the data type must be CONTEXTUAL_OPERATION_TYPE and the acceptable values are: BlindTransfer, WarmTransfer or Conference
Interaction identification number
Call this start an operation on an interaction(ex: transfer, conference, etc..). The agent will then be able to choose who to complete the operation with by either choosing an IContextualContact or typing something in.
The type of operation
The IContextualContact the agent chooses.
If the agent types something in instead of choosing an existing contact then what they type will be in the displayName field of the IContextualContact.
If the agent cancels the operation then the promise will reject.
Use this to enable or disable click-to-dial
This set whether or not agents should be allowed to preform click-to-dial
This is to get the app name as it is listed in davinci. CRM apps using a bridge might need this to know which iframe to post messages to.
This is needed to get configuration of the app from Creators Studio.
The configuration of the app provided in DaVinci Creators Studio
This is needed to get the global configuration for the DaVinci Framework.
The configuration of the global framework config for the current DaVinci profile.
Gets any records or entities on the page the agent is currently viewing.
Alternatively use registerOnFocus to get the records every time the page changes.
Records on the currents page
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:
Gets the configured search layouts
Configured search layouts
Gets a sequential id. This can be used for scenarioIds and interactionIds in IInteractions.
Get details about the current user.
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
The logger that the DaVinci API will use if any error occurs
The configuration of the app provided in DaVinci Creators Studio
Checks if this app is currently visible.
This checks if the toolbar(agnet.contactcanvas.com) is visible.
true if the toolbar(agent.contactcanvas.com) is visible(maximized), or false otherwise(minimized)
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.
Urls of js files to load
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 initiate the agents logout.
See:
Reason the user was logged out
An app that integrates with a CRM should call this when the user navigates to a new page, record, or entity.
See registerOnFocus
Any records or entities that are visible on the new page.
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:
the color of the presence(green for ready, red for not ready, etc..). Any valid css color is fine(rgb, hex, etc..)
the name of the app that caused this presence change
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.
The url to open.
Call this when an action on a queue is performed, an object is returned.
An object of type any
Call this when a queue information is updated.
Example: if data in the queue has been modified, the new queue information needs to be sent to the agent to see.
An object of type any
Apps that handle interactions should use this to start an interaction when a phone number is clicked in the crm.
Called whenever an user preforms a click-to-act
Apps that handle interactions should use this to start an interaction when a phone number is clicked in the crm.
Called whenever an user preforms a click-to-dial
This registers the app to handle event if the agent starts an interaction with the contextual controls. The agent can either choose a contact added by addContextualContacts or type something in(e.g. a phone number) which will be in the displayName of the IContextualContact.
The event handler. This should start an interaction with the contact provided. The interaction should correspond to the channel type if provided
Use this to be informed if click-to-dial becomes enabled or disabled
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.
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
This function should return(via a promise) any records/entities that are currently displayed on the CRM.
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:
This is called whenever another app wants to know the current presence of the user.
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
This function should return(via a promise) the configured SearchLayouts
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.
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
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.
Called when the user navigates to a new page, record, or entity. 'records' contains any records on the new page.
This registers the app to handle interaction events, which is triggered each time an interaction changes.
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.
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:
Called when the user logs out. The registered app should logout of any services when it receives this event.
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:
Called whenever the presence or reason of the agent changes.
Apps that integrate with an application/CRM should register for this
See openMyCallsToday
This function should try to open the mycalls today link inside the crm. Ideally in a new CRM tab(not browser tab)
This can be used to intercept any DaVinci operation. Intercepted operations will have the operation's payload passed to your callback. The callback can then either:
Example
registerOperationInterceptor([
OPERATIONS.CLICK_TO_DIAL,
OPERATIONS.CONTEXTUAL_OPERATION,
OPERATIONS.CONTEXTUAL_EVENT],
async (payload: {
pluginName: string;
message: IRequest | IResponse;
}) => {
console.info('INTERCEPTED!! ', payload);
let operation;
if (isResponse(payload.message)) {
operation = payload.message.request.operation;
} else {
operation = payload.message.operation;
}
console.info('operation: ', OPERATIONS[operation]);
if (operation === OPERATIONS.CLICK_TO_DIAL) {
if (!isResponse(payload.message)) {
// force click to dial number to be 555-555-5555
payload.message.data[0] = "555-555-5555";
}
} else if (operation === OPERATIONS.CONTEXTUAL_EVENT) {
// this is an outbound typed in from the dial pad
if (!isResponse(payload.message)) {
// cancel the outbound
throw new Error('A reasonable reason to cancel');
}
} else if (operation === OPERATIONS.CONTEXTUAL_OPERATION) {
// this is intercepting transfer and the like
if (isResponse(payload.message)) {
// force transfer number to be 555-555-5555
payload.message.resolve.displayName = "555-555-5555";
payload.message.resolve.uniqueId = "555-555-5555";
}
}
return payload;
});
This function takes the original operation and then returns it (with modifications as desired) Note that another event will be sent with 'didTimeout' set if a timeout occurred because the interceptor did not reply fast enough
How long the interceptor has to respond to a request before it times out
What should happen to the original request if a timeout occurs
This registers the app to handle interaction events. While similar to setInteraction, this is meant to be used by apps that do not need to return a value to the framework as a result of the interaction. Rather, this is meant to be used by apps that need to perform some action or asynchronous processing of an interaction. If the results of this processing is an update of the interaction data, then a call to updateInteraction with the new data should be done. This emplyes a push model of interaction processing instead of awaiting a response.
This will be called each time an interaction is added or has its state changed.
Apps that handle queue actions should use this to register when an action on a queue is performed.
Called whenever an user preforms a queue action
Apps that handle queues should use this to recieve a new queue object when a queue is updated.
Called whenever an user preforms a queue update
Apps that integrate with an application should register for this to create an activity/notes when the event is received.
See saveActivity
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.
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
Called when another App requests a screenpop of the given object
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.
Called when the status of the screenpop control changes. The application should not preform screenpops when screenPopEnabled is false.
Apps that handle displaying notifications should use this to register to receive notifications.
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:
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.
Used by apps that embed agent.contactcanvas.com into a CRM. This registers the app to handle events to change the iframe's height.
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).
Used by apps that embed agent.contactcanvas.com into a CRM. This registers the app to handle events to change the iframe's height.
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).
Register to receive events where apps inform you what channels they support
Called when another app calls setSupportedChannels
This registers the apps to handle the interaction updates events
which are triggered each time updateInteractionToProvider is called.
This will be triggered whenever updateInteractionToProvider is called.
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.
Id of the created or updated activity
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.
Type of channel that caused the screenpop
Direction of the interaction that caused the screenpop
Id of the object to pop
Type of the object to pop
This sends notification to framework which will be displayed in toolbar. To Do : Different notifications based on type.
Message to be displayed on toolbar.
Type of notification.
Set the height of this app. Whenever the height needed by your app changes you should recalculate it and call this method.
Height in px
If true then DaVinci will gray out all apps in lower layers then this app. Only applies if 'Layer' config in studio is greater than 0 and height is greater than 0.
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.
Width in px
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. Calling setIntraction results in a change to the Interaction Sequence ID of the interaction, and a reset of the Interaction Sequence Update ID. Screenpops should not be performed if they are disabled: registerScreenpopControlChanged
Sets if or not the app should be visible.
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:
A valid presence
A string explaining why the presence was changed(ex: Break, Lunch, end of shift)
the UTC time when the workmode change was requested. It's used to keep track of workmode events
Sets whether or not screenpop is enabled.
See registerScreenpopControlChanged for more.
Channel Applications on the DaVinci framework must report to the framework which channel types are supported. Some DaVinci apps will disable or enable specific features depending on the channels that are available.
See:
Array of channels that will be supported by this app.
This is used to enabled and disable the toolbar. If disabled then only global apps will load.
This function sets the user attributes for current user.
Apps which are registered to process interactions should call this to update the interaction data by using the registerProcessInteraction method, should call this method to inform the framework of the updated interaction. If a update is not required, i.e., the processor did not process, or there is not change, then this method should not be called. Calling this method results in a change to the Interaction Sequence Update ID of the interaction.
Apps that want to communicate updated interaction details back to the interaction provider apps can use this API.
Apps that register using the registerUpdateInteractionToProvider will receive the data.
This is the interaction which should contain the interaction ID, scenario ID and
the data to be updated to provider in the details of the interaction.
Generated using TypeDoc
Apps can use this to provide a list of contacts to the agent.
The contacts are only displayed to the agent when your app is in the "Center(tabs)" position and is the selected tab.