Solved SuiteCRM Integration: variables are not read / set

Status
Not open for further replies.

Roland.Pe

Forum User
Joined
Apr 9, 2024
Messages
6
Reaction score
0
hi
i'm using this configuration for the suiteCRM Integration
https://www.3cx.com/community/threads/suitecrm-integration-api-v8.80856/
it's working, when i get a call or do i call it's reading the contact / account / lead.

but when i'm writing the ReportCall the variables
Contact::ContactType
Contact::AccountID
Contact::ContactID
are empty and therefore not set.
if i hard code them, the call is working find.
the variables itself are visible in the previous calls when i fetch the caller id in the REST scenario

do you have any idea what's wrong.
thank you
 
Something is wrong in the response.
Test this with the PBX in verbose and check the system service log.
This will give the information you need.
 
thank you for your fast replay.
i could not find the problem. the contact handed over by the crm hat the correct ID
from the crm xml template this is stored as ContactID
but in the position filtered variables or matching the ContactIDis empty (not shown)
-----------------
"type": "Account",
"id": "99e93ad3-e408-ce00-996b-66154d27e064",
"attributes": {
.........
2024/04/10 16:20:08.299|5896|0072|Verb|CRM: Filtered variables for matching:
2024/04/10 16:20:08.299|5896|0072|Verb|CRM: 'Email' = ''
2024/04/10 16:20:08.299|5896|0072|Verb|CRM: 'ID' = '99e93ad3-e408-ce00-996b-66154d27e064'
2024/04/10 16:20:08.299|5896|0072|Verb|CRM: 'ContactType' = 'Account'
2024/04/10 16:20:08.299|5896|0072|Verb|CRM: 'LastName' = ''
2024/04/10 16:20:08.299|5896|0072|Verb|CRM: 'FirstName' = ''
2024/04/10 16:20:08.299|5896|0072|Verb|CRM: 'PhoneAlt' = '+4314780 567 12'
2024/04/10 16:20:08.300|5896|0072|Verb|CRM: 'PhoneBusiness' = '+4314780 567'
2024/04/10 16:20:08.300|5896|0072|Verb|CRM: 'AccountName' = 'test account'
2024/04/10 16:20:08.300|5896|0072|Verb|CRM: 'PhoneFax' = ''
_________
in the XML File
-------------
<Variables>
<Variable Name="ID" Path="data.id">
<Filter />
......
<Output Type="ContactID" Passes="0" Value="[ID]" />
---------------
so this variable should be read out and put in the Variable ContactID (as far as i understand)
but in the list Filtered variables for matching this variable is not shown
 

Attachments

Please check the guideline here for the Variables.
 
i manipulated the CRM file to write in case of an account the ID and the type in to the Lastname and Firstname values:
in the test CRM Button i got the data in the correct fields:
-------
{
"FirstName": "99e93ad3-e408-ce00-996b-66154d27e064",
"LastName": "Account",
.......
.------
in the scenario "ReportCall i modified the fields to use these:
---------
<Value Key="parent_type" Passes="0" Type="String">Accounts</Value>
<Value Key="parent_id" Passes="0" Type="String">[Contact::FirstName]</Value>
</Object>
---------

in the generated request to the CRM to create the note:
-----------
2024/04/11 09:38:00.569|5896|0063|Verb|CRM: Performing POST request to 'https://crm/legacy/Api/V8/module' with message '{"data":{"type":"Notes","attributes":{"name":"□ 12→436767394515","description":"translation for not answered int. 12 ext. 436767394515&#x000A;11.04.2024 09:37:58-09:38:00 (0,04 min)","parent_type":"Accounts","parent_id":""}}}'.
-----------
it write at the end the string Accounts but the parent_id is still empty
i also tried to access the variable only with "FirstName"
<Value Key="parent_id" Passes="0" Type="String">[FirstName]</Value>
with the same result...

how can i access the variables of the contact from the CRM during the Scenario ReportCall?
thank you
 

Attachments

Please check the guideline here for the Variables.
thank you, this worked for most of the cases, now i can see which variables are accessible in the scenario ReportCall,

in one case i have the contactID and the according accountID, that means two ID that i would need in the scenario ReportCall, i can't find another field e.g. EntityID2 or another variable that i can use in this case. do you have an idea how i can solve it?
 
attached you can find my new version of the SuiteCRM xml CRM Template file
its based on
https://www.3cx.com/community/threads/suitecrm-integration-api-v8.80856/
but all the problems i had are solved.
open is only one thing: if the contact has a connection with an account i can't post the accountID since i have no idea how to pass it from the CRM contact query to the reportcall. from the varibles list i can't find a way to passt it on :(
 

Attachments

Are you referring to this?
 
Are you referring to this?
thank you the concatenation made it
<Outputs Next="ReportCall_Post" AllowEmpty="true" />

attached the current version, maybe someone can use it
i have also done some minor changes to the suitecrm filters so that spaces are removed in the sql querry. if anybody needs it pls contact me
 

Attachments

I'm glad this is resolved ;)
 
Status
Not open for further replies.