CRM integration with Chat / Whatsapp

Status
Not open for further replies.

Louis1976

Customer
Joined
May 28, 2019
Messages
20
Reaction score
3
Hi,

our goal: Sending chat log to our CRM database.

My steps thusfar.
Created a CRM template with 3CX CRM Template Generator.
The URL mentioned in the XML template, are not being called by 3CX.

I've activated the Verbose log and I get two notifications.
For a Whatsapp chat I get this line:
2022/12/02 13:37:19.169|28654|0061|Erro|CRM: Exception during chat reporting: System.NullReferenceException: Object reference not set to an instance of an object.
at CrmIntegration.CrmProcessor.ReportChat(ChatEndedEvent chatEndedEvent, CancellationToken token)

for a normal chat i get this line:
2022/12/02 13:43:40.093|28654|0076|Verb|CRM: Chat Conversation with ConversationID=25 has an external participant which is not bound to a CRM contact, discarding conversation.
(strange that 3CX decides to discard the chat conversation. Just let me decide wether I want to store it or not)

Both messages are totally different in my eyes. But maybe they are linked somehow.
We don't use the normal chat. The Whatsapp integration works fine, but now we want to chat log integrated in our CRM.

This is a snippet from the XML file:
<Scenario Id="ReportChat" Type="REST">
<Request SkipIf="[ReportChatEnabled]!=True" Url="https://xxxx.xxxx.xxx/3cx_createchat.php" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="email" Passes="1" Type="String"></Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
<Value Key="number" Passes="1" Type="String">[Number]</Value>
</PostValues>
</Request>
<Variables />
<Outputs AllowEmpty="false" />
</Scenario>

But again.. the PHP is not being called.

I tried to activate the Create contact, maybe the system was lacking a ID.
But even that URL is not being called.
What can i try next?

regards to all,

Louis
 
Hello Louis,

You need to ensure that the contact lookup returns a matching contact when the chat starts. Then the chat will be logged. In this case chats are not being logged because there is no matching contact.
 
Hi Ernesto,

Not what I would expect ;-) but yes... this solved the problem.

Thanks!
 
Status
Not open for further replies.