No problem at all!
So actually, before you perform the Get, you'll need to do the Post:
1) Pass the contactListId along into:
POST
/api/v2/outbound/contactlists/{contactListId}/export
2) Once that's executed, pass your contactListId into:
GET
/api/v2/outbound/contactlists/{contactListId}/export
If you try to do #2 before #1, you'll get a 404 error as the export doesn't exist. It's also possible that if you have manually forced the export before, you'll pull stale data.
Once completing #2, you'll have the URL to download. Using whichever process of your choice, download the file from that URL and it'll be stored as long as you need. You are then free to do whatever you want with it. Examples exist within the API Library itself for various languages.
------------------------------
Steven Busse
Vice President, Lead Business Analyst
M&T Bank
------------------------------
Original Message:
Sent: 04-12-2024 14:23
From: Sagar Tawde
Subject: Empty the contact list at end of the day
I am sorry that i am asking too many follow-up questions. I would like to borrow your expertise here. how do we export the contact list. is this as follow?
Export the Contact List Content
Two Step procedure
1st step:
GET /api/v2/outbound/contactlists/91865401-3b53-4905-8d29-4b411b8d5287/export
Collect the Output URI
"https://api.usw2.pure.cloud/api/v2/downloads/ecabec6cd7678bc4
Use the download ID in this case
Download ID: ecabec6cd7678bc4
2nd Step:
GET /api/v2/downloads/ecabec6cd7678bc4
------------------------------
Sagar Tawde
MetLife Services and Solutions, LLC
Original Message:
Sent: 04-12-2024 09:24
From: Steven Busse
Subject: Empty the contact list at end of the day
POST - /api/v2/outbound/contactlists/{contactListId}/clear
Before you start clearing things though, I'd ensure the following:
1) Make sure your contact lists are fully shutdown
2) Make sure you export the contact list from the previous days results, should you need to maintain and/or research the results at a later date.
3) Once you've confirmed the lists are shutdown and exported, post the clear API.
That will clear out the Contact List(s) in question, and allow you to append new data whenever you're ready to.
------------------------------
Steven Busse
Vice President, Lead Business Analyst
M&T Bank
Original Message:
Sent: 04-12-2024 09:12
From: Sagar Tawde
Subject: Empty the contact list at end of the day
Thanks for your reply.
Are you referring to the following API.
DELETE
/api/v2/outbound/contactlists/{contactListId}/contacts
------------------------------
Sagar Tawde
MetLife Services and Solutions, LLC
Original Message:
Sent: 04-12-2024 08:57
From: Steven Busse
Subject: Empty the contact list at end of the day
We were never able to find something built-in. There are many API Calls that can be utilized to perform the requested function. Scheduling the API Calls to clear out a list is something we do nightly, and is a requirement with our batch processes.
I'd highly advise if you do go down this road, to first look into running calls to shutdown any potentially running lists; as it's possible that if a list gets stuck active, then the call to clear the contact list will subsequently fail.
------------------------------
Steven Busse
Vice President, Lead Business Analyst
M&T Bank
Original Message:
Sent: 04-12-2024 08:43
From: Sagar Tawde
Subject: Empty the contact list at end of the day
Hey Guys,
I need your brain to understand if Genesys Cloud has an in-built feature which helps us empty the contact list (contacts) at end of each day?
Like at a specific time of the day Genesys can run a script or something to delete the contacts from the contact list.
Would appreciate your help.
#Outbound
------------------------------
Sagar Tawde
MetLife Services and Solutions, LLC
------------------------------