- Joined
- Dec 30, 2011
- Messages
- 27
- Reaction score
- 1
Thank you @ConceptsWeb, I finally solved the problem adding <Output Type="EntityType" Passes="0" Value="Contacts" /> to the scenario output.
Best regards
Best regards
<Scenarios>
<Scenario Id="" Type="REST" EntityId="Contact" EntityOrder="">
<Request SkipIf="" Url="https://example.com/apirest/3cx/search.php?number=[Number]" MessagePasses="0" Message="" RequestContentType="" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any" Ethalon="">contact.id</Rule>
</Rules>
<Variables>
<Variable Name="ContactID" LookupValue="" Path="contact.id">
<Filter />
</Variable>
<Variable Name="FirstName" LookupValue="" Path="contact.firstname">
<Filter />
</Variable>
<Variable Name="LastName" LookupValue="" Path="contact.lastname">
<Filter />
</Variable>
<Variable Name="CompanyName" LookupValue="" Path="contact.company">
<Filter />
</Variable>
<Variable Name="Email" LookupValue="" Path="contact.email">
<Filter />
</Variable>
<Variable Name="PhoneBusiness" LookupValue="" Path="contact.businessphone">
<Filter />
</Variable>
<Variable Name="PhoneBusiness2" LookupValue="" Path="contact.businessphone2">
<Filter />
</Variable>
<Variable Name="PhoneMobile" LookupValue="" Path="contact.mobilephone">
<Filter />
</Variable>
<Variable Name="PhoneMobile2" LookupValue="" Path="contact.mobilephone2">
<Filter />
</Variable>
<Variable Name="CustomValue" LookupValue="" Path="contact.customvalue">
<Filter />
</Variable>
<Variable Name="EntityId" LookupValue="" Path="contact.id">
<Filter />
</Variable>
<Variable Name="EntityType" LookupValue="" Path="contact.id">
<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="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="CustomValue" Passes="0" Value="[CustomValue]" />
<Output Type="ContactUrl" Passes="0" Value="https://example.com/apiRest/3cx/search.php?ContactID=[ContactID]" />
<Output Type="EntityId" Passes="0" Value="[EntityId]" />
<Output Type="EntityType" Passes="0" Value="[EntityType]" />
</Outputs>
</Scenario>
<Scenario Id="LookupByPhone" Type="REST" EntityId="" EntityOrder="">
<Request SkipIf="" Url="https://example.com/apirest/3cx/search.php?number=[Number]" MessagePasses="0" Message="" RequestContentType="" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any" Ethalon="">contact.id</Rule>
</Rules>
<Variables>
<Variable Name="ContactID" LookupValue="" Path="contact.id">
<Filter />
</Variable>
<Variable Name="FirstName" LookupValue="" Path="contact.firstname">
<Filter />
</Variable>
<Variable Name="LastName" LookupValue="" Path="contact.lastname">
<Filter />
</Variable>
<Variable Name="CompanyName" LookupValue="" Path="contact.company">
<Filter />
</Variable>
<Variable Name="Email" LookupValue="" Path="contact.email">
<Filter />
</Variable>
<Variable Name="PhoneBusiness" LookupValue="" Path="contact.businessphone">
<Filter />
</Variable>
<Variable Name="PhoneBusiness2" LookupValue="" Path="contact.businessphone2">
<Filter />
</Variable>
<Variable Name="PhoneMobile" LookupValue="" Path="contact.mobilephone">
<Filter />
</Variable>
<Variable Name="PhoneMobile2" LookupValue="" Path="contact.mobilephone2">
<Filter />
</Variable>
<Variable Name="CustomValue" LookupValue="" Path="contact.customvalue">
<Filter />
</Variable>
<Variable Name="EntityId" LookupValue="" Path="contact.id">
<Filter />
</Variable>
<Variable Name="EntityType" LookupValue="" Path="contact.id">
<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="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="CustomValue" Passes="0" Value="[CustomValue]" />
<Output Type="ContactUrl" Passes="0" Value="https://example.com/apiRest/3cx/search.php?ContactID=[ContactID]" />
<Output Type="EntityId" Passes="0" Value="[EntityId]" />
<Output Type="EntityType" Passes="0" Value="[EntityType]" />
</Outputs>
</Scenario>
<Scenario Id="ReportCall" Type="REST" EntityId="" EntityOrder="">
<Request SkipIf="" Url="https://example.com/apirest/3cx/createcall.php" MessagePasses="0" Message="" RequestContentType="" RequestEncoding="UrlEncoded" RequestType="Post" ResponseType="PlainText">
<PostValues Key="" If="" SkipIf="">
<Value Key="calltype" If="" SkipIf="" Passes="1" Type="String">[CallType]</Value>
<Value Key="calldirection" If="" SkipIf="" Passes="1" Type="String">[CallDirection]</Value>
<Value Key="contactnumber" If="" SkipIf="" Passes="1" Type="String">[Number]</Value>
<Value Key="agentextension" If="" SkipIf="" Passes="1" Type="String">[Agent]</Value>
<Value Key="calldatetime" If="" SkipIf="" Passes="1" Type="String">[CallStartTimeLocal]</Value>
<Value Key="callduration" If="" SkipIf="" Passes="1" Type="String">[Duration]</Value>
<Value Key="callestablished" If="" SkipIf="" Passes="1" Type="String">[CallEstablishedTimeLocal]</Value>
<Value Key="callend" If="" SkipIf="" Passes="1" Type="String">[CallEndTimeLocal]</Value>
<Value Key="callestablishedUTC" If="" SkipIf="" Passes="1" Type="String">[CallEstablishedTimeUTC]</Value>
<Value Key="callestablishedUTCmillis" If="" SkipIf="" Passes="1" Type="String">[CallEstablishedTimeUTCMillis]</Value>
<Value Key="LineBreak" If="" SkipIf="" Passes="2" Type="String">[LineBreak]</Value>
<Value Key="Summary" If="" SkipIf="" Passes="2" Type="String">[Summary]</Value>
<Value Key="Transcription" If="" SkipIf="" Passes="2" Type="String">[Transcription]</Value>
<Value Key="RecordingUrl" If="" SkipIf="" Passes="2" Type="String">[RecordingUrl]</Value>
<Value Key="RecordingHyperLink" If="" SkipIf="" Passes="2" Type="String">[RecordingHyperLink]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="" AllowEmpty="true" />
</Scenario>
<Scenario Id="ReportCallMissed" Type="REST" EntityId="" EntityOrder="">
<Request SkipIf="" Url="https://example.com/apirest/3cx/createcall.php" MessagePasses="0" Message="" RequestContentType="" RequestEncoding="UrlEncoded" RequestType="Post" ResponseType="PlainText">
<PostValues Key="" If="" SkipIf="">
<Value Key="calltype" If="" SkipIf="" Passes="1" Type="String">[CallType]</Value>
<Value Key="calldirection" If="" SkipIf="" Passes="1" Type="String">[CallDirection]</Value>
<Value Key="contactnumber" If="" SkipIf="" Passes="1" Type="String">[Number]</Value>
<Value Key="agentextension" If="" SkipIf="" Passes="1" Type="String">[Agent]</Value>
<Value Key="calldatetime" If="" SkipIf="" Passes="1" Type="String">[CallStartTimeLocal]</Value>
<Value Key="callduration" If="" SkipIf="" Passes="1" Type="String">[Duration]</Value>
<Value Key="callestablished" If="" SkipIf="" Passes="1" Type="String">[CallEstablishedTimeLocal]</Value>
<Value Key="callend" If="" SkipIf="" Passes="1" Type="String">[CallEndTimeLocal]</Value>
<Value Key="callestablishedUTC" If="" SkipIf="" Passes="1" Type="String">[CallEstablishedTimeUTC]</Value>
<Value Key="callestablishedUTCmillis" If="" SkipIf="" Passes="1" Type="String">[CallEstablishedTimeUTCMillis]</Value>
<Value Key="LineBreak" If="" SkipIf="" Passes="2" Type="String">[LineBreak]</Value>
<Value Key="Summary" If="" SkipIf="" Passes="2" Type="String">[Summary]</Value>
<Value Key="Transcription" If="" SkipIf="" Passes="2" Type="String">[Transcription]</Value>
<Value Key="RecordingUrl" If="" SkipIf="" Passes="2" Type="String">[RecordingUrl]</Value>
<Value Key="RecordingHyperLink" If="" SkipIf="" Passes="2" Type="String">[RecordingHyperLink]</Value>
<Value Key="subject" If="" SkipIf="" Passes="2" Type="String">[Subject]</Value>
<Value Key="InboundCallText" If="" SkipIf="" Passes="2" Type="String">[InboundCallText]</Value>
<Value Key="MissedCallText" If="" SkipIf="" Passes="2" Type="String">[MissedCallText]</Value>
<Value Key="OutboundCallText" If="" SkipIf="" Passes="2" Type="String">[OutboundCallText]</Value>
<Value Key="NotAnsweredOutboundCallText" If="" SkipIf="" Passes="2" Type="String">[NotAnsweredOutboundCallText]</Value>
</PostValues>
</Request>
<Variables />
<Outputs Next="" AllowEmpty="false" />
</Scenario>
This is unrelated. If EntityId and EntityType are provided in the output, along with the required fields, it's supposed to still work. It's only when we try to use the ReportCall on its own that it doesn't work in U6.@JoelMartínez Check the previous reply as this has been identified and will be fixed in the next Update 7.
Founded in 2005, when VoIP was an emerging technology, 3CX has gone on to establish itself as a global leader in business communications.