Feasibility of multiple API domains in single CRM integration

atommo

Platinum Partner
Joined
Jul 9, 2024
Messages
14
Reaction score
10
Got an unusual scenario here, where the customer has multiple sites all on the same parent database system, but with unique sub-domains for each site. Example: site1.system.com, site2.system.com

I have a script which makes the necessary calls for a single domain URL- is there a way I could change it up so if the first lookup doesn't return a number, it works through the next lookup scenario trying the next domain until all are exhausted or one does return a result?

I am aware this would be incredibly inefficient (would involve making multiple redundant API requests for each incoming call). Is it even possible? For example, something like:

try site1.system.com
if(scenario1result == true, go to scenario1return)
else(go to scenario2)

try site2.system.com
if(scenario2result == true, go to scenario2return)
else(go to scenario3)

and so on.
 
It's possible but not super simple. If you don't have much experience with the CRM templates, we may be able to help you.
 
Actually this is being done by most of the standard integrations, for example first searching for contacts, then if no contact is found it searches for leads, then if no lead is found you search for accounts. This is done through chained scenarios, you can check any of the standard templates to see how.
 
Just putting an update here as I've been investigating further. It looks like in my case, the best bet is using HTTP or Web Service REST requests in the 3CX call flow designer: https://www.3cx.com/docs/manual/cfd-components

I would then need to create a conditional branch with 'Create a Condition', assigning some variable that denoted whether a request was successful or not. It can then work through the other attempts until the variable indicates success, or all the requests are tried.
 
Just putting an update here as I've been investigating further. It looks like in my case, the best bet is using HTTP or Web Service REST requests in the 3CX call flow designer: https://www.3cx.com/docs/manual/cfd-components

I would then need to create a conditional branch with 'Create a Condition', assigning some variable that denoted whether a request was successful or not. It can then work through the other attempts until the variable indicates success, or all the requests are tried.
Yes, this is a valid option. But what do you plan to do with the data found? Do you need to pass this information to the web client? This might work or not, there are some changes in the latest version of 3CX which could cause that even if you attach the data to the call, it's not shown... But give it a try and see what you get.
 
  • Like
Reactions: Evolute IT
Really I just need to grab the first and last name to display for the incoming caller information. Ideally add it to the address book if its not already in there too.
 
Really I just need to grab the first and last name to display for the incoming caller information.
If there is no CRM integration in place, you should be able to do it from a CFD app, and then attach the contact details to the call, so it's shown in the Web Client.

Ideally add it to the address book if its not already in there too.
For this, you will need a C# script from the CFD app.


In my opinion, this is much easier from a CRM template. Adding the contact to the phonebook could be done automatically...