Automated Process: Removing Contact Records from a Mailing List | XM Community
Skip to main content

Hello I have a unique situation. I need to remove all contacts in a single mailing list monthly. My use case is as follows

  • Every month I upload a new list of contact records
  • I need to remove the contacts in the list before uploading new contact records because some of last month’s contacts may not be valid for the next months distribution

I found a way to do this using the code task using Javascript but I’m getting an error message I’ve never seen before. 

 

Has anyone seen this issue or know how to resolve it? Does anyone know of a different way to accomplish what I’m asking? I need this to be automated as well. Manually removing contacts monthly is not an option. 

 

Error Message:

{  "actionId": "OCAC_zfkIOWL50RdCqFn",  "exports": {    "message": "2372 contacts attempted for removal.",    "results":        {        "error": "QSI is not defined",        "success": false      },

Please check transaction distribution which should be the correct approach for your use case.

 


Unfortunately, Transactions won’t work because I cannot automate the group or the distribution. I’m trying to build an automated system to run this monthly. 


@asi2 Run this API across your mailing list https://api.qualtrics.com/4ed38798f8039-delete-contact-in-mailing-list
Also, why don’t you just create a new mailing list for each month?


@asi2 Run this API across your mailing list https://api.qualtrics.com/4ed38798f8039-delete-contact-in-mailing-list
Also, why don’t you just create a new mailing list for each month?

I did using the code task because I need it to loop as the api call only does 1 contact at a time. Do you know a way to run it consistently?

 

I can’t create a new list as I have automatic list enrollment and have specific conditions imported contacts need to meet before distributing. The import list has 50+ brands and I need them filtered into their own list and send to 16% of the imported contacts. 


@asi2 You mean the code task from workflow? It’s only meant for data manipulation, formatting, and calculation operations before or after other tasks in a workflow. You need to write code to get contactID and walk through each one.

With your condition, a segment and segment sample is way more useful because the segment updated automatically


@asi2 You mean the code task from workflow? It’s only meant for data manipulation, formatting, and calculation operations before or after other tasks in a workflow. You need to write code to get contactID and walk through each one.

With your condition, a segment and segment sample is way more useful because the segment updated automatically

How do you setup a segment sample? I looked into Segments but it was unable to satisfy only distributing to 16% of a sample. 


@asi2 Make segments within your Directory with the condition of contacts that are updated in the last month and your specific condidtion so that at the end of the month, old contact will be automatically removed. In the workflow, you can set-up task to call the https://api.qualtrics.com/4ed38798f8039-delete-contact-in-mailing-list so that when the old one got removed from Segment it will also be removed from Mailing List.


The same thing can happened when a contact is updated and satisfied the segment condition, it can also be automatically added to the mailing list.

However, this is just a patch work, I still believe there’s more efficient way of solving your problem but only you know how exactly the outcome. Take a look at XM sample task Create an XM Directory Sample Task, it can work with various trigger, see if it will fit you.


Leave a Reply