Export Unsubscribes to an External System
If you often need to retrieve the list of customers or members who have unsubscribed from a campaign, you can do it in Prisma using data syncs.
In this example, we will configure a daily export of people who have unsubscribed.
-
Go to Settings, Data Synchronization, and click New Synchronization.
-
Select Add Export.
-
Name the data sync as Daily Unsubscriptions.
-
From Data to Export select Unsubscriptions.
-
Choose API in the destination type.
-
In frequency select Recurrent and Daily. Please note that Day refers to the date when this process will start.
-
Save changes. The result should be similar to the image below:
-
Using the generated API URL (which is in the form of
https://[server]:[port]]/api/data-sync/export/[your-token]
) you will be able to download the generated file with the newly unsubscribed members daily.
If you need to manually test the download of the file, you can do so using the same link or command-line tools such as wget
or curl
:
curl http://example.com:8080/api/data-sync/export/61797e94-2406-4f64-b589-41439bde0e4f
The output of the above command will look as follows:
date;customer-id;type;campaign;category;group;channel;origin;email
"2017-11-02T20:15:49";"137-W";"campaign";"OMNITest";"";"";"all";"Customer";"gwinkler@prismacampaigns.com|819191mendoza@hotmail.com"
"2017-11-07T13:43:49";"137-W";"campaign";"SalienteX";"";"";"all";"Customer";"gw@prismacampaigns.com|819191mendoza@hotmail.com"
"2017-11-28T14:12:03";"137-W";"campaign";"outbound expirativa";"";"";"all";"Customer";"gw@prismacampaigns.com|819191mendoza@hotmail.com"