Unity Application Suite SQL Server Database Integration 1.0 Introduction This document outlines the steps required to integrate the Unity Client with a Microsoft SQL Server database. Unity Integrates with these databases to provide contact lookup and inbound CLI contact popping functionality. 2.0 Setting up SQL Integration Click Tools > Custom directory > Create new as shown below. You will be presented with the screen below. The arrow buttons are used to move through the wizard, click the green arrow to advance to the next screen.
From the below screen, enter the name of your directory and SQL Server as the database server type. When integration is complete, this name will be added in the drop down list in the Directories tab. Once complete click next. Connectivity and authentication details are entered through the below screen. These are the details that are used to connect to the SQL Server. The database server name can be either an IP address or valid DNS
hostname. You must ensure your LAN is configured to connect to the server, which is outside the scope of this document. Integrated (which uses your Windows user account) or SQL authentication security models are both supported, your database administrator will be able to give you these details. In either case, please ensure that the login account has [at a minimum] read access to the named database. Once complete click next. Unity will now attempt to connect to the SQL database and login using the details provided, which may take up to a few minutes depending on the network connection etc. If Unity is unable to integrate with the database then an error message will be displayed that outlines the reason. Screenshots of the most common reasons are included below. The above error message is displayed when Unity cannot connect to the SQL Server using the connectivity details entered.
The above error message is displayed when the login failed for the specified login using SQL authentication. The above error message is displayed when the login failed for the specified login using integrated (Windows) authentication. The above error message is displayed when a database with the name entered doesn t exist, or if the login account doesn t have access permission to that database. If there are no errors the following screen will be displayed, which specifies the table or view to use when loading the directory or performing a contact lookup. Only one object can be used, so if fields from multiple tables are required then an SQL view must be created with the necessary joins.
When you select the table or view, Unity will load all fields contained in that object, from which you must select which ones to include when displaying contacts in the directory, as shown below. When selecting the fields to include, ensure that all phone number fields are ticked, as Unity will search on these fields when performing a CLI lookup (when popping contacts from this database on incoming calls). Any unticked fields will be used when searching for contacts (using the search box in the directories tab). All fields will be displayed when selecting this directory from the drop-down list in the Directories tab. You must include at least one name and one number field in the selected list. Once selected click next.
As mentioned above, when you search for a contact using the search box in the directories tab, Unity will return all entries in the SQL database that match the entered contact name or number. Because searches only display two fields (a name and a number field) you may need to join fields together in order to identify a contact. In the below screenshot we are instructing Unity to join the first and last names together in the contact name column when searching. You may also want to include a company name here, but be aware that there is limited space available in the list when showing contact details. You must specify at least one field to be included in the contact column when performing a search. Once complete click next.
The below screen is used to apply a filter when displaying the directory. This is so that only those contacts that are relevant are included in Unity. For example, there is no need to include contacts with no phone number. We also may only want to include contacts with a first and last name, so that we can identify them correctly. The below screenshot shows how this would be configured. What we are actually saying here is only show contacts that have a first name and a last name, and that have a VoIP number or mobile number.
At least one contact field and one phone field must be selected, but if you want to include all contacts regardless of the information (of lack of) for each contact, you would use the below configuration. This would typically be the case when using a view, as the SQL query itself will perform any required filtering. Once complete click next. The below screen is used to specify the order in which you would like the fields to be displayed when showing the directory. This is not a required step but is recommended to ensure the directory is displayed clearly. Once complete click next.
You are now ready to create your directory entry which will be used by Unity to connect to the SQL Server database every time it is started. Review the information provided in the summary screen, then click the green tick to create the directory. The below screen is then used to specify if this directory should be included (in addition to the group/enterprise, personal and common phone directories, as well as any Outlook contacts) when searching using the search box, and also when performing a CLI contact lookup. If your connection to the SQL Server is slow you may not want to select these settings as it could result in Unity not running as expected while waiting for the SQL Server to return contact details. If you have selected to include the SQL directory when performing a CLI lookup (which is used to pop contact details using the CLI of the remote caller) you can also tell Unity to search this directory first, then if there is not a match to look at the other directories. If this option is not ticket Unity will only search this directory if contact details were not found by searching the other directories first.
3.0 Showing the Directory To show this directory in Unity, simply go to the Directories tab and select the Directory Name (as entered when setting up the integration) to display the contacts. Please be aware that is may take some time to load all the contacts, depending on the number of contacts and the connection to the SQL Server. Note that all the fields you selected are displayed, and that the appropriate filtering has been applied to that only contacts with a first and last name are present. Note also that the fields are shown in the order specified. Unity has ordered the directory by the first field, this is done by default. You can click on the column names to re-order the list. To call a contact, simply right-click the contact and dial the number required, as shown below.
4.0 Searching the Directory Assuming you have selected to include this directory when performing a search, you can use the search box in the Directories tab to search for a particular contact, as shown below. Please note that you must either click the search icon or press the enter key when entering the search criteria to include the custom directory. Unity will not search this directory on every keystroke. If a contact has multiple numbers then a separate record is displayed for each number, as you can see with Colin Roberts above. Note also that Unity has joined his first and last names together in the name field, as we configured it to do when setting up the directory. To dial a number simply double-click the directory entry or right-click and select dial. 5.0 Editing the Directory
You can edit directories by clicking tools > custom directory > edit > then selecting the name of the directory you entered. You are then taken back to the wizard and can change details are required. 6.0 Sharing the Directory File As mentioned above, once Unity creates the directory it is available each time Unity starts. That is because the details are stored in an encrypted XML file called DirectoryConfiguration.xml, which is saved to the install directory (by default this is C:\Program Files\Unity Client). Rather than have to setup the directory for all users in a company, you can copy and paste this file to a shared location, then simply point other Unity clients to use this file to load directories when starting. To do this, go back to the custom directory wizard, but this time click the Use existing configuration file link rather than entering the directory name and type. You will then be able to specify the directory file to use, as shown below. When you click next Unity will open the file and attempt to connect to the SQL (or any other) directory, and if successful include it in the below list. When you click the green tick Unity will always use this file to integrate to the custom directory, meaning that if a change is required, you can simply make the change to this single file and all Unity clients will be updated then next time they are opened.