Solved Vtiger CRMLookup to query contact details not working.

Status
Not open for further replies.

SOFTISS

Customer
Joined
Jul 23, 2021
Messages
41
Reaction score
7
Hello all,

Please I need guidance on what to do to get past this, I integrated Vtiger successfully to 3CX and every other thing seems to work alright except for when I use the CRMLookup to search for a contact details which doesn't return anything for the CFD to use.

I basically want to create a customized welcome message with the name of the contact from Vtiger. I have Vtiger 9 and 3CX v18.

Below is the log that I get.

2021/08/28 21:21:20.156|23769|0004|Trc|CallPair._1011_5.Main.85.[C:40.2]-From script: CRMLookup - CallID 0000017B8FB61398_40 - CallFlow.CFD.ConditionalComponent 'SelectCRM' - Evaluating condition for branch 'Vtiger'
2021/08/28 21:21:20.156|23769|0004|Trc|CallPair._1011_5.Main.85.[C:40.2]-From script: CRMLookup - CallID 0000017B8FB61398_40 - CallFlow.CFD.ConditionalComponent 'SelectCRM' - Condition evaluated to true for branch 'Vtiger', executing inner components
2021/08/28 21:21:20.156|23769|0004|Trc|CallPair._1011_5.Main.85.[C:40.2]-From script: CRMLookup - CallID 0000017B8FB61398_40 - CallFlow.CFD.ConditionalComponent 'SelectCRM' - Start executing branch 'Vtiger'
2021/08/28 21:21:20.159|23769|0004|Trc|CallPair._1011_5.Main.85.[C:40.2]-From script: CRMLookup - CallID 0000017B8FB61398_40 - CallFlow.CFD.SequenceContainerComponent 'Vtiger' - Start executing component 'GetContactFromVtiger'
2021/08/28 21:21:20.162|23769|0004|Trc|CallPair._1011_5.Main.85.[C:40.2]-From script: CRMLookup - CallID 0000017B8FB61398_40 - CallFlow.CFD.CRMLookupComponent 'GetContactFromVtiger' - Start executing component with EntityType='Contacts' - QueryType='LookupNumber' - Data='+17738959635'
2021/08/28 21:21:20.255|23769|0006|Trc|Updated.REGISTRAR.88 - sip:[email protected]:5063;rinstance=1e1a6630d3278c8d
2021/08/28 21:21:20.314|23769|0006|Trc|###TRANSACTION.457 started
2021/08/28 21:21:20.317|23769|0006|Trc|+++TRANSACTION.457 updated - elapsed 2.6192
2021/08/28 21:21:20.318|23769|0006|Trc|Finalizing TRANSACTION.457
2021/08/28 21:21:20.318|23769|0006|Trc|---TRANSACTION.457 finished 3.7066ms
data:2.6189ms
Events:1.0851ms
externals:0.0026ms
2021/08/28 21:21:21.541|23769|0007|Trc|CallPair._1011_5.Main.85.[C:40.2]-From script: CRMLookup - CallID 0000017B8FB61398_40 - CallFlow.CFD.CRMLookupComponent 'GetContactFromVtiger' - End executing component with Result: {"success":true,"result":[]}
2021/08/28 21:21:21.542|23769|0007|Trc|CallPair._1011_5.Main.85.[C:40.2]-From script: CRMLookup - CallID 0000017B8FB61398_40 - CallFlow.CFD.SequenceContainerComponent 'Vtiger' - Start executing component 'GetContactFromVtiger'
2021/08/28 21:21:21.543|23769|0007|Trc|CallPair._1011_5.Main.85.[C:40.2]-From script: CRMLookup - CallID 0000017B8FB61398_40 - CallFlow.CFD.TextAnalyzerComponent 'GetContactFromVtiger' - Start executing component with TextType='Detect' - Text='{"success":true,"result":[]}' - Parsing text...
2021/08/28 21:21:21.548|23769|0007|Trc|CallPair._1011_5.Main.85.[C:40.2]-From script: CRMLookup - CallID 0000017B8FB61398_40 - CallFlow.CFD.TextAnalyzerComponent 'GetContactFromVtiger' - Mapping path 'result[0].firstname' to variable 'callflow$.FirstName'
2021/08/28 21:21:21.561|23769|0007|Trc|CallPair._1011_5.Main.85.[C:40.2]-From script: CRMLookup - CallID 0000017B8FB61398_40 - CallFlow.CFD.TextAnalyzerComponent 'GetContactFromVtiger' - Path 'result[0].firstname' could not be found, variable 'callflow$.FirstName' will not be updated
2021/08/28 21:21:21.561|23769|0007|Trc|CallPair._1011_5.Main.85.[C:40.2]-From script: CRMLookup - CallID 0000017B8FB61398_40 - CallFlow.CFD.TextAnalyzerComponent 'GetContactFromVtiger' - Mapping path 'result[0].lastname' to variable 'callflow$.LastName'
2021/08/28 21:21:21.561|23769|0007|Trc|CallPair._1011_5.Main.85.[C:40.2]-From script: CRMLookup - CallID 0000017B8FB61398_40 - CallFlow.CFD.TextAnalyzerComponent 'GetContactFromVtiger' - Path 'result[0].lastname' could not be found, variable 'callflow$.LastName' will not be updated

2021/08/28 21:21:21.562|23769|0007|Trc|CallPair._1011_5.Main.85.[C:40.2]-From script: CRMLookup - CallID 0000017B8FB61398_40 - Callflow - Start executing component 'PlayWelcome'
2021/08/28 21:21:21.566|23769|0007|Trc|CallPair._1011_5.Main.85.[C:40.2]-From script: CRMLookup - CallID 0000017B8FB61398_40 - Callflow - Adding temporary file '/var/lib/3cxpbx/Instance1/Data/Ivr/Prompts/Callflows/crmlookup/Temp_1.wav' to remove list
2021/08/28 21:21:21.566|23769|0007|Trc|CallPair._1011_5.Main.85.[C:40.2]-From script: CRMLookup - CallID 0000017B8FB61398_40 - TextToSpeechAudioPrompt - Generating text to speech to fileName='/var/lib/3cxpbx/Instance1/Data/Ivr/Prompts/Callflows/crmlookup/Temp_1.wav' for text='Hello ! Thanks for calling!'


Thanks for the help.
 
Make sure the server-side integration is configured and working. Test it in the Settings using that same number (you should remove it from this log, the +177...) and if it is found, make sure the format is the same as what it is in VTiger.
 
Checking the template, I think the + prefix might be an issue. Can you remove it from the CFD application? If you're getting the value from the variable session.ani, then you can use the following expression to remove the plus:
REPLACE(session.ani,"+","")
 
  • Love
Reactions: SOFTISS
WOOOOOOOOOOOOOOOOOOW, that was the magic.

Thank you so much, so what do you think is responsible for the + sign being added to it.

@Frederick Marcoux, appreciate your help.
 
The + symbol is not escaped in the template, and as this is going in the query string, this is probably converted to a space by Vtiger. We will be fixing this in the next 3CX Update.
 
  • Like
Reactions: Evolute IT
Thanks for letting me know.

Please mark as resolved
 
  • Like
Reactions: edossantos
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,323
Messages
591,894
Members
165,472
Latest member
arneg