contacts duplicate check

Hi. I'm trying to modify the duplicate check filter for Contacts module.

I'm using the instructions at https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_12.0/Architecture/Duplicate_Check/

and have added the code below to the location ./custom/Extension/modules/Contacts/Ext/Vardefs/duplicate_check_email_v7_twitter.php

The example removed the 'shipping_address_city' field, I have tried to use the same theory to add the 'twitter' field to test with but as far as I can tell it has made no difference.  

Can any of you see what the issue is please?

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
$dictionary['Contact']['duplicate_check']['FilterDuplicateCheck'] = array(
'filter_template' => array(
array(
'$and' => array(
array('twitter' => array('$starts' => '$twitter')),
array('first_name' => array('$starts' => '$first_name')),
array('last_name' => array('$starts' => '$last_name')),
array('accounts.id' => array('$equals' => '$account_id')),
array('dnb_principal_id' => array('$equals' => '$dnb_principal_id')),
),
),
),
'ranking_fields' => array(
array(
'in_field_name' => 'twitter',
'dupe_field_name' => 'twitter',
),
array(
'in_field_name' => 'account_id',
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Also, would the updated duplicate check happen at the point of entry like it currently does if it matches a name, or is this for the 'Find Duplicates' you can run when in a record?

Thanks
James