Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Remove a recipient from a list from a list from workflow

SorenDahk
Level 2
Level 2

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
wodnicki
Correct answer by
Community Advisor
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

4 Replies
wodnicki
Correct answer by
Community Advisor
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

SorenDahk
Level 2
Level 2
Hi Wodnicki. Thanks for the proposed solution, this is very helpful!
CedricRey
Level 5
Level 5

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

SorenDahk
Level 2
Level 2
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 🙂