CRM Integration (Odoo) : Create Contact and LiveChat Log

Status
Not open for further replies.

Lop

Free User
Joined
Jun 30, 2023
Messages
21
Reaction score
9
Hi,

I'm doing a full integration between Odoo and 3CX. Working pretty fine for Search Contact by Email, Search Contact by Phone, Opening contact in Odoo when a call is answered...

Anyway, I don't understand when the Contact Creation and Livechat Log calls are supposed to be triggered.
I thought Livechat would happen when we close a chat, it's not the case,
I thought Contact Creation would happen when we send back no data or à 404 when searching a contact by Phone, but it's not.

Can you please give me a hint when / how to trigger those two calls ? :)
Once I know that I can finish the integration and will have a full Odoo/3CX Integration (with capabilities of CRM Integration Template).

PS: Reading the forum, it's sad there still isn't a full REST Api to control 3CX, it would be so so awesome ! Hope this will come at some point ^^

thanks alot in advance for your help !
Regards,
LOP
 
  • Like
Reactions: saasx
Hey @edossantos , it's been a while !
My Odoo module is working pretty fine, people use it and I fixed some small stuff in time.
But 2 people asked me if it was possible to have the CRM Call / page open when they do an Outgoing call?
For Incoming call, it works out of the box. Is there something I can do, a configuration in 3CX, so that Outgoing calls also open the CRM Integration ?
Thanks in advance for your help,

Regards
Outbound call can return a URL in the lookup scenario, but the link has to be clicked manually.

They usually expect you to have the contact/lead page already opened when calling them (often via Click2Call.)
 
  • Like
Reactions: edossantos and jed
Ok thank you !
 
Hi @edossantos ,

Another customer has the 3CX v20 and was wondering if it was because of 3CX that the calls to Odoo are badly done.
Here is what we can find in the Logs :

2024/01/10 09:41:06.627|44213|0044|Erro|CRM: Exception executing contact lookup for number '+33xxxxxxxx': System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.


Any idea where we should look at that could explain why 3CX cannot contact the API in Odoo ? Or is there a big difference between v18 and v20 of 3CX that could explain the problem?

Thanks in advance for your help,
If needed, I can give you a full log file with verbose logs.
 
Hi @edossantos ,

Another customer has the 3CX v20 and was wondering if it was because of 3CX that the calls to Odoo are badly done.
Here is what we can find in the Logs :

2024/01/10 09:41:06.627|44213|0044|Erro|CRM: Exception executing contact lookup for number '+33xxxxxxxx': System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.


Any idea where we should look at that could explain why 3CX cannot contact the API in Odoo ? Or is there a big difference between v18 and v20 of 3CX that could explain the problem?

Thanks in advance for your help,
If needed, I can give you a full log file with verbose logs.
If you use a third-party module for Odoo for this, you should contact the developer.

Odoo's API cannot be called directly from 3CX so you need either a module to expose a custom API, or have a proxy like we did.
 
  • Like
Reactions: edossantos and Lop
Yes yes I did an Odoo module, it's working fine.
The customer actually already found that he was in a fully internal network and it was badly contacting the Odoo endpoint.
This looks fixed, there are other bugs we are working on :)
Thanks for the info anyway!
 
  • Like
Reactions: Evolute IT
@edossantos

Hey It's-a me again :D

I have a question, I did some changes on the Template generated for the CRM Integration, so that Outbound calls also log calls in the chatter.
I just had to change the SkipIf directive, pretty simple (I guess I can simplify it by not doing an IIf, but anyway)

A customer told me when a call is Missed, there is no log to the API.
How can we activate that ?

The ReportCall Scenario is like this:


<Scenario Id="ReportCall" Type="REST">
<Request SkipIf="[IIf([ReportCallEnabled]!=True,True,False)]" t-att-Url="base_url + '3cx/call/log'" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<PostValues Key="">
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="type" Passes="1" Type="String">[CallType]</Value>
<Value Key="entitytype" Passes="1" Type="String">[EntityType]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
<Value Key="agentname" Passes="1" Type="String">[AgentFirstName] [AgentLastName]</Value>
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="date" Passes="1" Type="String">[DateTime]</Value>
<Value Key="subject" Passes="2" Type="String">[Subject]</Value>
<Value Key="inbound" Passes="2" Type="String">[InboundCallText]</Value>
<Value Key="notansweredoutbound" Passes="2" Type="String">[NotAnsweredOutboundCallText]</Value>
<Value Key="outbound" Passes="2" Type="String">[OutboundCallText]</Value>
<Value Key="missed" Passes="2" Type="String">[MissedCallText]</Value>
</PostValues>
</Request>
<Variables />
<Outputs AllowEmpty="true" />
</Scenario>


Any help will be welcomed :)

Thanks a lot !
 
@edossantos

Hey It's-a me again :D

I have a question, I did some changes on the Template generated for the CRM Integration, so that Outbound calls also log calls in the chatter.
I just had to change the SkipIf directive, pretty simple (I guess I can simplify it by not doing an IIf, but anyway)

A customer told me when a call is Missed, there is no log to the API.
How can we activate that ?

The ReportCall Scenario is like this:


<Scenario Id="ReportCall" Type="REST">
<Request SkipIf="[IIf([ReportCallEnabled]!=True,True,False)]" t-att-Url="base_url + '3cx/call/log'" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<PostValues Key="">
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="type" Passes="1" Type="String">[CallType]</Value>
<Value Key="entitytype" Passes="1" Type="String">[EntityType]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
<Value Key="agentname" Passes="1" Type="String">[AgentFirstName] [AgentLastName]</Value>
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="date" Passes="1" Type="String">[DateTime]</Value>
<Value Key="subject" Passes="2" Type="String">[Subject]</Value>
<Value Key="inbound" Passes="2" Type="String">[InboundCallText]</Value>
<Value Key="notansweredoutbound" Passes="2" Type="String">[NotAnsweredOutboundCallText]</Value>
<Value Key="outbound" Passes="2" Type="String">[OutboundCallText]</Value>
<Value Key="missed" Passes="2" Type="String">[MissedCallText]</Value>
</PostValues>
</Request>
<Variables />
<Outputs AllowEmpty="true" />
</Scenario>


Any help will be welcomed :)

Thanks a lot !
Missed calls are logged if they rang an agent.

Otherwise they should be logged without an Agent if they went through a queue or RG, since [QueueExtension] would be filled.

The rest is up to your module and how you process the data.
 
  • Like
Reactions: Lop and edossantos
Status
Not open for further replies.

Forum statistics

Threads
112,320
Messages
591,873
Members
165,466
Latest member
EMMEPICASA