- Joined
- Apr 17, 2020
- Messages
- 11
- Reaction score
- 1
Dear all,
We are currently trying to get a pipedrive integration working, which was posted by Mark Phillips (https://www.3cx.com/community/threads/pipedrive-3cx-server-side-integration.65431/) and have made the necessary adjustments as posted in the releaded thread by 3CX (https://www.3cx.com/community/threads/pipedrive-integration-v18.86232).
When testing against a pipedrive user with only one phone number, everything looks fine.
However, there seems to be an issue with users having multiple phone numbers, since we get them as an array. Our Rules (see below) cannot deal with phone numbers in an array, is there a way to return them as single values (i.e. WorkPhone, BusinessPhone, etc.).
This is the response we receive to our test user:
{
"success": true,
"data": {
"items": [
{
"result_score": 0.1997,
"item": {
"id": 6,
"type": "person",
"name": "Maximilian Wagner",
"phones": [
"0049987654321",
"0049123456789"
],
"emails": [
[email protected]
],
"visible_to": 3,
"owner": {
"id": 14338562
},
"organization": {
"id": 1,
"name": "Test GmbH",
"address": null
},
"custom_fields": [],
"notes": []
}
}
]
},
"additional_data": {
"pagination": {
"start": 0,
"limit": 100,
"more_items_in_collection": false
}
}
}
And these are the rules and variables we used:
<Rules>
<Rule Type="Number">data.items.item.phones</Rule>
</Rules>
<Variables>
<Variable Name="Id" Path="data.items.item.id">
<Filter />
</Variable>
<Variable Name="Name" Path="data.items.item.name">
<Filter />
</Variable>
<Variable Name="WorkPhone" Path="data.items.item.phones">
<Filter />
</Variable>
<Variable Name="MobilePhone" Path="data.items.item.phones">
<Filter />
</Variable>
<Variable Name="Email" Path="data.items.item.emails">
<Filter />
</Variable>
</Variables>
Thank you for your thoughts on this!
We are currently trying to get a pipedrive integration working, which was posted by Mark Phillips (https://www.3cx.com/community/threads/pipedrive-3cx-server-side-integration.65431/) and have made the necessary adjustments as posted in the releaded thread by 3CX (https://www.3cx.com/community/threads/pipedrive-integration-v18.86232).
When testing against a pipedrive user with only one phone number, everything looks fine.
However, there seems to be an issue with users having multiple phone numbers, since we get them as an array. Our Rules (see below) cannot deal with phone numbers in an array, is there a way to return them as single values (i.e. WorkPhone, BusinessPhone, etc.).
This is the response we receive to our test user:
{
"success": true,
"data": {
"items": [
{
"result_score": 0.1997,
"item": {
"id": 6,
"type": "person",
"name": "Maximilian Wagner",
"phones": [
"0049987654321",
"0049123456789"
],
"emails": [
[email protected]
],
"visible_to": 3,
"owner": {
"id": 14338562
},
"organization": {
"id": 1,
"name": "Test GmbH",
"address": null
},
"custom_fields": [],
"notes": []
}
}
]
},
"additional_data": {
"pagination": {
"start": 0,
"limit": 100,
"more_items_in_collection": false
}
}
}
And these are the rules and variables we used:
<Rules>
<Rule Type="Number">data.items.item.phones</Rule>
</Rules>
<Variables>
<Variable Name="Id" Path="data.items.item.id">
<Filter />
</Variable>
<Variable Name="Name" Path="data.items.item.name">
<Filter />
</Variable>
<Variable Name="WorkPhone" Path="data.items.item.phones">
<Filter />
</Variable>
<Variable Name="MobilePhone" Path="data.items.item.phones">
<Filter />
</Variable>
<Variable Name="Email" Path="data.items.item.emails">
<Filter />
</Variable>
</Variables>
Thank you for your thoughts on this!