CRM lookup is working but URL opened is for the old contact

Status
Not open for further replies.

johngibson83

Free User
Joined
Mar 10, 2020
Messages
21
Reaction score
0
I'm still in the process of investigating this but we have the situation that phone numbers aren't unique identifiers, to solve this we do the lookup against a reduced list where each phone number does uniquely identify a contact. The CRM API then returns a URL for the contact which is opened by the WebClient.

However when this list is updated there might be a new contact for the number. I see a new contact being created on 3CX but unfortunately the WebClient is opening the URL for the old contact.

The calls are more than 10 minutes apart and as I mentioned, the fact that a new contact is appearing suggests the CRM is being queried.

Am I losing my marbles/doing something silly or is this expected? I know I could click delete CRM contacts and this does work but I will need to find a more automated solution.
 
When you have more than 1 contact in 3CX Contacts that matches the caller number, even if the contact lookup is triggered, and a second contact is added to 3CX, only the first matched contact is sent to the Web Client. So, the Web Client will continue poping up the URL of the first contact that was added to 3CX Contacts with that number. This is by design and can't be changed. The only way to avoid using this contact would be deleting it from 3CX Contacts.
 
Thanks for the response.

I see, I figured it must be something like that. I believe there was an API which is now undocumented. Is there any other automatic way of scheduling all CRM contacts to be deleted?

I haven't seen any way to modify contacts from a call flow app but if that was possible it would also solve the problem.
 
I see, I figured it must be something like that. I believe there was an API which is now undocumented. Is there any other automatic way of scheduling all CRM contacts to be deleted?
Yes, the Call Control API lets you do this, but there is no documentation...

I haven't seen any way to modify contacts from a call flow app but if that was possible it would also solve the problem.
Using a CFD app you would need to use a C# script:
C#:
Tenant tenant = PhoneSystem.Root.GetTenant();
List<PhoneBookEntry> contactList = new List<PhoneBookEntry>(tenant.PhoneBookEntries);
for (int index = 0; index < contactList.Count; ++index)
{
    if (!String.IsNullOrEmpty(contactList[index].Tag))
    {
        contactList[index].Delete();
        contactList.RemoveAt(index);
        --index;
    }
}
 
Thanks again Ernesto, that should work.

Out of curiosity, is it possible to create the contact in the call flow app instead of via CRM integration?
 
Out of curiosity, is it possible to create the contact in the call flow app instead of via CRM integration?
Yes, it would be possible using this same API to create the contact.
 
Status
Not open for further replies.

Forum statistics

Threads
112,325
Messages
591,898
Members
165,479
Latest member
Senergia