Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Remove a recipient from a list from a list from workflow

Avatar

Level 4

Hi there! I have a project ongoing where I am adding leads to a list of recipients. I want to automatically remove recipients from the list when a lead converts to a paying customer. 

I can not figure out how to achieve that. Any pointers to how this can be done through a workflow?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

 

Use the recipient list feature of the software.

The 'List update' workflow activity only allows for [over]writing lists so use the 'Update data' activity for deletion:

  1. Scheduler or signal activity
  2. Query for recipients that became leads since the workflow last ran
  3. Delete them from nms:rcpGrpRel

 

Thanks,

-Jon

View solution in original post

6 Replies

Avatar

Correct answer by
Community Advisor

Hi,

 

Use the recipient list feature of the software.

The 'List update' workflow activity only allows for [over]writing lists so use the 'Update data' activity for deletion:

  1. Scheduler or signal activity
  2. Query for recipients that became leads since the workflow last ran
  3. Delete them from nms:rcpGrpRel

 

Thanks,

-Jon

Avatar

Level 4
Hi Wodnicki. Thanks for the proposed solution, this is very helpful!

Avatar

Level 2

Sorry if i'm missing something but when you Delete them from nms:rcpGrpRel how do you specify the list you want to delete them from?

 

Avatar

Community Advisor

Hello SorenDahk,

 

You can try to use the "Unregister" method of nmsGroup object with a JS.
As it is not a static function, you have to load your list and then remove your element with a query (this is not well documented in the JSAPI, I had to do some test) :

var listId = listId; //You have to know your list ID
var recipientId = recipientId //You have to know your recipient (or what you want to delete from list) ID
var myList = NLWS.nmsGroup.load(listId); //Load the list
myList.Unregister( 
    <listChoice selectAll="false"><key value={recipientId}/><where><condition expr={"@id = " + recipientId}/></where></listChoice>
     );//Remove the element from the list (beware, the identifier here is the @ID attribute, but it can be another attribute  )

Hope this could help.

Cedric

Avatar

Level 4
Hi @CedricRey. Thank you very much for this suggestion. I was not aware of the unregister method at all. This could very well prove to be a good solution for us, if we are not going to use the OOB standard update activity. Thank you very much

Avatar

Level 2

Incredibly useful post! I can't believe this isn't outlined in official documentation anywhere.

I just used this as the basis of a script to iterate rows and remove from a given list, which has massively streamlined a business process.