(2.0) Deployment Guide
Create a Salesforce Account
The first thing required to use CTI connector is having a salesforce account. If you don’t have an account already visit https://login.salesforce.com to create one.
Install Expertflow package
Login to Salesforce and copy-paste the installation link given for the package. Select the “Install for all users” option from the installation wizard, it will start installing the package and notify you when it’s done.
Note: If you have previously installed package then update the package via below link.
- Installation Link: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5g000000EKmL&isdtp=p1
In case of any issues faced during installing a package, you can refer to the relevant documentation at https://help.salesforce.com/articleView?id=distribution_installing_packages.htm&type=5
Configure CTI Adapter URL
In order to configure the CTI Adapter Url field, we must know how the CTI Adapter Url field is populated? Its value depends on a number of factors like the package you installed was a managed or unmanaged package or whether you are using your own custom domain or not. Based upon these parameters adapter URL is configured.
- /apex/loginUI
- /apex/namespace__loginUI (when using a managed package. In order to find namespace from quick find enter installed packages then see namespace prefix from the Expertflow package)
- HTTPS://<myDomain>.my.salesforce.com/apex/loginUI (when using My Domain)
- HTTPS://<namespace-dev-ed>.my.salesforce.com/apex/namespace_loginUI (when using a managed package and My Domain)
From Setup, in the Quick Find box, enter Call Centers, then select Call Centers. On the next page, press Continue. Open Call Center with the name “Expertflow Call Center Adapter” and click Edit. Populate the field based on the package type (Managed/unmanaged) and if you are using a custom domain or not.
Documentation reference: https://developer.salesforce.com/wiki/lightning_open_cti
Assign users to call center
Open Call Center with the name “Expertflow Call Center Adapter”. Towards the bottom you’ll find the “Manage call center users” option, if you can’t find manage “Manage call center users” then first save the call center and then look for same option. Click this option and on the next page click “Add more users”, select desired user(s), and then click “Add to call center”.
Documentation Reference: https://help.salesforce.com/articleView?id=cti_admin_manageagentsadd.htm&type=5
Enable Custom object tab
- From Setup, in the Quick Find box, enter Tabs, then select Tabs.
- Click New in the Custom Object Tabs related list.
- Select the custom object “agent” to appear in the custom tab.
- Click the Tab Style lookup icon to show the Tab Style Selector and select any according to your preference.
- Other fields are optional. once done, click next.
- Choose the user profiles that you want to have access to the new custom tab, preferably select all profiles if not already and click next.
- Choose the user profiles that you want to have access to the new custom tab, go with defaults. You must select your application if not selected already.
- Select the Append tab to users' existing personal customizations then press “save”.
Reference documentation link: https://help.salesforce.com/articleView?id=creating_custom_object_tabs.htm&type=5
Create and configure a lightning app
From Setup, in the Quick Find box enter App Manager. Open app manager, Click “New Lightning App” from the top right corner. Enter the name of the app and developer, other options are not mandatory but if you want you can choose according to your preferences. Select next, go with the default options and click next. Click “Add Utility Items”, type “Open CTI softphone” add the softphone to your app by clicking it. Set panel height to 500 and width to 400 and click next. On the next screen, add accounts, contacts, leads, tasks, and agents from available items. Last but not least select all profiles and add them. After adding them click “Save & Finish”.
Add configurations in custom settings
Admin Configurations
- Select “Manage” from the “admin” setting.
- Click “new” and then in the username field provide admin username value like "admin".
- In password field provide admin password value like "password", then save.
Call States Configuration
- For callStates use, provide call types according to the finesse version.
- Values for UCCE 12.0 and UCCX 11.6 have been provided below.
- For outboundType types for UCCE 12.0 should be "OUT,AGENT_INSIDE,OUTBOUND,OUTBOUND_PREVIEW".
- OutboundType types for UCCX 11.6 should be "OUT,AGENT_INSIDE,OUTBOUND,OUTBOUND_DIRECT_PREVIEW"
UCCE 12.0
UCCX 11.6
URLs Configuration
First of all, we would enter your finesse server url for establishing a connection.
- From Setup, in the quick find box, search “Custom settings”. Open custom settings and click “Manage” from “Configuration Url” setting.
- At the top of “Default Organization Level Value,” you will find “new”, click it.
- On the next page enter your finesse url in “connectionurl” field with port 7443 and protocol http-bind like this “https://uccx116p.ef.com:7443/http-bind/”
- In the domain field enter your domain for finesse as “uccx116p.ef.com”
- In the salesforce_domain field provide your salesforce domain for example "expertflow4-dev-ed.lightning.force.com".
In the xmlNamespace field provide xml namespace value to be "http://jabber.org/protocol/pubsub#event".
- Once added, click Save.
Reason Code Configuration
- Select “Manage” from the "DefaultReasonCode" setting.
- Click “new” and then in the notReadyCode field provide one NotReady reason code like "26".
Explanation
You can get reason codes as
- Get NotReady reason codes from API. It can be accessed via https://fdqn:8445/finesse/api/ReasonCodes?category=NOT_READY. Provide credentials for admin to access Reason codes.
- From the list of reason codes choose a reason code from uri tag, for example <uri>/finesse/api/ReasonCode/19</uri> then in this case code will be 19.
- Once you have the reason code, place it in notReadyReasonCode field and save.
Finesse Type Configuration
- Select “Manage” from the "finesseDeploymentMode" setting.
- Click “new” and then in the finesseFlavor field provide either "UCCE" or "UCCX" and save.
License Configuration
- Select “Manage” from the “License” setting.
Click “new” and then in the key field provide value "RXhwZXJ0ZmxvdyBBcHA" and save.
Screen Pop Configuration
To manage our priority for searching records when a call is ringing/initiated you need to provide your preferences here.
- From the custom setting page, this time select “Manage” from the “search_records”.
- Click “new” and then in the priority field enter the priority for searching Contacts, Accounts, and Leads in your application like “Contacts, Accounts, Leads”.
- Then we need to set searchFields property, enter the fields you want to be searched for phone number like "Phone,HomePhone,MobilePhone".
- Then we set newRecord field, you need to provide whatever new entity you want to create when there is no matching number in CRM like "Account".
- Then we set LeadsCompany field, it is used to populate the Leads entity's company (required field in case of Leads) when creating a new Lead object like "Expertflow"
- After that we need to set AniLength field, it is used to trim the AniLength upto x number of digits, for example is populated like "10".
Explanation
- In the priority field if you enter “Contacts, Accounts, Leads” in your field then contacts will be searched first then accounts and lead at the end. If you don’t want to search for any specific object among these, then don’t include it.
- For searchFields property, you can provide multiple fields for searching phone number. For example, if you want to search the phone number in 3 fields Phone, HomePhone and MobilePhone then you need to enter "Phone, HomePhone, and MobilePhone" (field names can be seen from Object manager → Choose Object → Click Fields and Relationships) and it will search these fields while matching the phone number during the call for a popup.
- For newRecord field for example, In case of no match you want to create a new Account then you provide "Account" as a value. Other options include Contact and Leads.
- For LeadsCompany field for example, you want the company name to Expertflow when a new lead is created in case of no match, then you enter "Expertflow".
- For AniLength field, for example, you have a number "0300123456789" and you want the only 10 digits that will be "0123456789", then you enter value "10" in field. The point to note here is that it counts digits from right to left.
Call Variable Configuration
- Select “Manage” from the "Variable" setting.
- Click “new” and then in the Call/ECE Varaiable Name field provide the call variable name or ece variable name for example "callVariable5".
Explanation
- Provide a variable name that is not already set at the time of landing an inbound call i.e its value should be null beforehand.
Documentation Reference: https://help.salesforce.com/articleView?id=cs_add_data.htm&type=5
Enable Logs
From Setup, open “Object Manager” in the top left adjacent to “Home”. Open it and then open search “agent”, once found open that. From the left pane, select “Page Layouts”. Open agent Layout, there will be multiple sections on the next page, from the top section navigate to the drop-down list provided and select “Related lists”. Select “Notes and Attachments” from the right panel and then drag it to the “Related Lists” panel at the bottom. Once added, click save from the top left.
Configure Fields for tasks
From Setup, open “Object Manager” adjacent to “Home” and search for “Task”, open Task. Click “Fields & Relationships” from the left panel. For the fields “Call Duration”, “Call Result”, “Call Type” perform the following set of actions for each of these
- Click the Field, such as “Call Duration”
- Click “View Field Accessibility”
- From Field Accessibility for Field drop-down menu, Select respective field such as “Call Duration”
- Select Field Access (Read-only) from “Standard User”
- In the “Page Layout” section tick the checkbox “Visible”.
- Click Save
Perform these steps for all three fields separately.
Connect to VPN
In order to use the application, make sure you are connected to VPN if your finesse services access is restricted to a VPN connection. Otherwise, you do not need to connect to VPN.
SSL Certificates
Before using application accept SSL Certificates for Finesse to avoid any issue.
Login agent
Open your application from the top left 9-dotted pattern icon, adjacent to “Setup”. If you can’t find it, search using the name you used while creating an application. Once opened, Maximize Softphone by click on “Phone” from the bottom left corner, enter agent credentials, and press login.
CORS Cisco Finesse
To check the status of cors configuration for finesse, access finesse via CLI (SSH) and run the command "utils finesse cors status". By default, It should return that cors is enabled for all origins. However, if it is not enabled, then you can enable it via 2 methods:
- To enable cors for all origins, run command "utils finesse cors enable_all". After this, you will need to restart two finesse services by "utils service restart Cisco Finesse Tomcat" and "utils service restart Cisco Unified CCX Notification Service"
- To enable just for some specific origin, run command "utils finesse cors enable" and then "utils finesse cors allowed_origin add https://xyz.com". After this, you will need to restart two finesse services by "utils service restart Cisco Finesse Tomcat" and "utils service restart Cisco Unified CCX Notification Service"
We have experienced that these methods do the job for most finesse versions, however, we came across one specific version (CCX 11.6.2) where cors wasn't enabled for Salesforce CTI even after executing these commands. If you encounter such an issue, please run commands in the following order:
- - utils finesse cors disable
- - utils service restart Cisco Finesse Tomcat
- - utils service restart Cisco Unified CCX Notification Service
- - utils finesse cors enable
- - utils service restart Cisco Finesse Tomcat
- - utils service restart Cisco Unified CCX Notification Service
- - utils finesse cors allowed_origin add https://xyz.com
- - utils service restart Cisco Finesse Tomcat
- - utils service restart Cisco Unified CCX Notification Service
- - utils finesse cors status