Skip to content

Latest commit

 

History

History
131 lines (98 loc) · 10.6 KB

File metadata and controls

131 lines (98 loc) · 10.6 KB
title description ms.date ms.topic author ms.author ms.custom
Microsoft.CIFramework (JavaScript API Reference) for Channel Integration Framework 2.0
Includes reference information about the Microsoft.CIFramework JavaScript methods for Dynamics 365 Channel Integration Framework 2.0.
02/07/2024
reference
gandhamm
mgandham
dyn365-a11y
dyn365-developer

Microsoft.CIFramework methods (JavaScript API reference) for Dynamics 365 Channel Integration Framework 2.0

Microsoft CIFramework provides methods to use JavaScript API to manage the communication panel (widget), notification, application tab, sessions, records, and forms in the Dynamics 365 model-driven app.

Important

  • The APIs are supported only from the active channel providers configured in your organization.
  • The CIFInitDone event handler must be invoked before calling the other APIs.
  • The time-out limit for the APIs is 100 seconds. If the APIs don't run within 100 seconds, they must be run again with changed parameters or scope.

Communication panel management APIs

The communication panel is where you as an agent interact with the customer. Partner widgets built using Channel Integration Framework 2.0 are loaded in this panel. The widget in this version is displayed to the left of the session panel and supports Docked, Minimized, and Hidden modes.

Use the following APIs to manage the state of the communication panel (widget).

Methods Description
setWidth [!INCLUDEsetWidth-description]
getWidth [!INCLUDEgetWidth-description]
setMode [!INCLUDEsetMode-description]
getMode [!INCLUDEgetMode-description]

CRUD operations APIs

Use the following APIs to perform CRUD operations on entity records.

Methods Description
createRecord [!INCLUDEcreateRecord-description]
retrieveRecord [!INCLUDEretrieveRecord-description]
updateRecord [!INCLUDEupdateRecord-description]
deleteRecord [!INCLUDEdeleteRecord-description]

Notification management APIs

Use the following APIs to display or cancel notifications about incoming conversations.

Methods Description
notifyEvent Displays a notification that can be used to inform agent about an incoming conversation.
cancelEvent Hides or cancels a notification based on the cancellation token, as specified in the notifyEvent method.

Application tab management APIs

Use the following APIs to create and manage the state of an application tab.

Methods Description
createTab Creates a tab in a focused session and returns the unique identifier of the created tab.
getTabs Returns an array of tab identifiers associated with template name or template tags for tabs in the session in focus, if the session belongs to the channel provider.
focusTab Sets the focus on a tab, if the focused session belongs to the channel provider and if the tab belongs to the session in focus.
getFocusedTab Returns the tab identifier in a focused session, if the session belongs to the provider.
refreshTab Refreshes the tab.
setTabTitle Sets the title of the tab, if the focused session belongs to the channel provider and if the tab belongs to the session in focus.
closeTab Closes the specified tab in the current session.

Session management APIs

Use the following APIs to manage sessions in a multisession provider environment.

Methods Description
canCreateSession Allows you to check if a new session can be created.
createSession Creates a session based on the session template defined as part of the template and returns the unique identifier of the session that was created.
getSession Returns an object containing the unique identifier of the session, context, and the value of isFocused parameter, if the session belongs to the channel provider.
getFocusedSession Returns the unique identifier of the session that is in focus, if it belongs to the channel provider else returns null.
getAllSessions Returns the array of session identifiers for a channel provider.
setSessionTitle Sets the session title, if the session belongs to the channel provider.
requestFocusSession Sets the focus on the session whose session identifier is passed as a parameter, if the session belongs to the channel provider.

Channel analytics APIs

Use the following APIs to track event analytics.

Methods Description
logAnalyticsEvent Invoke this method to log analytics for custom events.

Session indicator APIs

Use the following APIs to indicate a key performance indicator (KPI) breach and to update the number of new activities in a particular session.

Methods Description
notifyKpiBreach This method is used to indicate a KPI breach. When this method is used, a red circle appears on the display image of the contact when a KPI breach has occurred.
notifyNewActivity This method is used to update the number of new activities in a particular session.

Presence APIs

Use these APIs to set and retrieve the Omnichannel agent presence programmatically. You can use these methods when a blended agent is working on a third-party application with omnichannel, and you want to synchronize the presence states between different applications to ensure that agent capacity is optimally utilized.

Methods Description
setPresence​ Allows presence to be set programmatically for the agent in the client session​.
getPresence​ Allows presence to be returned programmatically for the agent in the client session​.

Miscellaneous methods

Methods Description
getEntityMetadata [!INCLUDEgetEntityMetadata-description]
setClickToAct [!INCLUDEsetClickToAct-description]
getClickToAct [!INCLUDEgetClickToAct-description]
searchAndOpenRecords [!INCLUDEsearchAndOpenRecords-description]
getEnvironment [!INCLUDEgetEnvironment-description]
openForm [!INCLUDEopenForm-description]
renderSearchPage [!INCLUDEopenForm-description]
addHandler [!INCLUDEaddHandler-description]
removeHandler [!INCLUDEremoveHandler-description]
raiseEvent [!INCLUDEraiseEvent-description]
updateContext This method allows you to set the automation dictionary.
updateConversation This method allows you to update a conversation record.

See also

What's new in Dynamics 365 Channel Integration Framework
System requirements for Dynamics 365 Channel Integration Framework 2.0

[!INCLUDEfooter-include]