Legacy Dev Forum Posts

 View Only

Sign Up

Delete a contact in outbound contact list

  • 1.  Delete a contact in outbound contact list

    Posted 06-05-2025 18:02

    yuezhong | 2021-04-07 21:07:31 UTC | #1

    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.


    anon90596342 | 2021-04-07 21:27:54 UTC | #2

    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


    yuezhong | 2021-04-08 00:09:34 UTC | #3

    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. https://help.mypurecloud.com/articles/wrap-up-codes-assigned-by-outbound-dialing/


    system | 2021-05-08 21:34:33 UTC | #4

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


    This post was migrated from the old Developer Forum.

    ref: 10530