Please help with Integration. Maybe the CRM Template Generator isnt up to this CRM?

Status
Not open for further replies.

devtendenz

Forum User
Joined
Apr 2, 2020
Messages
13
Reaction score
1
I'm trying to integrate with Act! CRM (REST Web API).

The authentication is Basic Authentication, in the following form:

Method: GET

URL: (apiurl)/authorize

Headers:
Act-Database-Name : (act database name)
Authorization : (Basic XXXX)

Response:
XXXXXXXXXXXXXX (the bearer token in plain text! nothing else!)

I don't know how to configure this in the CRM Template Editor. How? I've tried selecting 'Scenario' as the Authentication method and created a Scenario for it but I am a bit stuck on this...

Is this even possible? so a) sending Authorization string via header and b) retrieving back the Bearer token via a plaintext response

Furthermore, imagine that when we've tackled the authentication problem, what exactly does the 3CX platform do with an incoming when I've uploaded the template? Where can I enter a callback URL?
 
Last edited:
I'm trying to integrate with Act! CRM (REST Web API).

The authentication is Basic Authentication, in the following form:

Method: GET

URL: (apiurl)/authorize

Headers:
Act-Database-Name : (act database name)
Authorization : (Basic XXXX)

Response:
XXXXXXXXXXXXXX (the bearer token in plain text! nothing else!)

I don't know how to configure this in the CRM Template Editor. How? I've tried selecting 'Scenario' as the Authentication method and created a Scenario for it but I am a bit stuck on this...

Is this even possible? so a) sending Authorization string via header and b) retrieving back the Bearer token via a plaintext response
The 3CX CRM engine is not able to read the response from plain text. It must be JSON or XML, and then you specify which node to read using an expression.

In this case, maybe you can create a proxy server, so you send a request to the proxy, this proxy sends the request to the CRM, the CRM returns the plain text to the proxy, and the proxy returns JSON around the token to 3CX.

Furthermore, imagine that when we've tackled the authentication problem, what exactly does the 3CX platform do with an incoming when I've uploaded the template? Where can I enter a callback URL?
When 3CX receives a call, it will execute the contact lookup scenario. This scenario has the authentication as a prerequisite, so if you don't have the token yet, the authentication scenario will be executed. When the CRM returns the contact lookup result, the contact is added to 3CX Contacts. Then this contact information is sent to the Web Client of the extension receiving the call, so the Web Client can launch the Contact URL in the agent's PC.
 
Hi Ernesto, Thanks for your answer. So what I guessed is true, we'll have to wrap the authorize request in something else which returns json.

But the second thing, so if I understand this correctly, the contact is just added to the 3CX Contacts (the database which the 3CX apps use to show the information?

But then, what if the information changes in the CRM? is it performing the lookup every time an incomin call occurs and updating that database?

And, our CRM doesn't have a concept of 'contact URL's', it's a Windows client. We hoped there was some kind of real API/callback integration in which we could write an add-on for our own CRM, which launches a pop-up with the contact calling on all Act! users, and then when one clicks that popup, the CRM opens up the contact. But this isn't possible then?
 
But the second thing, so if I understand this correctly, the contact is just added to the 3CX Contacts (the database which the 3CX apps use to show the information?
Exactly, when you receive an inbound call, the caller number is searched in your CRM, and the matched contact is added to 3CX Contacts. From there it is taken by the Web Client to show the contact URL.

But then, what if the information changes in the CRM? is it performing the lookup every time an incomin call occurs and updating that database?
Yes, every time you receive a call, there is a new lookup on the CRM, and the information is updated from the CRM to 3CX. There is however a 10 minutes cache, so if your contact makes 2 calls in less than 10 minutes, the second call will not trigger a lookup, the details will be taken from cache.

And, our CRM doesn't have a concept of 'contact URL's', it's a Windows client. We hoped there was some kind of real API/callback integration in which we could write an add-on for our own CRM, which launches a pop-up with the contact calling on all Act! users, and then when one clicks that popup, the CRM opens up the contact. But this isn't possible then?
You could create a web application running on the agent PC. This way, you could return contact URLs like "http://localhost/contactID". This way, when the Web Client receives the call and launches this URL, the web application running on the agent PC might do what it takes to open the Windows application in the same machine, and show the selected contact ID...
 
Hi Ernesto, thanks for your answer, I already figured out in the meantime that there was a 10 minute cache (was mentioned elsewhere on this forum), Is that 10 minutes fixed or configurable? Because then we can create a proxy API for our CRM (we have to do so because of the authentication), and then do 2 things: 1) return the contact info and 2) broadcast a Websockets message, which our CRM Windows clients can listen to. Then we don't need the contact URL, because the trigger is in the first contact lookup call. But of course it's a bit of a pity when this doesnt work for people calling back within 10 minutes.

If this for some reason does NOT seem to work, and we DO have to use the contact URL, does this mean that people have to have a tabpage with the webclient in theirbrowser open at all times?
 
