Delete a contact in outbound contact list

Hi there.

We have an multiple always running agentless campaign, contacts are inserted via the API from a website form. each agentless campaign is configured to attempt 3 or more times. now the contact lists are growing, we would like to delete old contact from the contact lists.

old contact means the contact has been dialled, marked completed or 3 attempt has completed,(the dialer will not re-attempt dial the contact anymore).

we're thinking about have a scheduled lambda function (every 30 minutes) loop through all contacts in the list, if the contact is 'old', then delete it.

we don't want to use /api/v2/outbound/contactlists/{contactListId}/clear, this will clear any recall or scheduled callback.

if we query the contact with Get a contact.
/api/v2/outbound/contactlists/{contactListId}/contacts/{contactId}

How do we determine if the contact is no longer callable can be deleted ? it has been dialled or no re-call on the contact.

thank you
Yuezhong.

Hi Yuezhong,

You can check out this link for reference. Under the responses section, you can see there is an attribute called callable, which is a boolean value that indicates whether the contact is callable or not. Also, you can try the API and check the response using API Explorer. Hope this helps.

Thanks,

Weite

Hi Weite

Thank you

I have tried, the callable attribute always true, (as long as the phone number is callable), it doesn't get affected by the attempt.

{
"id": "4c00eab492df5f82e787053e9ee63f41",
"contactListId": "75263363-2dfc-4d6c-a67f-180673ef2f3c",
"data": {
"FirstName": "dd",
"LastName": "dd",
"PHONE1": "+61222970000"
},
"callRecords": {
"PHONE1": {
"lastAttempt": "2021-04-07T23:37:36.882Z",
"lastResult": "ININ-OUTBOUND-CONTACT-ATTEMPT-LIMIT-SKIPPED" or
}
},
"callable": true,
"phoneNumberStatus": {
"PHONE1": {
"callable": true
}
},
"selfUri": "/api/v2/outbound/contactlists/75263363-2dfcddd-4d6c-a67f-
}

OR ININ-OUTBOUND-STUCK-INTERACTION

i guess we have to check lastResult against all wrap up code to determine if the contact is completed.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.