CRM integration not works

coopcsc

SOHO User
Joined
Dec 30, 2011
Messages
27
Reaction score
1
Hi,
I tried CRS integration with Freshdesk.
I tested default template after I tried to a custom template. I tried wizard creation and text edit manual creation of the template.
I have a V20 solution of 3CX.
I need to create a new ticket on Freshdesk after an inbound call is concluded.

I call 3CX, the call is concluded, but the ticket is not created.
I verified log but no api call is registred in logs.

Can you help me?
 
Excuse me, I cannot understand if the CRM integration works only if I use web client.
CRM integration works if I use PBX with VOIP phisical phones?

I tested only with phisical phone calls.

Thanks
 
The integration is triggered no matter the phone you use. So Call Journaling (ticket creation) at the end of the call should work if everything is properly configured. What you will not have using a desk phone is the contact name and contact URL, that's only shown in the Web Client.

In order to troubleshoot, first, ensure that you have followed the guide to the letter:
https://www.3cx.com/docs/freshdesk-crm-integration/

Ensure that you can see a matched contact when you run a Test lookup from the management console. If this works, then the call journaling should work. If this is not the case, enable verbose logs and check the 3cxSystemService.log file.
 
  • Like
Reactions: Evolute IT
With test lookup it works.
I enabled verbose logs but nothing is writed.
How I can view 3cxSystemService.log file in V20 cloud hosted solution?
 
How I can view 3cxSystemService.log file in V20 cloud hosted solution?
You need to download the Support Information Package. Then unzip the file, and the log will be there.
 
Hi,
I tried default Freshdesk template and in 3cxSystemService.log have only
2024/10/24 15:52:22.327|0022|Erro| Call type is invalid or not specified Unknown
 
Hi,
I tried default Freshdesk template and in 3cxSystemService.log have only
2024/10/24 15:52:22.327|0022|Erro| Call type is invalid or not specified Unknown
Ensure that you enable verbose logs, then make the test call.
 
Thanks, after services restart the log is retourned in base mode.

Now, with
Code:
<Request SkipIf="[IIf([EntityId]==&quot;&quot;,True,[IIf([CallType]!=Notanswered,True,False)])]" Url="https://[Domain].freshdesk.com/api/v2/tickets" MessagePasses="0" Message="" RequestContentType="" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
I have

Code:
2024/10/24 16:18:15.046|0026|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Processing scenario 'ReportCall'.
2024/10/24 16:18:15.046|0026|Debg| [Integration.Crm.Engine.BasicAuthHttpClientProvider] CRM: Creating new HttpClient for Basic authentication
2024/10/24 16:18:15.046|0026|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Skipping request...
2024/10/24 16:18:15.047|0026|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Continue with empty matching.


and with shipinf empty
Code:
<Request SkipIf="" Url="https://[Domain].freshdesk.com/api/v2/tickets" MessagePasses="0" Message="" RequestContentType="" RequestEncoding="Json" RequestType="Post" ResponseType="Json">

