vTiger svr side integration on v16b1 problems

Status
Not open for further replies.

Nikola Paskov

New User
Joined
Dec 11, 2017
Messages
18
Reaction score
0
I'm currently testing vtiger integration and it seems there are 2 problems for now:
  1. Call journaling doesnt work - not on inbound nor on outbound calls. The worst part is there is no (or at least I cant find it) any kind of log that could show me what could be the case.
  2. After setting plugin initially with CRM URL address it seems that is unchangeable. Changing to other test vtiger URL changes in settings but then in webclient it always opens old URL. Deleted settings and even deleted and reinstalled template - no luck - it opens same old URL from webclient even when all settings are cleared from plugin.
 
1. From Dashboard -> Activity Log, enable verbose logging. Restart services. The CRM events will then be logged in one of the system logs - I can't remember which one, but you can find it by clicking on Logs (on the Activity Log page) and then nagivating to \Instance\. From memory I think CRM events are logged in 3CXSystemService.log
 
Thank you, I'll check.
 
After setting plugin initially with CRM URL address it seems that is unchangeable. Changing to other test vtiger URL changes in settings but then in webclient it always opens old URL. Deleted settings and even deleted and reinstalled template - no luck - it opens same old URL from webclient even when all settings are cleared from plugin.
In order to fix this, you need to delete the contacts from 3CX Contacts.
 
Ok, I enabled logs and did tests and here is the result:


Code:
2019/03/07 13:30:52.468|525|0046|Info|CRM: about to report 1 calls at maxConcurrency 1
2019/03/07 13:30:52.468|525|0046|Verb|Processing scenario 'ReportCall'.
2019/03/07 13:30:52.468|525|0046|Verb|Creating new HttpClient for Scenario authentication.
2019/03/07 13:30:52.469|525|0046|Verb|Performing GET request 'https://XXXXXX/webservice.php?operation=query&sessionName=12c889265c80ffe3f2a58&query=SELECT%20id%20FROM%20Users%20WHERE%20user_name='XXXX';'.
2019/03/07 13:30:52.473|525|0010|Verb|Enqueue Updated.PARAMETER.454
2019/03/07 13:30:52.473|525|0011|Verb|Dequeue Updated.PARAMETER.454
2019/03/07 13:30:52.552|525|0043|Verb|The response is: '{"success":true,"result":[{"id":"19x5"}]}'
2019/03/07 13:30:52.552|525|0043|Verb|Filtered variables for matching:
2019/03/07 13:30:52.553|525|0043|Verb|   'AssignedUserId' = '19x5'
2019/03/07 13:30:52.553|525|0043|Verb|Processing scenario 'CreateCallActivity'.
2019/03/07 13:30:52.553|525|0043|Verb|Creating new HttpClient for Scenario authentication.
2019/03/07 13:30:52.553|525|0043|Verb|Performing POST request to 'https://XXXXXX/webservice.php?' with following form values:
2019/03/07 13:30:52.553|525|0043|Verb|   'operation' = 'create'
2019/03/07 13:30:52.554|525|0043|Verb|   'sessionName' = '12c889265c80ffe3f2a58'
2019/03/07 13:30:52.554|525|0043|Verb|   'elementType' = 'Events'
2019/03/07 13:30:52.555|525|0043|Verb|   'element' = '
            {
               "subject": "3CX PhoneSystem Call",
               "assigned_user_id": "19x5",
               "date_start": "2019-03-07",
               "time_start": "11:28:18",
               "due_date": "2019-03-07",
               "time_end": "11:30:52",
               "eventstatus": "Held",
               "activitytype": "Call",
               "taskpriority": "Medium",
               "parent_id": "",
               "contact_id": "12x177132",
               "description": "3/7/19 1:28 PM: Answered incoming call from 088xxxxxx Paskov gsm mtel, Koko to 1001 (02:34)",
               "label": "3CX PhoneSystem Call",
               "isclosed": 0
            }
           '
2019/03/07 13:30:52.581|525|0043|Verb|The response is: '{"success":false,"error":{"code":"MANDATORY_FIELDS_MISSING","message":"duration_hours does not have a value"}}'

So I think its a clear bug in vtiger plugin since it doesnt calc and put in event record call duration field. As a result Call journaling fails.
 
Appears so. Can you change the field settings in vtiger to stop Call Duration being mandatory?

