I'm trying to update some already created lists dynamically.
Anyone has a js code to implement this activity?
The idea is to save the recipient list in these groups via an unique ID, so I guess I've to run a for...each but I have no idea on how to read and write via js
Please select the 2nd radio button then you can put your variables for the list name:
so you can manage your goal by using the Update activity directly, with this enriched targetData result set
that's exactly my initial structure, however after an enrichment and a deduplication activity now that's what I got:
userId, list name, list id
maybe I can now use the UpdateList activity but, again, I don't know how to get the proper name.
That's the schema:
So I need to put 8000037 user in the list called Mobile Phones_SA, etc.
How to get the "Mobile Phones_SA" name via the instance.vars?
I know it's a dumb question, but it's my first time...
in the meanwhile I'm trying to reach the scope via a for each: I successful listed the data, now all I need is the js code to update dynamically the lists...
Please may you describe the file structure in details and tell if you can have other structure. Depending on the file structure, the treatment is different.
For instance, if the structure is:
the solution is probably to do it in JS with a foreach loop and splitting list_ids in a JS array with split function then call the nms.recipient.RegisterGroup
The List update activity is intended to update one List (group in case of recipient) at a time. And doing a standard loop in the workflow is not convenient. The List update is useful for mass-update (as in SQL).
But perhaps someone else could suggest another approach for doing a mass-update with such file structure.
If you have many files, each file regarding a list, the file containing the recipient id list, then I consider than using Collector files and loop for List update activity is more adapted.
Well, hope this could help.
thanks, now my issue is how to populate the instance.vars
In my WF I've loaded an external FTP file with account_id and list_ids and with list update I've to store the recipients in the proper list. So I need to match the list_ids from the external file, with the actual ids of the already created lists.
My question is: how to put the id field in the instance.vars?
I've tried with the OOTB but I was unable to set the group name dynamically. I'll have a look to the documentation JSAPI
If your need is to achieve this treatment in a workflow, I rather recommend you to use the OOTB "List update" activity.
Please refer to the JSAPI.chm documentation (restricted to license) for details.