Hallo,
ich bin etwas am Verzweifeln mit meinem CRM-Template. Die Name/Nummeranzeige bei eingehenden Anrufen funktioniert einwandfrei. Die Kontakte werden auch im 3CX Telefonbuch gespeichert.
Bei SearchContacts sehe ich im API-Log auch die Suche und die Rückgabe der Daten. Mit Postman klappt die Abfrage auch - also muss es wohl irgendwie an der Zuordnung der Outputs liegen. Da hab ich schon meiner Meinung nach alle Varianten ausprobiert - leider ohne Erfolg. Hat jemand einen Tipp was nicht passt?
Vielen Dank
Oliver
Postman Ausgabe:
mein Scenario:
ich bin etwas am Verzweifeln mit meinem CRM-Template. Die Name/Nummeranzeige bei eingehenden Anrufen funktioniert einwandfrei. Die Kontakte werden auch im 3CX Telefonbuch gespeichert.
Bei SearchContacts sehe ich im API-Log auch die Suche und die Rückgabe der Daten. Mit Postman klappt die Abfrage auch - also muss es wohl irgendwie an der Zuordnung der Outputs liegen. Da hab ich schon meiner Meinung nach alle Varianten ausprobiert - leider ohne Erfolg. Hat jemand einen Tipp was nicht passt?
Vielen Dank
Oliver
Postman Ausgabe:
JSON:
{
"results": [
{
"type": "company",
"id": 32,
"firstname": "Lustig",
"lastname": "GmbH",
"address": null,
"zip": null,
"city": null,
"phone": "0123456789",
"mobile": null,
"email": null,
"url": "https://test.test/company/32"
},
{
"type": "company",
"id": 33,
"firstname": "Lustig AG",
"lastname": null,
"address": null,
"zip": null,
"city": null,
"phone": "098765432",
"mobile": null,
"email": null,
"url": "https://test.test/company/33"
},
{
"type": "company",
"id": 34,
"firstname": "Lustig GmbH & Co. KG",
"lastname": null,
"address": null,
"zip": null,
"city": null,
"phone": "11223344",
"mobile": null,
"email": null,
"url": "https://test.test/company/34"
}
]
}
mein Scenario:
XML:
<Scenario Id="SearchContacts" Type="REST">
<Request SkipIf="" Url="[Domain]/api/lookup/search?search=[SearchText]" MessagePasses="0" Message="" RequestContentType="" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json">
<Headers>
<Value Key="Authorization" Passes="0" Type="String">Bearer [APIkey]</Value>
</Headers>
</Request>
<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="phone"><Filter /></Variable>
<Variable Name="PhoneMobile" Path="mobile"><Filter /></Variable>
<Variable Name="ContactUrl" Path="url"><Filter /></Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="ContactID" Passes="0" Value="[results.id]" />
<Output Type="FirstName" Passes="0" Value="[results.firstname]" />
<Output Type="LastName" Passes="0" Value="[results.lastname]" />
<Output Type="Email" Passes="0" Value="[results.email]" />
<Output Type="PhoneBusiness" Passes="0" Value="[results.phone]" />
<Output Type="PhoneMobile" Passes="0" Value="[results.mobile]" />
<Output Type="ContactUrl" Passes="0" Value="[results.url]" />
<Output Type="EntityId" Passes="0" Value="[results.id]" />
<Output Type="EntityType" Passes="0" Value="Contacts" />
</Outputs>
</Scenario>