- Joined
- Feb 26, 2020
- Messages
- 8
- Reaction score
- 0
Hi,
I try to create my custom crm integration for Freshservice.
I followed the wizard configuration in 3CX template Generator and here is the result :
Each time i test my configuration with the "Contact lookup" tool, 3CX doesn't recognize my variables and create a new contact in Freshservice.

The other problem is that 3CX does not retrieve data from Freshservice in my variables.
The goal of my project is to create a contact when it does not exist in Freshservice and to create a ticket with the customer's information when the contact exists.
Thank you for your help
I try to create my custom crm integration for Freshservice.
I followed the wizard configuration in 3CX template Generator and here is the result :
XML:
<?xml version="1.0"?>
<Crm xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Country="CH" Name="test25" Version="1">
<Number Prefix="Zeros" MaxLength="10" />
<Connection MaxConcurrentRequests="2" />
<Parameters>
<Parameter Name="APIkey" Type="String" Parent="General Configuration" Editor="String" Title="API Key:" />
<Parameter Name="CreateContactEnabled" Type="Boolean" Editor="String" Title="Enable Contact Creation" Default="False" />
<Parameter Name="CreateContactFirstName" Type="String" Parent="CreateContactEnabled" Editor="String" Title="New Contact First Name:" Default="3CX Contact [Number]" />
<Parameter Name="CreateContactLastName" Type="String" Parent="CreateContactEnabled" Editor="String" Title="New Contact Last Name:" Default="3CX Contact [Number]" />
<Parameter Name="ReportCallEnabled" Type="Boolean" Editor="String" Title="Enable Call Journaling" Default="False" />
<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="Basic">
<Value>[APIkey]:X</Value>
</Authentication>
<Scenarios>
<Scenario Id="" Type="REST">
<Request SkipIf="" Url="https://dlnet.freshservice.com/api/v2/requesters?work_phone_number=[Number]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Number">work_phone_number</Rule>
</Rules>
<Variables>
<Variable Name="Id" Path="id">
<Filter />
</Variable>
<Variable Name="FirstName" Path="first_name">
<Filter />
</Variable>
<Variable Name="LastName" Path="last_name">
<Filter />
</Variable>
<Variable Name="DepartmentId" Path="department_ids">
<Filter />
</Variable>
<Variable Name="Email" Path="primary_email">
<Filter />
</Variable>
<Variable Name="PhoneBusiness" Path="work_phone_number">
<Filter />
</Variable>
<Variable Name="PhoneMobile" Path="mobile_phone_number">
<Filter />
</Variable>
</Variables>
<Outputs Next="GetDepartment" AllowEmpty="false" />
</Scenario>
<Scenario Id="GetDepartment" Type="REST">
<Request SkipIf="[DepartmentId]==""" Url="https://dlnet.freshservice.com/api/v2/departments/[DepartmentId]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any">name</Rule>
</Rules>
<Variables>
<Variable Name="DepartmentName" Path="name">
<Filter />
</Variable>
</Variables>
<Outputs AllowEmpty="true">
<Output Type="ContactUrl" Passes="0" Value="https://dlnet.freshservice.com/api/v2/requesters/[id]" />
<Output Type="FirstName" Passes="0" Value="[FirstName]" />
<Output Type="DepartmentName" Passes="0" Value="[DepartmentName]" />
<Output Type="PhoneMobile" Passes="0" Value="[PhoneMobile]" />
<Output Type="PhoneBusiness" Passes="0" Value="[PhoneBusiness]" />
<Output Type="Email" Passes="0" Value="[Email]" />
<Output Type="ContactId" Passes="0" Value="[Id]" />
<Output Type="LastName" Passes="0" Value="[LastName]" />
</Outputs>
</Scenario>
<Scenario Id="ReportCall" Type="REST">
<Request SkipIf="[ReportCallEnabled]!=True" Url="https://dlnet.freshservice.com/api/v2/tickets" MessagePasses="0" Message="" RequestContentType="" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="" AllowEmpty="false" />
</Scenario>
<Scenario Id="CreateContactRecord" Type="REST">
<Request SkipIf="[CreateContactEnabled]!=True" Url="https://dlnet.freshservice.com/api/v2/requesters" MessagePasses="0" Message="" RequestContentType="" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<PostValues Key="">
<Value Key="first_name" Passes="2" Type="String">[CreateContactFirstName]</Value>
<Value Key="work_phone_number" Passes="1" Type="String">[Number]</Value>
</PostValues>
</Request>
<Rules>
<Rule Type="Any">id</Rule>
</Rules>
<Variables>
<Variable Name="Id" Path="id">
<Filter />
</Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="ContactID" Passes="0" Value="[Id]" />
<Output Type="FirstName" Passes="2" Value="[[CreateContactFirstName]]" />
<Output Type="LastName" Passes="2" Value="[[CreateContactLastName]]" />
<Output Type="PhoneBusiness" Passes="0" Value="[Number]" />
<Output Type="ContactUrl" Passes="0" Value="https://dlnet.freshservice.com/requesters/[Id]" />
</Outputs>
</Scenario>
<Scenario Id="ReportCallMissed" Type="REST">
<Request SkipIf="[ReportCallEnabled]!=True||[CallType]!=Missed" Url="https://dlnet.freshservice.com/api/v2/tickets" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="ReportCallOutbound" AllowEmpty="true" />
</Scenario>
<Scenario Id="ReportCallOutbound" Type="REST">
<Request SkipIf="[ReportCallEnabled]!=True||[CallType]!=Outbound" Url="https://dlnet.freshservice.com/api/v2/tickets" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="ReportCallNotanswered" AllowEmpty="true" />
</Scenario>
<Scenario Id="ReportCallNotanswered" Type="REST">
<Request SkipIf="[ReportCallEnabled]!=True||[CallType]!=Notanswered" Url="https://dlnet.freshservice.com/api/v2/tickets" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<PostValues Key="">
<Value Key="duration" Passes="1" Type="String">[Duration]</Value>
<Value Key="phone" Passes="1" Type="String">[Number]</Value>
<Value Key="agent" Passes="1" Type="String">[Agent]</Value>
</PostValues>
</Request>
<Variables />
<Outputs AllowEmpty="false" />
</Scenario>
<Scenario Id="LookupFromCFD_Contacts_LookupNumber" Type="REST">
<Request Url="https://dlnet.freshservice.com/api/v2/requesters?work_phone_number=[Number]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any">id</Rule>
</Rules>
<Variables />
<Outputs AllowEmpty="true" />
</Scenario>
<Scenario Id="LookupFromCFD_Contacts_LookupID" Type="REST">
<Request Url="https://dlnet.freshservice.com/api/v2/requesters/[Id]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any">id</Rule>
</Rules>
<Variables />
<Outputs AllowEmpty="true" />
</Scenario>
</Scenarios>
</Crm>
Each time i test my configuration with the "Contact lookup" tool, 3CX doesn't recognize my variables and create a new contact in Freshservice.

The other problem is that 3CX does not retrieve data from Freshservice in my variables.
The goal of my project is to create a contact when it does not exist in Freshservice and to create a ticket with the customer's information when the contact exists.
Thank you for your help