You could also edit the CRM XML template to insert the Call Duration... but it might be worth hanging on until V16 is released to see if the bug is fixed.
 
Actually, this is not a bug. The field "duration_hours" is not mandatory in a default Vtiger installation, and that's why we're not including it. We're setting the start and end time of the call.

In this case, as @Mark Phillips mentioned, you have 2 options:
  • Change your Vtiger configuration settings so the "duration_hours" field is not mandatory, or
  • Edit the template to provide a value for that field.

If you choose the second option, please note that you should change the template name, so an update from 3CX doesn't override your changes.
 
Strange enough there is no such field in vTiger7, so I cant stop it being mandatory.
But for the sake of tests added:
Code:
"duration_hours": 1

in vTiger.xml here:
Code:
    <Scenario Id="CreateCallActivity">
      <Request Url="[URL]/webservice.php?" RequestType="Post" ResponseType="Json">
        <Headers />
        <PostValues>
           <Value Passes="0" Key="operation" Type="String">create</Value>
           <Value Passes="0" Key="sessionName" Type="String">[SessionName]</Value>
           <Value Passes="0" Key="elementType" Type="String">Events</Value>
           <Value Passes="2" Key="element" Type="String">
            {
               "subject": ^^[Subject]^^,
               "assigned_user_id": ^^[AssignedUserId]^^,
               "date_start": ^^[[CallStartTimeUTC].ToString("dd-MM-yyyy")]^^,
               "time_start": ^^[[CallStartTimeUTC].ToString("HH:mm:ss")]^^,
               "due_date": ^^[[CallEndTimeUTC].ToString("dd-MM-yyyy")]^^,
               "time_end": ^^[[CallEndTimeUTC].ToString("HH:mm:ss")]^^,
               "eventstatus": ^^[IIf([CallType]==Inbound||[CallType]==Outbound,Held,Not Held)]^^,
               "activitytype": "Call",
               "taskpriority": "Medium",
               "parent_id": ^^[Contact::CompanyId]^^,
               "contact_id": ^^[Contact::ContactId]^^,
               "description": ^^[IIf([CallType]==Inbound,[[InboundCallText]],[IIf([CallType]==Missed,[[MissedCallText]],[IIf([CallType]==Outbound,[[OutboundCallText]],[NotAnweredOutboundCallText])])])]^^,
               "label": ^^[Subject]^^,
               "isclosed": 0,
               "duration_hours": 1
            }
           </Value>
        </PostValues>
      </Request>
      <Variables />
      <Outputs AllowEmpty="false" />
    </Scenario>

And events magically started working :)

However I'm not sure what exactly should be placed in "duration_hours":
Hopefully 3cx developers watch these threads and will add correct value to fix that bug.
 
Actually, this is not a bug. The field "duration_hours" is not mandatory in a default Vtiger installation, and that's why we're not including it. We're setting the start and end time of the call.

In this case, as @Mark Phillips mentioned, you have 2 options:
  • Change your Vtiger configuration settings so the "duration_hours" field is not mandatory, or
  • Edit the template to provide a value for that field.
If you choose the second option, please note that you should change the template name, so an update from 3CX doesn't override your changes.

Just installed fresh and clean vTiger 7.1.0 Open source.
Tested.
Results:
Code:
2019/03/07 17:17:23.880|3086|0052|Verb|   'element' = '
            {
               "subject": "3CX PhoneSystem Call",
               "assigned_user_id": "19x1",
               "date_start": "2019-03-07",
               "time_start": "15:16:10",
               "due_date": "2019-03-07",
               "time_end": "15:17:23",
               "eventstatus": "Held",
               "activitytype": "Call",
               "taskpriority": "Medium",
               "parent_id": "",
               "contact_id": "12x3",
               "description": "3/7/19 5:16 PM: Answered incoming call from 0887293283 0887293283 to 1001 (01:13)",
               "label": "3CX PhoneSystem Call",
               "isclosed": 0
            }
           '
2019/03/07 17:17:24.081|3086|0052|Verb|The response is: '{"success":false,"error":{"code":"MANDATORY_FIELDS_MISSING","message":"duration_hours does not have a value"}}'

So it seems that in latest vTiger 7.1.0 that field IS mandatory and even worse it doesnt show in Event module field manager, so I cant make it not mandatory.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,323
Messages
591,896
Members
165,474
Latest member
costionofrei