Another question, I've created a draft proxy API and dummy-addon for Act! which communicate via Websockets, and it actually works. It even doesn't take the 10 minutes into account, but may be thats because its a test 3CX environment.

But, the question is: how can we detect that someone picked up the phone for a certain incoming phone number? Is there some callback API for this? Otherwise the pop-up with the calling contact(s) stays in place until one clicks it away. It would be nice to do this automatically from a callback which is called by the 3CX system.
 
And another question - this time about outgoing calls. How can we arrange that when one clicks on a phone number in Act! CRM, that the following happens:
- the phone on the desk rings (extension of the user is configured in the Act! CRM add-on)
- when the user picks up the phone, it automatically dials the clicked number

I saw different things here on the forum and the net, about deprecated APIs etc, what is the correct starting point for this (url?)?
 
Is that 10 minutes fixed or configurable?
This is a hardcoded value, which can't be changed or disabled.

Then we don't need the contact URL, because the trigger is in the first contact lookup call. But of course it's a bit of a pity when this doesnt work for people calling back within 10 minutes.
What you can do if you just need this notification, but don't need to add the contact to 3CX Contacts, is just not return the caller's phone number in the JSON response, then the contact will not be added to 3CX Contacts or the cache, and the next call will also be notified. But you will miss the feature of having the caller name on your phone's display, the contact popup and call journaling...

If this for some reason does NOT seem to work, and we DO have to use the contact URL, does this mean that people have to have a tabpage with the webclient in theirbrowser open at all times?
The Web Client will provide the contact popup. If you don't need this, then you don't need to have it opened.

But, the question is: how can we detect that someone picked up the phone for a certain incoming phone number? Is there some callback API for this? Otherwise the pop-up with the calling contact(s) stays in place until one clicks it away. It would be nice to do this automatically from a callback which is called by the 3CX system.
The contact lookup happens as soon as the call arrives to 3CX, and before it is sent to the agent. Therefore, we don't have the extension number that will pick up the call. This is why only the caller number is provided at this stage. The only point in which the agent's extension is provided is during call journaling, but this happens when the call ends.

And another question - this time about outgoing calls. How can we arrange that when one clicks on a phone number in Act! CRM, that the following happens:
- the phone on the desk rings (extension of the user is configured in the Act! CRM add-on)
- when the user picks up the phone, it automatically dials the clicked number

I saw different things here on the forum and the net, about deprecated APIs etc, what is the correct starting point for this (url?)?
The way to do this would be launching the Web Client with the click to call URL on the agent's PC. The URL is the following:
https://3CX_FQDN:5001/webclient/#/call?phone=1234567890
 
Hi Ernesto, thanks for your answers. So if I understand this correctly:

- For being able to trigger the CRM request every time (within the 10 min.) we have to not send back the phone numbers but then we dont have the name of the calling number on our phones.

- It's not possible whatsoever with 3CX to detect which extension picks up an incoming phone number. So in order to close our self-writte pop-up in the CRM addon the user actually has to click on it so we can mark it as being picked up..


- Outgoing calls: it's not possible to just have the physical phone ring, pickup, and then automatically call the number clicked in our CRM addon. There's no API for that in the whole 3CX ecosystem? BTW I tried the URL on our environment and my mobile phone, but I first get a dial pad and if i dial it hangs up immediately. No matter if the Windows client is also running or not. It doesnt even get listed in the Call log.
 
- For being able to trigger the CRM request every time (within the 10 min.) we have to not send back the phone numbers but then we dont have the name of the calling number on our phones.
Correct.

- It's not possible whatsoever with 3CX to detect which extension picks up an incoming phone number. So in order to close our self-writte pop-up in the CRM addon the user actually has to click on it so we can mark it as being picked up..
Correct, the agent's extension number is not available during contact lookup, only during call journaling when the call ends, but this is not what you need.

- Outgoing calls: it's not possible to just have the physical phone ring, pickup, and then automatically call the number clicked in our CRM addon. There's no API for that in the whole 3CX ecosystem? BTW I tried the URL on our environment and my mobile phone, but I first get a dial pad and if i dial it hangs up immediately. No matter if the Windows client is also running or not. It doesnt even get listed in the Call log.
No, that's not possible, there is no API for that at the moment. You have 2 possible approaches:
1) Launch the Web Client URL as I mentioned in my previous response. You need to be logged in with an extension in this Web Client. This will just fill the destination number in the dial pad, you need to click Call in order to make the call.
2) The 3CXPhone for Windows client provides an app that you can launch to make a call from this extension. The program to launch is "CallTriggerCmd.exe" and it's located in folder "C:\ProgramData\3CXPhone for Windows\PhoneApp". You invoke it like this:
CallTriggerCmd.exe --call=1234567890
That will launch a call from the 3CXPhone extension to number 1234567890. However, please note that this needs to be executed on the agent's PC, so you might need to create some program running in this PC, which communicates with your CRM to receive the number to call...
 
Status
Not open for further replies.

Forum statistics

Threads
112,326
Messages
591,900
Members
165,479
Latest member
Senergia