A few more issues with the Mailchimp integration . Please could you test this more thoroughly - this is a paid feature and elements of it have never worked correctly.
When mcListGroupId or mailChimpListId is modified for a TargetList, it's MailChimpLogMarker record should be cleared, otherwise the change is never presented to Mailchimp for all the existing Targets.
If a Target is unlinked from a list and then linked again another row is not added to the TargetList which breaks the row id check logic. Not sure how you can fix this without having ORM delete the actual row of the db..?
If the Target is unlinked then the notice of this is not sent to Mailchimp at all?
Also I would suggest when updating a record to also check all TargetLists which the target is related to in order to send valid 'interests' merge field for all, including 'false' records for those targetlists which the Target is no longer linked to.
e.g. TargetList A syncs with GroupId A, but other lists exist with other group Ids set (B, C).
send interests merge field as
[ 'A' => true, 'B' => false, 'C' => false ]
it wouldn't significantly increase the payload size and would make sure things are kept in sync more accurately.
When mcListGroupId or mailChimpListId is modified for a TargetList, it's MailChimpLogMarker record should be cleared, otherwise the change is never presented to Mailchimp for all the existing Targets.
If a Target is unlinked from a list and then linked again another row is not added to the TargetList which breaks the row id check logic. Not sure how you can fix this without having ORM delete the actual row of the db..?
If the Target is unlinked then the notice of this is not sent to Mailchimp at all?
Also I would suggest when updating a record to also check all TargetLists which the target is related to in order to send valid 'interests' merge field for all, including 'false' records for those targetlists which the Target is no longer linked to.
e.g. TargetList A syncs with GroupId A, but other lists exist with other group Ids set (B, C).
send interests merge field as
[ 'A' => true, 'B' => false, 'C' => false ]
it wouldn't significantly increase the payload size and would make sure things are kept in sync more accurately.
Comment