Delete (all) contacts in mailchimp list

  • 14Views
  • Last Post 5 weeks ago
0
votes
Lennart Giaccotto posted this 23 May 2018

Hi there,

I finally got the connection between mailchimp and my mysql instance working. When i do an initial insert it works. But wen i try to do an update, delete or upsert on the list (it's a list of members to my newsletter) it fails. I get errors like

"An exception has occured during update operation, the message returned from the provider is: Key fields is required to update, and delete operations."

And

"The value 'email@adress.com' for the id field is invalid"

so i thought i would just create a task to empty the list first and do a new insert. Thing is i can't find a way to delete all the contacts in the list.

What i tried:

source -->mysql-->users-->newsletter equals 0

target -->ListMembers -->Delete--> and now comes the problem 

The target requires a mapping of the target id field. i have no idea which is the id field at mailchimp because they don't mention it. it also needs to be a DT_WSTR type. Our own id field is DT_I4 so i can't map that one. I tried our email field which is unique and DT_WSTR but when i do that i get the message "The value 'email@adres.com' for the id field is invalid".

The other thing i tried:

source -->mysql-->users-->newsletter equals 1

target -->ListMembers -->Upsert--> 

Source - Target

email  - Id

email   - Email

Constant - ListId

this gives met the error "An exception has occured during update operation, the message returned from the provider is: Key fields is required to update, and delete operations."

Can anyone help me out here?

 

Greetings,

Lennart

 

 

0
votes
Mariia Zaharova posted this 5 weeks ago

UPSERT, UPDATE and DELETE operations require the ID field to be specified. In case of MailChimp ListMembers table it is the Id of list member, not its email or ListId value.

If you do not have ID values, you can perform these operations even without knowing the ID values. For this, you can use Lookup Mapping for ID/PK columns and get the IDs or PK values from the target object itself by some other field that uniquely identifies a record. 

NOTE: When using lookup mapping for ID or PK columns in UPSERT, don't forget to select the "Set null when no match found" check box in Lookup Options. Otherwise, lookup will produce errors if no such record found, and there would be failed records instead of inserted new ones. Do not select this option for UPDATE and DELETE operations.

 

We recommend you to take a look at this topic: 

https://support.skyvia.com/thread/import-and-update-list-memebers-to-mailchimp/?order=all#comment-fca33662-92db-4e89-b42d-a78a004e058c

 

Also, refer to: https://skyvia.com/resources/docs/index.html?performing_update_and_delete.htm

https://skyvia.com/resources/docs/index.html?performing_upsert_operation.htm

 

If you encounter any issues with this or have any further questions, feel free to contact us. We will be glad to answer all your further questions.

 

Best regards,

Mariia

Close