3CX CRM Template with Multiple Matching Scenarios

Status
Not open for further replies.

hmknc

Forum User
Basic Certified
Joined
Mar 7, 2019
Messages
13
Reaction score
4
I am using the 3CX Template Generator to create an integration with Maximizer CRM. Due to the way Maximizer works, I need to request an authentication token to be used for each lookup of the address book. Both requesting the token and address book lookup require a HTTP POST so I am using the 'Matching Scenario' to do this, I can get both parts working independently, but when I try and use 2 'Matching Scenario's' in the generator it just doesn't work at all. Question is, should this work or am I trying to do something that's just not possible? I wondered if it was a limitation of the test tool in the generator? I have already found that if I give the Matching Scenario a custom ID (other than the default "") then it doesn't work either.

Any advice gratefully received

Nick
 
After some more testing I think the problem comes back to the fact that as soon as I set an Id for the matching scenario, the test tool in the Template Generator just doesn't seem to work. I'm testing now with only one matching scenario and it works fine with a blank Id. I'm using v2.0.10.0, anyone else seen this behaviour?
 
Scenarios with an empty ID are considered "matching scenarios", i.e. the scenarios used for contact lookup. Any scenario having an ID will not be invoked during contact lookup. There are 2 special scenario IDs:
  • ReportCall: used for call journaling
  • CreateContactRecord: used to create a new contact when the matching scenario doesn't return any data.

You can chain scenarios. For example, you can have a scenario with empty ID to get the token, and then set the output of this scenario to a second scenario ID. This way, the second scenario is executed once the first ends, and you have the token.

Also, you can use the Scenario based authentication to get the token. This is what we use to implement OAuth2, but it's generic and you can use it for something else. For example, check the implementation we have for Vtiger. In that template, we use the Auth scenario to get a token, and then we use that token in the matching scenarios (empty ID).

Hope the information helps, and kindly let us know in case of having further questions.
 
Also, you can use the Scenario based authentication to get the token. This is what we use to implement OAuth2, but it's generic and you can use it for something else. For example, check the implementation we have for Vtiger. In that template, we use the Auth scenario to get a token, and then we use that token in the matching scenarios (empty ID).

Ernesto,

Thank you, the scenario based authentication works! :)

Now I need to figure out how to search multiple phone fields, the search syntax in the Maximizer API uses square brackets [ ] which conflicts with the syntax for variables in 3CX
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,324
Messages
591,897
Members
165,475
Latest member
lastshadow