2. Enter the connection information:
- Server: the server name or IP address. For MS SQL Server can include the instance name or port number when needed, e.g.:
- Port: the port number on which the connection must be established. Not applicable to MS SQL Server.
- Database: the name of the database to use.
- Username: the username to use to connect to the database.
- Password: the password to use to connect to the database.
3. Enter the Lookup SQL Statement. This must be a SELECT statement returning the following case-sensitive columns: contactid, firstname, lastname, companyname, email, phonemobile, phonemobile2, phonehome, phonehome2, phonebusiness, phonebusiness2, phoneother, faxbusiness, faxhome, pager, photourl. If your database table has different column names, you can change the name returned as follows:
SELECT id as contactid, first_name as firstname, last_name as lastname, email as email, phone as phonebusiness, mobile as phonemobile, fax as faxbusiness FROM contacts WHERE phone LIKE ‘%[Number]%’ or mobile like ‘%[Number]%’ or fax LIKE ‘%[Number]%’
4. Enter the Contact URL prefix and suffix. These are required to create the Contact URL, which is the concatenation of the Contact URL Prefix, the ContactID returned by the database, and the Contact URL Suffix. This Contact URL is considered the key for the contact in 3CX Contacts, and is used to update the contact if any change is detected in the database. Also, this Contact URL is shown in the 3CX Web Client, so if you have a web page to show the contact record, use these settings to create the URL to point to that page.