Closed ahasAmp closed 5 years ago
What api method are you using to unsubscribe the contact?
I am using: Magento\Newsletter\Model\Subscriber::unsubscribeCustomerById()
Then the Importer Sync cron
I used: $this->contactResource->delete($contactModel); and it worked.
I am using dotmailer-magento2-extension to subscribe contacts to an address book with their marketing preferences using bulk update like this:
Email,emailType,Preference:Motorsport,Preference:Performance,Preference:Motorcycle,Preference:Tools_and_Workshop, ahasamp@gmail.com,Html,1,1,1,1,"United Kingdom"
Now when I try to unsubscribe the contact, the unsubscribe functionality removes the contact from the address book but he still exist in marketing preferences lists.
Could you advice what is the best way to unsubscribe a contact from address book and marketing preferences using dotmailer-magento2-extension?