Hi,
Could you please share the data from your first module? As I understand it, you might not need an Array aggregator, but rather the use of the map()
function.
Something like {{length(map(14.tags; "name"; "Standard - Pas de réponse"))}}
(Just copy-paste it into your scenario). The first parameter here is the mapped value of your tags array.
Glenn - Callinetic
Hi, thank you for your response,
but it’s not what I'm looking for.
The function is processing the result of the first collection in the array, not the sum.
For example, in my first array, I have several collections, and within each collection, there's an array named “tag”. I want to calculate the sum of these tags if the name is “Standard - Pas de réponse”. I tried this formula, but it returns 0:
{{sum(map(6.array; sum(map(6.array<span class="chcklst-box fa fa-square-o fa-fw"></span>.tags; if(6.array<span class="chcklst-box fa fa-square-o fa-fw"></span>.tags<span class="chcklst-box fa fa-square-o fa-fw"></span>.name = “Standard - Pas de réponse”; 1; 0)))))}}
Yes, it is functioning without the array aggregator, but I process a significant volume of calls daily (over 400). This is why I was looking to implement an aggregator to minimize the number of operations.
Hi there,
Could you please share the output bundle from the array aggregator?
Best regards,
Msquare Automation
Gold Partner of callin.io
Sure !
I attempted another function to retrieve the Tags’ Name information, but it returned empty, even though my output bundle aggregator contains information in the Name field:
I need to calculate the sum of all entries where array.tags.name equals “Standard - Pas de réponse”.
[
{
"array": [
{
"tags": [],
"number": {
"id": 570897,
"direct_link": "https://api.aircall.io/v1/numbers/570897",
"name": "Digitalsace",
"digits": "+33 7 57 90 01 94",
"country": "FR",
"time_zone": "Europe/Paris",
"open": true,
"availability_status": "open",
"is_ivr": false,
"live_recording_activated": true,
"priority": null,
"messages": {
"welcome": "https://media-web.aircall.io/tracks/tts/languages/fr/voices/Celine/7bebe355313a1b5047c14c2c296696176ed97743.mp3",
"waiting": "https://media-web.aircall.io/tracks/library/bensound-retrosoul.mp3",
"ivr": "https://media-web.aircall.io/tts/languages/fr/voices/Celine/6b3f3f944c14775219565b1d131ffa8baf4dd242.mp3",
"voicemail": "https://media-web.aircall.io/tracks/tts/languages/fr/voices/Celine/a0258c535f2d7e49889b51eecf444478066b0d24.mp3",
"closed": "https://media-web.aircall.io/tracks/tts/languages/fr/voices/Celine/168496d6c0e115c0e28aa741836cbc5fa8f9678e.mp3",
"callback_later": "https://media-web.aircall.io/tts/languages/fr/voices/Celine/f8d1eb9b0a94d84c7c1a0cdc48232e2ae60255ac.mp3",
"unanswered_call": "https://media-web.aircall.io/tracks/tts/languages/fr/voices/Celine/a0258c535f2d7e49889b51eecf444478066b0d24.mp3",
"after_hours": "https://media-web.aircall.io/tracks/tts/languages/fr/voices/Celine/168496d6c0e115c0e28aa741836cbc5fa8f9678e.mp3",
"ringing_tone": "https://media-web.aircall.io/tracks/ringing_tones/EU.mp3"
},
"created_at": "2023-01-17T08:15:32.000Z"
}
},
{
"tags": [
{
"id": 1645089,
"name": "OQP / NRP",
"created_at": "2024-09-26T06:44:42.000Z",
"tagged_by": {
"id": 1236007,
"direct_link": "https://api.aircall.io/v1/users/1236007",
"name": "Kevin LENEGRE",
"email": "kevin.lenegre@salestonic.fr",
"available": true,
"availability_status": "available",
"created_at": "2024-02-26T08:44:35.000Z",
"time_zone": "Etc/UTC",
"language": "fr-FR",
"state": "always_opened",
"wrap_up_time": 0
}
}
],
"number": {
"id": 570897,
"direct_link": "https://api.aircall.io/v1/numbers/570897",
"name": "Digitalsace",
"digits": "+33 7 57 90 01 94",
"country": "FR",
"time_zone": "Europe/Paris",
"open": true,
"availability_status": "open",
"is_ivr": false,
"live_recording_activated": true,
"priority": null,
"messages": {
"welcome": "https://media-web.aircall.io/tracks/tts/languages/fr/voices/Celine/7bebe355313a1b5047c14c2c296696176ed97743.mp3",
"waiting": "https://media-web.aircall.io/tracks/library/bensound-retrosoul.mp3",
"ivr": "https://media-web.aircall.io/tts/languages/fr/voices/Celine/6b3f3f944c14775219565b1d131ffa8baf4dd242.mp3",
"voicemail": "https://media-web.aircall.io/tracks/tts/languages/fr/voices/Celine/a0258c535f2d7e49889b51eecf444478066b0d24.mp3",
"closed": "https://media-web.aircall.io/tracks/tts/languages/fr/voices/Celine/168496d6c0e115c0e28aa741836cbc5fa8f9678e.mp3",
"callback_later": "https://media-web.aircall.io/tts/languages/fr/voices/Celine/f8d1eb9b0a94d84c7c1a0cdc48232e2ae60255ac.mp3",
"unanswered_call": "https://media-web.aircall.io/tracks/tts/languages/fr/voices/Celine/a0258c535f2d7e49889b51eecf444478066b0d24.mp3",
"after_hours": "https://media-web.aircall.io/tracks/tts/languages/fr/voices/Celine/168496d6c0e115c0e28aa741836cbc5fa8f9678e.mp3",
"ringing_tone": "https://media-web.aircall.io/tracks/ringing_tones/EU.mp3"
},
"created_at": "2023-01-17T08:15:32.000Z"
}
}
],
"__IMTAGGLENGTH__": 2
}
]
This was the solution; I had to use the flatten function.