Solved: Custom CRM - phonebook entries added multiple times

Discussion in 'CRM / Helpdesk / App Integration' started by KLor, Feb 16, 2018.

Thread Status:
Not open for further replies.
  1. KLor

    Joined:
    Feb 16, 2018
    Messages:
    3
    Likes Received:
    0
    Dear 3cx-Fans,

    I've created a simple crm integration like described in

    https://www.3cx.com/docs/server-side-crm-template-xml-description/
    https://www.3cx.com/blog/releases/crm-integration-diy/

    Everything works fine the first time. The lookup works fine in test and productive use:

    http://pbx:5000/api/CrmList/test?num=134567&ext=021

    After a real call from outside, the contact was added to the "3cx Company Phone Book".

    If the caller comes the second time, the "nice name" from phone book is displayed on the phone and softpfone,
    BUT: 3cx calls every second the crm server for the entry lookup, and yes it is also found, and now add this entry another time to "3cx Company Phone Book".

    I think this is a bug. I solved it, by rewriting the REST server, which saves now successfully found entries and send back a empty json response in that case. -> no second, third, fourth entry will be added.

    Maybe the lookup can be configured in a different way in the settings. But there I did not found anything useful, only
    CRMINT_DEFAULT

    Any hint is welcome!
     

    Attached Files:

  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,080
    Likes Received:
    77
    Hello @KLor,

    I think the problem is that you're not generating an output for "ContactUrl". Then, when 3CX finds the contact in the phonebook, but the URL is not there, it tries to perform the lookup again.

    Try adding that missing output value.

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. KLor

    Joined:
    Feb 16, 2018
    Messages:
    3
    Likes Received:
    0
    Thanks,

    this helps! Maybe a small hint would be nice, that ContactUrl is a required field.

    Nice to know: 3cx updates the contact on every incoming phone call, if something changed...
     
Thread Status:
Not open for further replies.