- Joined
- Aug 5, 2020
- Messages
- 32
- Reaction score
- 5
So i've implemented the 3CX CRM Rest API with our CRM system like described here: https://www.3cx.com/docs/crm-integration/ When i test the API using the Test function in the backend than everything works except for two things:
1. The API Test shows the message " CRM Integration is working OK but contact number does not exist. Check log for more info or try a different number." when it receives response from our CRM.
2. In the live situation the Phone Contact lookup works as far as data is given back to 3CX however i would expect that all client showing the number would get updated with the data Contact information retrieved from our CRM. But this doesn't happen.
3. If i call from the same number twice that the GET ~/api/search?Phone=[PhoneNumber] isn't fired from 3CX?
This is our template:
1. The API Test shows the message " CRM Integration is working OK but contact number does not exist. Check log for more info or try a different number." when it receives response from our CRM.
2. In the live situation the Phone Contact lookup works as far as data is given back to 3CX however i would expect that all client showing the number would get updated with the data Contact information retrieved from our CRM. But this doesn't happen.
3. If i call from the same number twice that the GET ~/api/search?Phone=[PhoneNumber] isn't fired from 3CX?
This is our template:
XML:
<?xml version="1.0"?>
<Crm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Country="US" Name="TripleCRM" Version="1">
<Number Prefix="AsIs" MaxLength="[MaxLength]" />
<Connection MaxConcurrentRequests="2" />
<Parameters>
<Parameter Name="ReportCallEnabled" Type="Boolean" Editor="String" Title="Enable Call Journaling" Default="False" />
<Parameter Name="Subject" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Call Subject:" Default="3CX PhoneSystem Call" />
<Parameter Name="InboundCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Answered Inbound Call:" Default="[DateTime]: Answered incoming call from [Number] to [Agent] ([Duration])" />
<Parameter Name="MissedCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Missed Call:" Default="[DateTime]: Missed call from [Number] to [Agent]" />
<Parameter Name="OutboundCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Answered Outbound Call:" Default="[DateTime]: Answered outgoing call from [Agent] to [Number] ([Duration])" />
<Parameter Name="NotAnsweredOutboundCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Unanswered Outbound Call:" Default="[DateTime]: Unanswered outgoing call from [Agent] to [Number]" />
</Parameters>
<Authentication Type="No">
<Value>[APIkey]:X</Value>
</Authentication>
<Scenarios>
<Scenario Id="" Type="REST">
<Request Url="http://192.168.0.133:3721/api/search?Phone=[Number]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any">contact_id</Rule>
</Rules>
<Variables>
<Variable Name="ContactID" Path="contact_id">
<Filter />
</Variable>
<Variable Name="FirstName" Path="contact_firstname">
<Filter />
</Variable>
<Variable Name="LastName" Path="contact_lastname">
<Filter />
</Variable>
<Variable Name="CompanyName" Path="contact.company">
<Filter />
</Variable>
<Variable Name="PhoneBusiness" Path="contact_businessphone1">
<Filter />
</Variable>
<Variable Name="PhoneBusiness2" Path="contact_businessphone2">
<Filter />
</Variable>
<Variable Name="PhoneMobile" Path="contact_mobilephone1">
<Filter />
</Variable>
<Variable Name="PhoneMobile2" Path="contact_mobilephone2">
<Filter />
</Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="ContactID" Passes="0" Value="[ContactID]" />
<Output Type="FirstName" Passes="0" Value="[FirstName]" />
<Output Type="LastName" Passes="0" Value="[LastName]" />
<Output Type="CompanyName" Passes="0" Value="[CompanyName]" />
<Output Type="PhoneBusiness" Passes="0" Value="[PhoneBusiness]" />
<Output Type="PhoneBusiness2" Passes="0" Value="[PhoneBusiness2]" />
<Output Type="PhoneMobile" Passes="0" Value="[PhoneMobile]" />
<Output Type="PhoneMobile2" Passes="0" Value="[PhoneMobile2]" />
<Output Type="ContactUrl" Passes="0" Value="http://192.168.0.233/show?ContactID=123456" />
</Outputs>
</Scenario>
<Scenario Id="ReportCall" Type="REST">
<Request SkipIf="[ReportCallEnabled]!=True||[CallType]!=Inbound" Url="http://192.168.0.133:3721/api/createCall" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="ReportCallMissed" AllowEmpty="true" />
</Scenario>
<Scenario Id="ReportCallMissed" Type="REST">
<Request SkipIf="[ReportCallEnabled]!=True||[CallType]!=Missed" Url="http://192.168.0.133:3721/api/createCall" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="ReportCallOutbound" AllowEmpty="true" />
</Scenario>
<Scenario Id="ReportCallOutbound" Type="REST">
<Request SkipIf="[ReportCallEnabled]!=True||[CallType]!=Outbound" Url="http://192.168.0.133:3721/api/createCall" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="ReportCallNotanswered" AllowEmpty="true" />
</Scenario>
<Scenario Id="ReportCallNotanswered" Type="REST">
<Request SkipIf="[ReportCallEnabled]!=True||[CallType]!=Notanswered" Url="http://192.168.0.133:3721/api/createCall" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
</PostValues>
</Request>
<Variables />
<Outputs AllowEmpty="false" />
</Scenario>
</Scenarios>
</Crm>