web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

How to troubleshoot and debug Channel Integration Framework (CIF) v2 Custom Channel Provider Code

Vinoth Balasubramanian Profile Picture Vinoth Balasubramanian

You have requested more help on how to troubleshoot and debug CIF V2 Custom Channel Provider code. It is possible to do it with browser developer tools, but we lacked clear documentation on how to do it.

This blog post will walk you through how to debug your CIF code one step at a time.

How to debug Custom CIF channel Providers?

  1. 1.  Open ‘Customer Service Admin Center’ app and navigate to Agent experience profile. Ensure that your Custom CIF Channel Provider(s) is enabled under the desired profile.

             

             
  2. 2.  Make a note of your Agent Experience Profile Unique Name. This will be used as a reference in further steps.

             Unique Name: ft_agentprofile

             
  3. 3.  Ensure your user account (or needed user accounts) are assigned to the Agent Experience Profile. Use ‘Add users’ button to add the needed users to the profile.

             
  4. 4.  Make a note of your Custom Channel Provider Unique Name and GUID. This will be used as a reference in further steps.

             Unique Name: new_CIFwebResource
              GUID: 7b554d37-f367-eb11-a812-00224803f590

             
  5. 5.  Reload Customer Service Workspace (CSW) app to ensure your recent configurations are taken effect.       
  6. 6.  Open browser Developers Tools (by pressing F12).

             
  7. 7.  Navigate to Console tab in browser developer tools and search for your Agent Experienece Profile Unique name (ft_agentprofile) noted down in step 2.

             You should see a call to that App Configuration in the console logs.

             
  8. 8.  Search console logs with your Channel Provider record Unique Name (new_CIFwebResource) or GUID (7b554d37-f367-eb11-a812-00224803f590) noted down in step 4.

             You should see a message call to your channel provider.

              
  9. 9.  Ignore any failure shown on ‘addChannelInfoInTelemetry’ method, it’s not a blocker.

             
  10. 10.  You should also see your Custom Channel Provider URL loaded and available under JavaScript context dropdown as shown below.

             
  11. 11.  You can also see your custom channel provider source code shown under Sources tab.

             top à SidePanelIFrame àWebResource àcrcb1_CIFWidgetWebResource

             
  12. 12.  Feel free to add debugger and validate your code.

             

             
  13. 13.  You can also run ad-hoc runtime script to validate from the console tab. Make sure to select your Custom Channel Provider under JavaScript context dropdown while executing as mentioned in step 10.     
             

CIF API Reference

Refer CIF v2 documentation for supported methods, events and API’s.
Microsoft.CIFramework (JavaScript API Reference) for Channel Integration Framework 2.0
 

Testing Sample

Sample 01: CIF v2 JavaScript executed from console to ‘Set the Communication Panel mode to docked’.



Communication Panel is set to docked.
            

            


Sample 02: CIF v2 JavaScript executed from console to invoke notification.



Sample 03
: You can also invoke your code function present in your custom channel provider code directly from the console.

Below is an example of how launchNewSession function present in channel provider code can be directly executed from console. 



 

Comments