Original Message:
Sent: 05-22-2026 10:46
From: Rudy Reinold
Subject: Outbound - AM leave voicemail after n-th attempt
I wanted to put an answer to this question, for anyone who might come across this post in future.
The issue was resolved with the creation of the following Data Action:
Input Contract:
{
"title": "INPUTS",
"type": "object",
"additionalProperties": true,
"properties": {
"interval": {
"type": "string"
},
"phoneNumber": {
"type": "string"
}
}
}
Output Contract:
{
"title": "OUTPUT",
"type": "object",
"additionalProperties": true,
"properties": {
"count": {
"type": "integer"
},
"outboundCampaignId": {
"type": "string"
},
"outboundContactId": {
"type": "string"
},
"outboundContactListId": {
"type": "string"
}
}
}
Configuration:
POST /api/v2/analytics/conversations/details/query
Request Body Template
{
"interval": "${input.interval}",
"segmentFilters": [
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "dnis",
"operator": "matches",
"value": "tel:${input.phoneNumber}"
},
{
"type": "dimension",
"dimension": "mediaType",
"operator": "matches",
"value": "voice"
}
]
}
]
}
Response Template
{
"translationMap": {
"count": "$.totalHits",
"outboundContactId": "$.conversations[0].participants[0].sessions[0].outboundContactId",
"outboundContactListId": "$.conversations[0].participants[0].sessions[0].outboundContactListId",
"outboundCampaignId": "$.conversations[0].participants[0].sessions[0].outboundCampaignId"
},
"translationMapDefaults": {
"count": "0",
"outboundContactId": "\"\"",
"outboundContactListId": "\"\"",
"outboundCampaignId": "\"\""
},
"successTemplate": "{\"count\":${count},\"outboundCampaignId\":${outboundCampaignId},\"outboundContactId\":${outboundContactId},\"outboundContactListId\":${outboundContactListId}}"
}
The interval we use is from midnight until the current time of the current day. This returns the number of calls placed to the targeted ANI number.
With the returned value, a decision step in an outbound flow can be use to triggering whether or not to leave a voicemail, when the Answer Machine outcome is activated.
------------------------------
Ruud Reinold
BNP Paribas Personal Finance UK
Original Message:
Sent: 04-17-2026 15:44
From: Rudy Reinold
Subject: Outbound - AM leave voicemail after n-th attempt
Dear community,
I am trying to create an outbound flow, that will leave a voicemail on the n-th attempt to contact the nr and going to voicemail again.
We had this developed 6 years ago but it doesn't return the correct nr of calls we made to the same number from the campaign it always returns 1 as value even though we called the number 15 times from the campaign.
The data action we have is this:
POST /api/v2/analytics/conversations/details/query
Request body Template:
{
"interval": "${input.Interval}",
"order": "desc",
"orderBy": "conversationStart",
"segmentFilters": [
{
"type": "and",
"predicates": [
{
"type": "dimension",
"dimension": "outboundContactListId",
"operator": "matches",
"value": "${input.ContactListID}"
},
{
"type": "dimension",
"dimension": "outboundContactId",
"operator": "matches",
"value": "${input.ContactID}"
},
{
"type": "dimension",
"dimension": "dnis",
"operator": "matches",
"value": "tel:${input.PhoneNumber}"
}
]
}
]
}
Response:
{
"translationMap": {
"_count": "$.conversations.length()"
},
"translationMapDefaults": {
"count": "0"
},
"successTemplate": "{\"count\":${count}}"
}
We need to understand why it only returns 1 as value and preferably we would like to know how many times it hit voicemail out of the total attempts made that period.
The interval period is from midnight till the time the call is made.
If anyone can shed a light on this that would be great!
Have all a great weekend
#DataActions
------------------------------
Ruud Reinold
BNP Paribas Personal Finance UK
------------------------------