Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • lele 107 posts 444 karma points
    May 30, 2024 @ 06:56
    lele
    0

    Unsubscribe from only one mailing list

    Hello

    How can you be unsubscribed from only one e-mail list and not from all of them?

    We have a controller where we ParseUnsubscribeToken(token).

    Should we do it with the AddOrUpdateSubscriptionsRequest --> unsubscribe?

    if yes from where could I grab the RecipientId, MailingListId params from the token?

    thanks for your help.

  • Markus Johansson 1930 posts 5857 karma points MVP 2x c-trib
    May 30, 2024 @ 11:58
    Markus Johansson
    0

    Hi!

    The UnsubscribeLinkData does not contain any information on which list that was used, since in theory a recipient could be represented in more than one list. When that happens we can't say which of the two (or more) lists was the source.

    The solution would be to create a custom landing page where you list all the mailing lists and let the recipient choose which one to unsubscribe from, like a "your email preferences"-page.

    You could use the GetSubscriptionsFor() method to list the existing subscriptions for a recipient, could also use the GetMailingListsForAllWorkspaces() to list all mailing lists if you need to.

    Then based on the selections from the recipient you can use AddOrUpdateSubscriptions() to store the information.

    There should be some examples in the docs: https://www.newsletterstudio.org/documentation/package/13.0.0/develop/front-end-api/

    Feel free to ask if you need further assistance.

    Cheers!

  • lele 107 posts 444 karma points
    Jun 03, 2024 @ 07:44
    lele
    0

    Hi

    Perfect thanks for your feedback.

    another question regarding the import of contacts. if a contact already exists but a field is changed, for example last name, this is ignored...

    is it possible to overwrite this from the import?

  • Markus Johansson 1930 posts 5857 karma points MVP 2x c-trib
    Jun 03, 2024 @ 09:03
    Markus Johansson
    0

    Hi!

    You're right, the import feature will not overwrite anything at the moment it would be hard for us to know why something has changed. It could, in theory, also be the other way around, that the data stored in the "our" database is newer than the imported data. It could also be a combination, so the default behavior is to leave things alone if the email already exists.

    You can always use the API to sync data if you need to keep things in sync over time.

    Hope this make sense,

    Cheers!

    // Markus

  • lele 107 posts 444 karma points
    Jun 04, 2024 @ 06:31
    lele
    0

    Ok yes that's what I thought. maybe you could make a checkbox at import where data can be updated :).

    I forgot to map a field and can't update the contacts afterwards in a easy way.

  • Markus Johansson 1930 posts 5857 karma points MVP 2x c-trib
    Jun 04, 2024 @ 09:36
    Markus Johansson
    100

    Hi!

    I understand the problem,

    If you just imported them you could remove them using a SQL script and then add them back again, or you could update the data to the database via some kind of script.

    At the moment there is no built-in way to perform the task that you're looking to solve - sorry.

    // Markus

Please Sign in or register to post replies

Write your reply to:

Draft