I have this
Code:
2024/10/24 16:20:54.741|0028|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Processing scenario 'ReportCall'.
2024/10/24 16:20:54.741|0028|Debg| [Integration.Crm.Engine.BasicAuthHttpClientProvider] CRM: Creating new HttpClient for Basic authentication
2024/10/24 16:20:54.742|0030|Debg| Dequeue Deleted.S_RECORDINGDATA.7
2024/10/24 16:20:54.760|0028|Erro| [Integration.Crm.Engine.CrmProcessor] CRM: Exception during call reporting
System.FormatException: The input string '' was not in a correct format.
   at System.Number.ThrowFormatException[TChar](ReadOnlySpan`1 value)
   at System.Int64.Parse(String s)
   at Integration.Crm.Engine.ScenarioProcessorBase.CreateJsonFromPostValues(RequestItem requestItem, IValueManager customManager)
   at Integration.Crm.Engine.ScenarioProcessorBase.ProcessRequest(Boolean authScenario, ScenarioRequest request, IValueManager customManager, HttpClient client, CancellationToken token)
   at Integration.Crm.Engine.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, SqlQueryParameter[] sqlQueryParameter, CancellationToken token)
   at Integration.Crm.Engine.ScenarioProcessorBase.Execute(ProtocolScenario scenario, SqlQueryParameter[] sqlQueryParameter, CancellationToken token)
   at Integration.Crm.Engine.CrmProcessor.ExecuteScenarioByName(String scenarioName, IEnumerable`1 parameters, Boolean useNoAuthProvider, CancellationToken token)
   at Integration.Crm.Engine.CrmProcessor.ExecuteScenarioWithRetries(String scenarioId, Dictionary`2 parameters, CancellationToken token)
   at Integration.Crm.Engine.CrmProcessor.ReportCall(CallEndedEvent callEndedEvent, CancellationToken token)

Why? What's wrong?
 
Why are you using a custom template if 3CX already provides an integration with Freshdesk? The standard template should work out of the box, you don't need to deal with all these changes....
 
  • Like
Reactions: Evolute IT
The first one is with default template and not works.
 
The first one is with default template and not works.
If it doesn't work you should troubleshoot it, but not create your own template....

Use the standard template, enable verbose logs, make a test call and check the logs. That's the starting point to find any issues.
 
  • Like
Reactions: Evolute IT
Hi,
with default template this is the log records (I removed sensible informations):

Code:
2024/10/28 17:20:03.478|0034|Info| [Integration.Crm.CallProcessingService] CRM: about to report 1 calls at maxConcurrency 16
2024/10/28 17:20:03.478|0034|Debg| [Integration.Crm.CallProcessingService] CRM: Triggering Call Journaling with values - CallType='Inbound' - PhoneNumber='555555555' - ContactName='(null)' - AgentExtension='100' - AgentFirstName='John' - AgentLastName='Doe' - AgentEmail='[email protected]' - ContactRawData='(null)' - StartTime='10/28/2024 16:19:57' - EndTime='10/28/2024 16:20:03' - EstablishedTime='10/28/2024 16:20:00'
2024/10/28 17:20:03.479|0034|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Processing scenario 'ReportCall'.
2024/10/28 17:20:03.479|0034|Debg| [Integration.Crm.Engine.BasicAuthHttpClientProvider] CRM: Creating new HttpClient for Basic authentication
2024/10/28 17:20:03.479|0034|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Skipping request...
2024/10/28 17:20:03.479|0034|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Continue with empty matching.
2024/10/28 17:20:03.479|0034|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Processing scenario 'CreateCallActivity'.
2024/10/28 17:20:03.479|0034|Debg| [Integration.Crm.Engine.BasicAuthHttpClientProvider] CRM: Creating new HttpClient for Basic authentication
2024/10/28 17:20:03.479|0034|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Skipping request...
2024/10/28 17:20:03.480|0034|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: No matchings found.
 
Hi,
with default template this is the log records (I removed sensible informations):

Code:
2024/10/28 17:20:03.478|0034|Info| [Integration.Crm.CallProcessingService] CRM: about to report 1 calls at maxConcurrency 16
2024/10/28 17:20:03.478|0034|Debg| [Integration.Crm.CallProcessingService] CRM: Triggering Call Journaling with values - CallType='Inbound' - PhoneNumber='555555555' - ContactName='(null)' - AgentExtension='100' - AgentFirstName='John' - AgentLastName='Doe' - AgentEmail='[email protected]' - ContactRawData='(null)' - StartTime='10/28/2024 16:19:57' - EndTime='10/28/2024 16:20:03' - EstablishedTime='10/28/2024 16:20:00'
2024/10/28 17:20:03.479|0034|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Processing scenario 'ReportCall'.
2024/10/28 17:20:03.479|0034|Debg| [Integration.Crm.Engine.BasicAuthHttpClientProvider] CRM: Creating new HttpClient for Basic authentication
2024/10/28 17:20:03.479|0034|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Skipping request...
2024/10/28 17:20:03.479|0034|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Continue with empty matching.
2024/10/28 17:20:03.479|0034|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Processing scenario 'CreateCallActivity'.
2024/10/28 17:20:03.479|0034|Debg| [Integration.Crm.Engine.BasicAuthHttpClientProvider] CRM: Creating new HttpClient for Basic authentication
2024/10/28 17:20:03.479|0034|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Skipping request...
2024/10/28 17:20:03.480|0034|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: No matchings found.
"ContactRawData='(null)'"

Means there was no contact found for that call so it's not logged. an EntityId and EntityType MUST be returned by the lookup scenarios.
 
Is it not possibile to record all incoming calls?
I need to have all the contacts in my CRM? And what happen with new contacts or new phone numbers for my contacts?
 
Is it not possibile to record all incoming calls?
Yes. But you will need to modify the template since usually the EntityId is required.

I need to have all the contacts in my CRM? And what happen with new contacts or new phone numbers for my contacts?
Then have users create them during the call (+ Add Contact) under the dialer. Or, modify the template to automatically create new contacts for those not found. Be careful as you can bloat your system quickly.
 
Yes. But you will need to modify the template since usually the EntityId is required.


Then have users create them during the call (+ Add Contact) under the dialer. Or, modify the template to automatically create new contacts for those not found. Be careful as you can bloat your system quickly.
I removed the requirement of EntityId
Code:
    <Scenario Id="CreateCallActivity" Type="REST" EntityId="" EntityOrder="">
      <Request SkipIf="[ReportCallEnabled]!=True" Url="https://[Domain].freshdesk.com/api/v2/tickets" MessagePasses="0" Message="" RequestContentType="" RequestEncoding="Json" RequestType="Post" ResponseType="Json">

but now I have this error in log:
Code:
2024/11/07 16:25:17.061|0023|Info| [Integration.Crm.CallProcessingService] CRM: about to report 1 calls at maxConcurrency 16
2024/11/07 16:25:17.061|0023|Debg| [Integration.Crm.CallProcessingService] CRM: Triggering Call Journaling with values - CallType='Inbound' - PhoneNumber='3357987900' - ContactName='(null)' - AgentExtension='100' - AgentFirstName='Davide' - AgentLastName='Franzoni' - AgentEmail='[email protected]' - ContactRawData='(null)' - StartTime='11/07/2024 15:25:10' - EndTime='11/07/2024 15:25:17' - EstablishedTime='11/07/2024 15:25:14'
2024/11/07 16:25:17.061|0023|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Processing scenario 'ReportCall'.
2024/11/07 16:25:17.061|0023|Debg| [Integration.Crm.Engine.BasicAuthHttpClientProvider] CRM: Creating new HttpClient for Basic authentication
2024/11/07 16:25:17.061|0023|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Skipping request...
2024/11/07 16:25:17.061|0023|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Continue with empty matching.
2024/11/07 16:25:17.061|0023|Debg| [Integration.Crm.Engine.ResultVariableScenarioProcessor] CRM: Processing scenario 'CreateCallActivity'.
2024/11/07 16:25:17.061|0023|Debg| [Integration.Crm.Engine.BasicAuthHttpClientProvider] CRM: Creating new HttpClient for Basic authentication
2024/11/07 16:25:17.064|0023|Erro| [Integration.Crm.Engine.CrmProcessor] CRM: Exception during call reporting
System.FormatException: The input string '' was not in a correct format.
   at System.Number.ThrowFormatException[TChar](ReadOnlySpan`1 value)
   at System.Int64.Parse(String s)
   at Integration.Crm.Engine.ScenarioProcessorBase.CreateJsonFromPostValues(RequestItem requestItem, IValueManager customManager)
   at Integration.Crm.Engine.ScenarioProcessorBase.ProcessRequest(Boolean authScenario, ScenarioRequest request, IValueManager customManager, HttpClient client, CancellationToken token)
   at Integration.Crm.Engine.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, SqlQueryParameter[] sqlQueryParameter, CancellationToken token)
   at Integration.Crm.Engine.ScenarioProcessorBase.ProcessMatching(ProtocolScenario scenario, MatchingPath matching, ResponseMatcher responseMatcher, IValueManager customManager, SqlQueryParameter[] sqlQueryParameter, HashSet`1 distinctMatchings, CancellationToken token)
   at Integration.Crm.Engine.ScenarioProcessorBase.ProcessFoundMatchings(ProtocolScenario scenario, IValueManager customManager, SqlQueryParameter[] sqlQueryParameter, List`1 matchings, ResponseMatcher responseMatcher, CancellationToken token)
   at Integration.Crm.Engine.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, SqlQueryParameter[] sqlQueryParameter, CancellationToken token)
   at Integration.Crm.Engine.ScenarioProcessorBase.Execute(ProtocolScenario scenario, SqlQueryParameter[] sqlQueryParameter, CancellationToken token)
   at Integration.Crm.Engine.CrmProcessor.ExecuteScenarioByName(String scenarioName, IEnumerable`1 parameters, Boolean useNoAuthProvider, CancellationToken token)
   at Integration.Crm.Engine.CrmProcessor.ExecuteScenarioWithRetries(String scenarioId, Dictionary`2 parameters, CancellationToken token)
   at Integration.Crm.Engine.CrmProcessor.ReportCall(CallEndedEvent callEndedEvent, CancellationToken token)
2024/11/07 16:25:17.065|0023|Debg| Dequeue Deleted.S_RECORDINGDATA.17



Or, modify the template to automatically create new contacts for those not found. Be careful as you can bloat your system quickly.
How I can do that?
 
Excuse me "ConceptsWeb", can you help me about this problem?

Thank you very much for your time and help
 
Excuse me "ConceptsWeb", can you help me about this problem?

Thank you very much for your time and help
You're sending an empty data/string as Integer (in the <Value Type="Integer">[EntityId]</Value> probably)

Change the type to String.