0

I am sure this is a thing, but we have a group of "test" email accounts that our QA group regularly tests. Of course the unsubscribe is one of those things they test, and often we have to reset the status manually.

So I thought that I could make a daily automation to just update the specific records to "active" nightly so we never had to worry about it.

Essentially:

SELECT Email from 'Test_list' , compare against all subscriber and change the STATUS from "Unsubscribed" to "Active"

It SEEMS easy, but I am not sure how to do the query.

1

Edit - my reply was pertaining to Core SF not Marketing Cloud. Apologies.

Not sure if you've tried this, but have you considered adding a "test account" checkbox field visible only to those users who need it? That way you could handle this both through point and click with Process builder and scheduled actions or some logic in a trigger or apex class.

To answer your query question, you could do something like this (I'm assuming we're using Contact object and Email field):

[SELECT Status FROM Contact WHERE Test_Account__c = true]

This would return the status of all contacts whom you have identified as test accounts. If you wanted only contacts that are test accounts AND their status is "Unsubscribed", you can use the query below:

[SELECT Status FROM Contact WHERE Test_Account__c = true AND Status = 'Unsubscribed']

After that, you could iterate through the list of Contacts and update their status to 'Active' then update the list in Salesforce.

Let me know if this answers your question and please mark it correct if so! Thanks.

| improve this answer | |
  • HI! Do you mean like add the column to my all subscribers? Hmm. good idea :) – scoopzilla Mar 6 at 0:16
  • 2
    Pretty sure OP is asking a marketing-cloud question. – Adam Spriggs Mar 6 at 1:29
  • Sorry you're correct, I missed the tags – SalesforceMeach Mar 6 at 18:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.