- Joined
- Dec 3, 2025
- Messages
- 2
- Reaction score
- 1
Hi specialists
I have a running and working CRM integration from an API. In 90% of cases, there is one phone number in the response of the API:
in some rare cases, there are multiple numbers registered on the ID:
The first response is working, the second is not:
How can I assign the first number to the variable, independent of how many are in the response?
I tried <Variable Name="PhoneBusiness" Path="result.data.phoneNumbers[0]"> already. Not working.
Any help and hints are very appreciated. Thank you.
I have a running and working CRM integration from an API. In 90% of cases, there is one phone number in the response of the API:
JSON:
"data": [
{
"dwhId": "DETBA00000000003844920000000072",
"companyname": "Departement der Industriellen Betriebe ",
"firstname": "",
"name": "",
"street": "Beatenplatz",
"houseNumber": "2",
"zip": "8001",
"location": "Zürich",
"phoneNumbers": [
"044 412 11 11"
],
"mobileNumbers": []
}]
]
in some rare cases, there are multiple numbers registered on the ID:
JSON:
"data": [
{
"dwhId": "DETBA00000000019753370000000072",
"companyname": "Zürich Versicherungs-Gesellschaft AG ",
"firstname": "",
"name": "",
"street": "Hagenholzstrasse",
"houseNumber": "60",
"zip": "8050",
"location": "Zürich",
"phoneNumbers": [
"*044 628 28 28",
"*0800 808 080"
],
"mobileNumbers": []
}
]
The first response is working, the second is not:
XML:
<Rules>
<Rule Type="Any">result.data.dwhId</Rule>
</Rules>
<Variables>
<Variable Name="ContactID" Path="result.data.dwhId">
<Filter />
</Variable>
<Variable Name="CompanyName" Path="result.data.companyname">
<Filter />
</Variable>
<Variable Name="FirstName" Path="result.data.firstname">
<Filter />
</Variable>
<Variable Name="LastName" Path="result.data.name">
<Filter />
</Variable>
<Variable Name="PhoneBusiness" Path="result.data.phoneNumbers">
<Filter />
</Variable>
How can I assign the first number to the variable, independent of how many are in the response?
I tried <Variable Name="PhoneBusiness" Path="result.data.phoneNumbers[0]"> already. Not working.
Any help and hints are very appreciated. Thank you.
Last edited: