Customization of MetaDirectory replicator

Since the action should dynamically pass the company name of the contact making the call, it is important that this is also maintained in the MetaDirectory.

Since this field is not yet filled in our training environment, it is necessary to discuss in advance with the customer where this information is located.

FunnyCRM is based on a Microsoft Access database. The contacts, which have already been connected in Task B, are located in the "Contacts" table. The names of the companies are in the table "Company". Between the tables "Contacts" and "Company" there is a 0/1-to-N relation. It means that in the "Contacts" table you will find only the ID of the company. In such a case, for example, in cooperation with the customer or possibly on your own initiative, you can create a corresponding SQL statement, which will be stored in the replicator.

With the SQL statement, it is possible to create very flexible queries on a database with an ODBC replicator that looks at a Microsoft Access or also Microsoft SQL database, for example.

SQL statement

select 
Contacts.*, 
company.companyName, 
company.Street as CompanyStreet, 
company.City as CompanyCity, 
company.PostalCode as CompanyPLZ, 
company.Country as CompanyCountry  

from Contacts

left join Company on contacts.CompanyID = Company.CompanyID
XML

When selecting the table in the database wizard, the data source selection can be changed to "Enter SQL select statement". Subsequently, a text box appears under the drop-down menu, in which the corresponding SQL statement is entered.


After clicking on "next", the field assignment is queried. Now the field "companyName" appears in the source which is assigned to the target field "company" via drag and drop.


The rest of the settings in the replicator remain unchanged.

After the replicator is run the next time, the "Company" field is filled for most contacts in ProCall.


Creating a custom action in ProCall


The next step is to create a custom action.

To do this, navigate to the user-defined actions in the ProCall client:


In the following dialog, a new action is created via the "Add" button:


The following parameters are defined in the action:



ParameterDescription
Action nameThe action name can be freely defined and will be displayed later in the client. It should be chosen in such a way that the users can later recognize what this action is for.
ApplicationHere you define the path to the application that should be executed. In our example it is the Google Chrome browser (path: C:\Program Files\Google\Chrome\Application\chrome.exe).
Command line

In the command line, the string is passed to the previously specified application (here Google Chrome). In this example we want to start a Google search for the company of the caller. 
That means we need the URL to launch a Google search and additionally we need dynamically the company name of the respective caller (i.e. the caller that is currently displayed in the call window).
In our example, the URL is https://www.google.de/search?q= + company.

Using the "Add field" → "Contact" → "Company" button, the name of the company can be added to the command line.

This results in the following command line (including quotes):
"https://www.google.de/search?q=<Contact.Company>"

To find the URL, you can simply search for something via Google:


In this example, the search was for "test".

The static part that must be passed to the application is: https://www.google.de/search?q= 
The search word "test" is then dynamically replaced by the name of the company. 

Many web-based applications (e.g. some CRM systems) can be accessed in a web browser in this way. It must be discussed with the customer how this URL is to be set up (e.g. https://CRMServerName.domain/ContactID=123456789/). The ID of the contact from the CRM system can then be replicated via an appropriate adjustment to the replicator in the MetaDirectory, e.g. in the Cumstom0 field, so that this can then be transferred to the web browser in the action.
A corresponding command line to call the calling contact in the customer's CRM system could then look like this
 "https://CRMServerName.domain/ContactID=<Contact.Custom0>"

After creating the action, it will appear in the "Custom actions" view:



DesignationDescription
1FilterA filter can be used to define when the action is to be displayed or hidden. In this example, the action should only be displayed if a company is also maintained in the contact. The configuration of the filter is done in the next step.
2Menu integrationControls whether the action should be displayed in the menu. (Visible when right-clicking on a contact in ProCall) – not desired in this example.
3Call window integrationControls whether the action should be displayed in the call window – desired in this example.


Filter: Since the search for a company makes no sense if no company is stored for the calling contact, the action should only be displayed if a company is also stored.

By clicking on the filter symbol next to the action name, a window opens in which the corresponding filter can be stored:

The "Add" button is used to add the field whose content is to be checked – in this example Contact.Company.
"<Contact.Company>" field. In this example, a simple . (dot) is enough to identify whether the Contact.Company field contains anything or whether it is empty.


You can find more information about regular expressions in the F1 help or in our Support Portal.

Values can be entered in the Sample value field to check if the regular expression works:

The configuration of the action is now complete, so it can be tested: