Installation

The following is required for the Telavox add-on to work:

  • Telavox Desktop Client installed and configured
  • Lime CRM Desktop Client v. 10.16 or later for being able to use the installed Telavox add-in.

Follow these simple steps to get the Telavox add-on up and running:

This part of the add-on handles the incoming calls to the users Telavox client which opens the correct person card in Lime. Lime tries to map the incoming calls phone number to a person in the Person-table by searching on mobilephone and then phone if no mobilephone is found.

Telavox client

The user needs a valid Telavox account and the desktop client installed on the computer for the incoming calls add-on to work. In the client, under File –> Settings –> Application activate “Run command on answered calls” and add the following code snippet into the input field:

limecrm:person.APP-name.SERVER-name?command=softphone&phoneNo=%NUMBER%

See below for example:

Note!

Before adding the link in Telavox Desktop Client, the consultant/customer needs to contact his Telavox Advisor or support to make this tab available. It is only visible in the desktop client after activation from Telavox.

New fields

Two new fields need to be added to the card for whatever table chosen for mapping. Default for the add-on is the person-table to map against.

Both phone_clean and mobilephone_clean are formatted text fields with type Phone Number and Mobile Phone Number respectively. The fields should be hidden on cards and read-only. On all of these fields there is a SQL for update to format the numbers to a Telavox-supported number format. See below, which “cleans” the phonenumbers:

 LTRIM(RTRIM(REPLACE(REPLACE([‘TABLE’].[‘FIELD’],' ',''),'-',''))) 

For example, the following code should be used if you are using the person-table and phone-field:

 LTRIM(RTRIM(REPLACE(REPLACE([person].[phone],' ',''),'-',''))) 

After the fields are added - make sure that the fields are updated. If you have few persons, you can simply massupdate the fields in the desktop client (make sure that they are not set as read-only before). Otherwise you need to do this in the database through the following code:

UPDATE *table*
SET *column*= LTRIM(RTRIM(REPLACE(REPLACE([phone],' ',''),'-','')))
FROM *table*

VBA

Start off by copy and paste the first sub from the “thisApplication.txt” file into Project→Lime Objects →ThisApplication in the VBA. Then drag and drop the “Softphone.bas” file into the VBA, change the field-names and database table in Softphone module if needed to get the add-on to work.

Outgoing calls are made using Telavox Flow desktop client from Lime CRM by enabling the add-in through the desktop client. This is done by going to Tools –> Add-ins and highlighting Telavox Flow and pressing “Load on startup” and “Loaded/Unloaded”. This requires version 10.16 or above of the desktop client. See image below.

You will be asked to enter your credentials before using the ad-din.

Older versions of the desktop client

This parts of the add-on handles outgoing calls made from Lime through the Telavox client. If you are using a Lime CRM Desktop Client 10.14 or above, it is possible to click each phonenumber for making the outgoing calls through the sub Application_DialOut, otherwise you need to add the links in the Actionpad as described below.

New fields

In the coworker card two new text fields need to be created to store the users Telavox login information. There is logic in the VBA that only shows these fields for the user that the card belongs to or an admin. The fields should only be visible on cards and be textfields with length 32.

VBA

Start off by copy and paste the second sub from the “thisApplication.txt” file into Project→Lime Objects →ThisApplication in the clients VBA. Then drag and drop both “JsonConverter.bas” and “Telavox.bas” into the VBA. Jsonconverter.bas is used to parse the JSON response from the API call and Telavox.bas is for the integration. Telavox.bas consists of three subs and functions, first one to authenticate the user, second to dial the selected number and the third and final one to extract chosen number depending on which link in the Actionpad you clicked. The only thing needed to be changed is the getNumber() sub depending on what you called your fields in LISA and what table you have mapped against. Lastly “ControlsHandlerCoworker.cls” needs to be added, to handle the logic of the Telavox login info fields on the Coworker card. If there already are a ControlsHandlerCoworker.cls then add the following code to the Setup() sub (indentations need to be added on own accord).

If ActiveUser.Administrator Or m_Controls("username") = ActiveUser.ID Then
Call m_Controls.SetVisible("telavox_username", True)
Call m_Controls.SetVisible("telavox_password", True)
Else
Call m_Controls.SetVisible("telavox_username", False)
Call m_Controls.SetVisible("telavox_password", False)
End If

If ControlsHandlerCoworker.cls don’t exist drag and drop the file into the VBA and declare the class like usual in GeneralControlsHandler or whatever class that handles the ControlsHandlers in the clients Lime version.

Actionpads

The Actionpads differ depending on if you are adding them in the main Actionpad or on a Person card. The difference in the code, for example for person, explorer and inspector is the parameters sent to the VBA module. The same goes for phone and mobilephone.

For Bootstrap-actionpads:

Inspector:
<ul class="menu">
   <li data-bind="text:person.phone.text, vba:'Telavox.getNumber, inspector, person, phone', icon:'fa-phone'"></li>
   <li data-bind="text:person.mobilephone.text, vba:'Telavox.getNumber, inspector, person, mobilephone', icon:'fa-mobile-phone'"></li>
</ul>

Explorer:
<ul class="menu">
   <li data-bind="text:person.phone.text, vba:'Telavox.getNumber, explorer, person, phone', icon:'fa-phone'"></li>
   <li data-bind="text:person.mobilephone.text, vba:'Telavox.getNumber, explorer, person, mobilephone', icon:'fa-mobile-phone'"></li>
</ul>

For older Actionpads:

(Phone, Explorer):

<div class="row"><img src="images/telephone2.ico" width="18" height="18"><A href="#" onclick="JavaScript:VBA.Run('Telavox.getNumber', 'explorer', ‘person’,  'phone');">Ring <SPAN class="highlight">Direktnummer</SPAN></A></div>

(Mobile, Inspector):

<div class="row"><img src="images/mobile_phone.ico" width="18" height="18"><A href="#" onclick="JavaScript:VBA.Run('Telavox.getNumber', inspector, ‘person’,  'mobile');">Ring <SPAN class="highlight">Mobilnummer</SPAN></A></div>

The HTML might differ depending if the Lime version uses Bootstrap or not. Example .html files used for this integration, see “flik_kontaktperson.html” for explorer HTML and “kort_kontaktperson.html” for inspector HTML.

  • Last modified: 2 years ago
  • by Fredrik Eriksson