Solved create contact not working in CRM integration

Status
Not open for further replies.

kudil

Customer
Joined
Sep 9, 2022
Messages
10
Reaction score
3
My CRM Tested with POSTMAN and POST working fine with no issues.
Call Journal working but CREATE CONTACT not even trigger on.
please go through attaached log and template and help to solve isue
 

Attachments

From the logs:
2022/09/14 10:55:09.796|26854|0014|Verb|CRM: Performing GET request 'http://192.168.101.21/api/search/+919962114644'.
2022/09/14 10:55:09.972|26854|0014|Erro|CRM: Exception executing contact lookup for number '+919962114644': System.Exception: Server returned a non successful status code - HTTPStatusCode=NotFound - Reason=Not Found - Content={"Result":"No Data not found"}

When your CRM does the contact lookup and the contact is not found, it returns a 404 not found error. This is considered an API error, and the entire operation is aborted, so the contact creation is not executed.

In order to indicate that there are no records, your CRM must return a 200 OK response, and the JSON data should indicate that no record was found. A 404 Not Found HTTP status code is not appropriate for this. Such status code indicates that the REST API endpoint is not found, and not that the contact is not found. This is an incorrect design in the REST API of the CRM.
 
Thanks for the Swift Response! Now i Can spot the issue.i can solve it now!:)
 
  • Like
Reactions: edossantos
From the logs:


When your CRM does the contact lookup and the contact is not found, it returns a 404 not found error. This is considered an API error, and the entire operation is aborted, so the contact creation is not executed.

In order to indicate that there are no records, your CRM must return a 200 OK response, and the JSON data should indicate that no record was found. A 404 Not Found HTTP status code is not appropriate for this. Such status code indicates that the REST API endpoint is not found, and not that the contact is not found. This is an incorrect design in the REST API of the CRM.
Added Json Responce in API, and 3CX started to send POST requests . Thank you
 
  • Like
Reactions: edossantos
Added Json Responce in API, and 3CX started to send POST requests . Thank you
Again in Trouble. 3CX seeding POST requests but No Contacts created in CRM. and i tested with POSTMAN getting results and contacts created. . any clues?
 

Attachments

  • Capture.JPG
    Capture.JPG
    213.3 KB · Views: 57
The screenshot shows a successful POST request, with a valid JSON response. If that's not creating the contact in the CRM, maybe it's something to check on the CRM side. Also, you can compare the requests being sent by Postman and 3CX, and spot any difference...
 
Thanks For Response ! So this is clear that there is no further changes required to do in 3CX Template right ... Ok. I do the needful!!:)
 
Hi! My CRM integration was worked fine for a month.
1) Contact Lookup 2) new Contact Creation 3) Call Journal were worked fine.

Recently i Restarted 3CX services( Ii am not sure restart is the problem)., after that, CONTACT LOOKUP NOT WORKING. ( Create contact/ Call journal are working)
However, 3cx getting CRM response, but getting error

CRM Integration is working OK but contact number does not exist. Check log for more info or try a different number.

Response finished
Variable ContactID set to 79
Variable FirstName set to Vijaya
Variable LastName set to kesava perumal
Variable CompanyName set to ABC
Variable Email set to vkp@*****
Variable PhoneBusiness set to +91909501****
Variable PhoneMobile set to +9199621***
Variable ContactID set to 120
Variable FirstName set to New
Variable LastName set to 3CX Contact
Variable CompanyName set to
Variable Email set to
Variable PhoneBusiness set to
Variable PhoneMobile set to 996211***
Variable ContactID set to 121
Variable FirstName set to New
Variable LastName set to 3CX Contact
Variable CompanyName set to
Variable Email set to
Variable PhoneBusiness set to
Variable PhoneMobile set to 9962114***
Finished scenario with empty id
Started CreateContactRecord
Response finished
Finished CreateContactRecord
Result obtained

Please find Template/ LOG as attachment.
 

Attachments

The problem is this line in your template:
<Output Type="phonemobile" Passes="0" Value="[PhoneMobile]" />

Particularly the output type phonemobile is unknown. It should be PhoneMobile as explained here. The case is important. This causes that the returned record is discarded, because no phone field has the caller's number.
 
Yeah! Thank For your Response. Changed and Now its working.
 
  • Like
Reactions: edossantos
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,973
Messages
590,075
Members
164,895
Latest member
jasonkkrause