- Joined
- Mar 16, 2020
- Messages
- 9
- Reaction score
- 0
Hello Guys, I'm building my first 3cx integration for CRM. I used the 3CX CRM Template Generator to generate the xml file. The "Contact Lookup" and "ReportCall" tests done on the Generator Template seem to be OK. The problem is that 3cx does not seem to run the Scenario ReportCall, even when the contact is found. Can you help me please ?

XML Template

XML Template
XML:
<?xml version="1.0"?>
<Crm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Country="BR" Name="exactsales" Version="1">
<Number Prefix="Off" MaxLength="15" />
<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="Novo" />
<Parameter Name="CreateContactLastName" Type="String" Parent="CreateContactEnabled" Editor="String" Title="New Contact Last Name:" Default="3CX Contato" />
<Parameter Name="ReportCallEnabled" Type="Boolean" Editor="String" Title="Enable Call Journaling" Default="False" />
</Parameters>
<Authentication Type="Basic">
<Value>[APIkey]:X</Value>
</Authentication>
<Scenarios>
<Scenario Id="" Type="REST">
<Request Url="https://slribeiro.com/exact/person.php?action=list&number=[Number]" 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="name">
<Filter />
</Variable>
<Variable Name="Email" Path="email">
<Filter />
</Variable>
<Variable Name="PhoneBusiness" Path="phone1">
<Filter />
</Variable>
<Variable Name="PhoneBusiness2" Path="phone2">
<Filter />
</Variable>
<Variable Name="Id" Path="id">
<Filter />
</Variable>
<Variable Name="Contact" Path="id">
<Filter />
</Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="ContactID" Passes="0" Value="[ContactID]" />
<Output Type="FirstName" Passes="0" Value="[FirstName]" />
<Output Type="Email" Passes="0" Value="[Email]" />
<Output Type="PhoneBusiness" Passes="0" Value="[PhoneBusiness]" />
<Output Type="PhoneBusiness2" Passes="0" Value="[PhoneBusiness2]" />
<Output Type="ContactUrl" Passes="0" Value="https://slribeiro.com/exact/person.php?action=list&contact=[ContactID]" />
</Outputs>
</Scenario>
<Scenario Id="CreateContactRecord" Type="REST">
<Request SkipIf="[CreateContactEnabled]!=True" Url="https://slribeiro.com/exact/person.php?action=create&number=[Number]&first_name=[CreateContactFirstName]&last_name=[CreateContactLastName]" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Get" ResponseType="Json">
<PostValues>
<Value Key="number" Passes="0" Type="String">[Number]</Value>
</PostValues>
</Request>
<Variables />
<Outputs AllowEmpty="false" />
</Scenario>
<Scenario Id="ReportCall" Type="REST">
<Request SkipIf="[ReportCallEnabled]!=True||[CallType]!=Outbound" Url="https://slribeiro.com/exact/person.php?action=call&number=[Number]&TempoConversacao=[Duration]&DtInicioChamada=[CallStartTimeLocal]&DtFimChamada=[CallEndTimeLocal]&OrigemTel=[Agent]" MessagePasses="0" Message="" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json" />
<Variables />
<Outputs AllowEmpty="true" />
</Scenario>
</Scenarios>
</Crm>
Last edited:
