- Joined
- Apr 12, 2019
- Messages
- 28
- Reaction score
- 3
Hi All,
I have created a custom XML file for our CRM as below. Lookup works, posting the journal works but I get this - [DateTime]: Unanswered outgoing call from [Agent] to [Number]
Any idea what I am doing wrong?
I have created a custom XML file for our CRM as below. Lookup works, posting the journal works but I get this - [DateTime]: Unanswered outgoing call from [Agent] to [Number]
Any idea what I am doing wrong?
XML:
<?xml version="1.0"?>
<Crm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Country="U" Name="Monity v3" Version="3">
<Number Prefix="AsIs" MaxLength="[MaxLength]" />
<Connection MaxConcurrentRequests="10" />
<Parameters>
<Parameter Name="APIkey" Type="String" Parent="General Configuration" Editor="String" Title="API Key:" ListValues="" />
<Parameter Name="APIkey_TMG" Type="String" Parent="General Configuration" Editor="String" Title="API Key TMG:" ListValues="" />
<Parameter Name="LookupOrder" Type="List" Parent="General Configuration" Editor="String" Title="Contact Lookup Order:" Default="Mortgage Master/The Money Geeks" ListValues="XXX" />
<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">
<Value>[APIkey]</Value>
</Authentication>
<Scenarios>
<Scenario Id="" Type="REST" EntityOrder="[LookupOrder]">
<Request SkipIf="" Url="https://rest.XXX.com/v1/contacts/lookup?phone=[Number]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json">
<Headers>
<Value Key="Authorization">Bearer [APIkey]</Value>
</Headers>
</Request>
<Rules>
<Rule Type="Any">contacts.id</Rule>
</Rules>
<Variables>
<Variable Name="ContactID" Path="contacts.id">
<Filter />
</Variable>
<Variable Name="FirstName" Path="contacts.firstName">
<Filter />
</Variable>
<Variable Name="LastName" Path="contacts.lastName">
<Filter />
</Variable>
<Variable Name="PhoneMobile" Path="contacts.phone">
<Filter />
</Variable>
</Variables>
<Outputs 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="PhoneMobile" Passes="0" Value="[PhoneMobile]" />
<Output Type="ContactUrl" Passes="0" Value="https://app.XXX.co.uk/location/X6lEotmOfP44tI9ydyZ3/customers/detail/[ContactID]" />
</Outputs>
</Scenario>
<!-- <Scenario Id="" Type="REST" EntityOrder="[LookupOrder]">
<Request SkipIf="" Url="https://rest.XXX.com/v1/contacts/lookup?phone=[Number]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json">
<Headers>
<Value Key="Authorization">Bearer [APIkey_TMG]</Value>
</Headers>
</Request>
<Rules>
<Rule Type="Any">contacts.id</Rule>
</Rules>
<Variables>
<Variable Name="ContactID" Path="contacts.id">
<Filter />
</Variable>
<Variable Name="FirstName" Path="contacts.firstName">
<Filter />
</Variable>
<Variable Name="LastName" Path="contacts.lastName">
<Filter />
</Variable>
<Variable Name="PhoneMobile" Path="contacts.phone">
<Filter />
</Variable>
<Variable Name="ContactUrl" Path="https://app.XXX.co.uk/location/vJhrALBH9lPMHxykwwFN/customers/detail/[ContactID]">
<Filter />
</Variable>
</Variables>
<Outputs 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="PhoneMobile" Passes="0" Value="[PhoneMobile]" />
<Output Type="ContactUrl" Passes="0" Value="https://app.XXX.co.uk/location/vJhrALBH9lPMHxykwwFN/customers/detail/[ContactID]" />
</Outputs>
</Scenario> -->
<Scenario Id="ReportCall" Type="REST">
<Request SkipIf="[ReportCallEnabled]!=True||[CallType]!=Inbound" Url="https://rest.XXX.com/v1/contacts/[Contact::ContactID]/notes/" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<Headers>
<Value Key="Authorization">Bearer [APIkey]</Value>
</Headers>
<PostValues Key="">
<Value Key="body" Passes="1" Type="String">[InboundCallText]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="ReportCallMissed" AllowEmpty="true" />
</Scenario>
<Scenario Id="ReportCallMissed" Type="REST">
<Request SkipIf="[ReportCallEnabled]!=True||[CallType]!=Missed" Url="https://rest.XXX.com/v1/contacts/[Contact::ContactID]/notes/" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<Headers>
<Value Key="Authorization">Bearer [APIkey]</Value>
</Headers>
<PostValues Key="">
<Value Key="body" Passes="1" Type="String">[MissedCallText]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="ReportCallOutbound" AllowEmpty="true" />
</Scenario>
<Scenario Id="ReportCallOutbound" Type="REST">
<Request SkipIf="[ReportCallEnabled]!=True||[CallType]!=Outbound" Url="https://rest.XXX.com/v1/contacts/[Contact::ContactID]/notes/" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<Headers>
<Value Key="Authorization">Bearer [APIkey]</Value>
</Headers>
<PostValues Key="">
<Value Key="body" Passes="1" Type="String">[OutboundCallText]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="ReportCallNotanswered" AllowEmpty="true" />
</Scenario>
<Scenario Id="ReportCallNotanswered" Type="REST">
<Request SkipIf="[ReportCallEnabled]!=True||[CallType]!=Notanswered" Url="https://rest.XXX.com/v1/contacts/[Contact::ContactID]/notes/" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<Headers>
<Value Key="Authorization">Bearer [APIkey]</Value>
</Headers>
<PostValues Key="">
<Value Key="body" Passes="1" Type="String">[NotAnsweredOutboundCallText]</Value>
</PostValues>
</Request>
<Variables />
<Outputs AllowEmpty="false" />
</Scenario>
</Scenarios>
</Crm>