1

Our organization wants to use Marketing Cloud and the standard subscription center to handle Newsletters subscriptions. We have a campaign for each Newsletter in our Salesforce environment, and each time a campaign member is created, a Journey will trigger, checking if a control checkbox in the lead/contact is selected, to determine to which newsletter the subscriber will be subscribed, so it can send a confirmation email, and add the subscriber to the corresponding publication list, so the subscription can be managed through the subscription center.

The issue is that it is possible for the subscriber to check multiple checkboxes, and then be added to multiple campaigns, in those cases we need to avoid sending multiple confirmation emails (one email for each campaign/publication list the lead is added to).

So my question is, what would be the best way to check to which campaigns the subscriber is added, and then send a single confirmation email that mentions these campaigns, and adds the subscriber to the corresponding publication lists?

Here is a picture of the current Journey, the idea was to send an email for each branch and each email would add the subscriber to the corresponding publication lists, it was created before considering the multiple subscription scenario.enter image description here

1 Answer 1

0

You could just use a single email and retrieve the subscriber's active publication lists using this little bit of AMPscript:

%%[

  set @lists = lookupOrderedRows("_ListSubscribers", 0, "ListName desc", "SubscriberID", AttributeValue("subscriberid"), "ListType", "Publication List", "Status", "active")
  set @rowCount = rowcount(@lists)
  output(concat("<br>rowCount:", @rowCount))
  
  for @l = 1 to @rowCount do
      set @row = row(@lists,@l)
      set @listName = field(@row,"ListName")
      set @listType = field(@row,"ListType")
      set @status = field(@row,"Status")
      output(concat("<br><br>ListName:", @listName))
      output(concat("<br>listType:", @listType))
      output(concat("<br>Status:", @status))
  next @l

]%%

Output

rowCount:1

ListName:Happenings
listType:Publication List
Status:active

More info

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .