- Joined
- Aug 5, 2020
- Messages
- 32
- Reaction score
- 5
So we've been running a successful CRM integration for several years based upon our own CRM integration app. Recently there was a change request to add the fields "businessphone2" and "phonemobile2"
After adding this to the CRM template and uploading it we've noticed that these fields never get populated. If we run the TEST we can see it's received but when we lookup the contact it's not updated. If we remove the contact and then make a test call the contact is added but again without the new fields. I think we are overlooking something but i cannot put my finger on it.
The CRM Template looks like this (some information has been altered due to privacy):
And the TEST output looks like this (some information has been altered due to privacy):
After adding this to the CRM template and uploading it we've noticed that these fields never get populated. If we run the TEST we can see it's received but when we lookup the contact it's not updated. If we remove the contact and then make a test call the contact is added but again without the new fields. I think we are overlooking something but i cannot put my finger on it.
The CRM Template looks like this (some information has been altered due to privacy):
XML:
<?xml version="1.0"?>
<Crm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Country="NL" Name="MyCRM" Version="1" SupportsEmojis="false">
<Number Prefix="AsIs" MaxLength="[MaxLength]" />
<Connection MaxConcurrentRequests="15" />
<Parameters>
<Parameter Name="ReportCallEnabled" Type="Boolean" Editor="String" Title="Enable Call Journaling" Default="True" />
<Parameter Name="Subject" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Call Subject:" Default="3CX PhoneSystem Call" />
<Parameter Name="InboundCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Answered Inbound Call:" Default="[DateTime]: Answered incoming call from [Number] to [Agent] ([Duration])" />
<Parameter Name="MissedCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Missed Call:" Default="[DateTime]: Missed call from [Number] to [Agent]" />
<Parameter Name="OutboundCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Answered Outbound Call:" Default="[DateTime]: Answered outgoing call from [Agent] to [Number] ([Duration])" />
<Parameter Name="NotAnsweredOutboundCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Unanswered Outbound Call:" Default="[DateTime]: Unanswered outgoing call from [Agent] to [Number]" />
</Parameters>
<Authentication Type="No" />
<Scenarios>
<Scenario Id="" Type="REST">
<Request SkipIf="" Url="http://IP:PORT/api/search?Phone=[Number]&Direction=[CallDirection]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any">id</Rule>
</Rules>
<Variables>
<Variable Name="ContactID" Path="id">
<Filter />
</Variable>
<Variable Name="FirstName" Path="firstname">
<Filter />
</Variable>
<Variable Name="LastName" Path="lastname">
<Filter />
</Variable>
<Variable Name="CompanyName" Path="company">
<Filter />
</Variable>
<Variable Name="Email" Path="email">
<Filter />
</Variable>
<Variable Name="PhoneBusiness" Path="businessphone">
<Filter />
</Variable>
<Variable Name="PhoneBusiness2" Path="businessphone2">
<Filter />
</Variable>
<Variable Name="PhoneMobile" Path="phonemobile">
<Filter />
</Variable>
<Variable Name="PhoneMobile2" Path="phonemobile2">
<Filter />
</Variable>
<Variable Name="ContactUrl" Path="url">
<Filter />
</Variable>
</Variables>
<Outputs Next="" AllowEmpty="false">
<Output Type="ContactID" Passes="0" Value="[ContactID]" />
<Output Type="FirstName" Passes="0" Value="[FirstName]" />
<Output Type="LastName" Passes="0" Value="[LastName]" />
<Output Type="CompanyName" Passes="0" Value="[CompanyName]" />
<Output Type="Email" Passes="0" Value="[Email]" />
<Output Type="PhoneBusiness" Passes="0" Value="[PhoneBusiness]" />
<Output Type="PhoneBusiness2" Passes="0" Value="[PhoneBusiness2]" />
<Output Type="PhoneMobile" Passes="0" Value="[PhoneMobile]" />
<Output Type="PhoneMobile2" Passes="0" Value="[PhoneMobile2]" />
<Output Type="ContactUrl" Passes="0" Value="[ContactUrl]" />
</Outputs>
</Scenario>
<Scenario Id="ReportCall" Type="REST">
<Request SkipIf="[ReportCallEnabled]!=True" Url="http://IP:PORT/api/ReportCall" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<PostValues Key="">
<Value Key="callstarttimelocal" Passes="1" Type="String">[CallStartTimeLocal]</Value>
<Value Key="callendtimelocal" Passes="1" Type="String">[CallEndTimeLocal]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
<Value Key="calltype" Passes="1" Type="String">[CallType]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="ReportCallMissed" AllowEmpty="true" />
</Scenario>
</Scenarios>
</Crm>
And the TEST output looks like this (some information has been altered due to privacy):
JSON:
[
{
"UnparsedOutputs": {
"ContactID": "4705_0",
"FirstName": "Customer Fullname",
"LastName": "Algemeen",
"CompanyName": "MyCompany",
"Email": "[email protected]",
"PhoneBusiness": "+31612345678",
"PhoneBusiness2": "*+31612345678",
"PhoneMobile": "",
"PhoneMobile2": "",
"ContactUrl": "http://IP:PORT/api/show?ContactID=4705_0"
},
"FirstName": "Customer Fullname",
"LastName": "Algemeen",
"Email": "[email protected]",
"ContactUrl": "http://IP:PORT/api/show?ContactID=4705_0",
"CompanyName": "MyCompany",
"PhotoUrl": null,
"ContactType": 0,
"PhoneBusiness": "+31612345678",
"PhoneBusiness2": "*+31612345678",
"PhoneHome": null,
"PhoneHome2": null,
"PhoneMobile": "",
"PhoneMobile2": "",
"PhoneOther": null,
"FaxBusiness": null,
"FaxHome": null,
"Pager": null,
"ContactRawData": null
}
]
Code:
Started scenario with empty id
Request text: http://IP:PORT/api/search?Phone=345678&Direction=Inbound
Response text: {
"id": "4705_0",
"firstname": "Customer Fullname",
"lastname": "Algemeen",
"company": "MyCompany",
"businessphone": "+31612345678",
"businessphone2": "*+31612345678",
"phonemobile": "",
"phonemobile2": "",
"email": "[email protected]",
"url": "http://IP:PORT/api/show?ContactID=4705_0"
}
Response finished
Variable ContactID set to 4705_0
Variable FirstName set to Customer Fullname
Variable LastName set to Algemeen
Variable CompanyName set to MyCompany
Variable Email set to [email protected]
Variable PhoneBusiness set to +31612345678
Variable PhoneBusiness2 set to *+31612345678
Variable PhoneMobile set to
Variable PhoneMobile2 set to
Variable ContactUrl set to http://IP:PORT/api/show?ContactID=4705_0
Finished scenario with empty id
Result obtained