Expand my Community achievements bar.

SOLVED

Adobe Campaign Purge A folder of Recipients

Avatar

Level 2

I have a folder containing recipients that I want to purge.

Basically we have moved some recipients into this folder that we wish to delete and as per some Adobe instructions I found then to delete these recipients we should purge the folder, I want to do this in a script in a workflow using:

nms.recipient.ClearFolder(<recipient folderId="869848332" />);

where 869848332 is the folder id of the folder I am trying to purge, but when I run this nothing seems to happen.

Jeremy

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Jeremy,

You're right, I've just remembered this note in the workflow documentation:

For example, deleting a recipient via a workflow will not result in all of the recipient's delivery history being deleted. However, deleting a recipient directly in the 'Recipients' folder will indeed result in all data linked with this recipient being deleted.

So purging the folder is the right solution. However, I'm not sure if the ClearFolder function is really purging the data or simply removing the data from the folder but without deleting it from the database.

Have you tried other syntax? In the JSAPI, the ClearFolder function seems to only need the folder ID as parameter, so maybe something like ClearFolder("869848332")

If this is not a syntax problem, then I don't know any other similar function available to purge recipient data, so doing it manually would be the only way.

Florent

View solution in original post

6 Replies

Avatar

Level 10

Hi Jeremy,

I'm not really good at JavaScript but why not trying to use the Data Update activity in a workflow (with the Delete action)?

Florent

Avatar

Level 2

Hi,

Thanks for you help.

I only went down the purge route to delete recipients because of some documentation I found: Managing profiles

I imagined this was something to do with fully removing history, subscriptions etc.?

Jeremy

Avatar

Correct answer by
Level 10

Hi Jeremy,

You're right, I've just remembered this note in the workflow documentation:

For example, deleting a recipient via a workflow will not result in all of the recipient's delivery history being deleted. However, deleting a recipient directly in the 'Recipients' folder will indeed result in all data linked with this recipient being deleted.

So purging the folder is the right solution. However, I'm not sure if the ClearFolder function is really purging the data or simply removing the data from the folder but without deleting it from the database.

Have you tried other syntax? In the JSAPI, the ClearFolder function seems to only need the folder ID as parameter, so maybe something like ClearFolder("869848332")

If this is not a syntax problem, then I don't know any other similar function available to purge recipient data, so doing it manually would be the only way.

Florent

Avatar

Level 10

Hey Jeremy,

Were you able to find a solution for this?

Let me know,

Florent

Avatar

Level 2

We were able to use the purge option to do the test deletion but could not get the ClearFolder option to work so we will purge manually which is fine

Thanks

Avatar

Community Advisor

I know this is an old thread, but the correct way is as followings

 

var x = nms.recipient.ClearFolder('<folder>18057971</folder>');

 

17/09/2022 02:13:15 js14 Deletion of 5 record(s) from table 'NmsRecipient' completed in 0.0s and 1 step(s)
17/09/2022 02:13:15 js14 Deletion of 6 record(s) from table 'NmsSubHisto' completed in 0.0s and 1 step(s)
17/09/2022 02:13:15 js14 Deletion of 4 record(s) from table 'NmsSubscription' completed in 0.0s and 1 step(s)

 

Neither right clicking on the workflow and purging it, or running the above function deletes broadlogRcp data, but i found it to delete trackinglog data and subscription, I will feedback once I gather some intel from campaign source code.