We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I tried to bulk update mailchimp tags using batch method. I used put method to do the same. But it is not working.
Attaching my code snippet. Please help me out,
$Batch = $MailChimp->new_batch();
$list_id = "listID"; $tagsSelected = ['tagFromAPI 99','tagFromAPI 00']; $Batch->put("op1", "lists/$list_id/members", [ 'email_address' => 'abcde@example.com', 'status_if_new' => 'subscribed', 'tags' => $tagsSelected, 'merge_fields' => [ 'FNAME' => 'Jish3' ?: '', 'LNAME' => 'win' ?: '', ] ]); $Batch->put("op2", "lists/$list_id/members", [ 'email_address' => 'efge@example.com', 'status_if_new' => 'subscribed', 'tags' => $tagsSelected, 'merge_fields' => [ 'FNAME' => 'Lax2' ?: '', 'LNAME' => 'Sav' ?: '', ] ]); $Batch->put("op3", "lists/$list_id/members", [ 'email_address' => 'hije@example.com', 'status_if_new' => 'subscribed', 'tags' => $tagsSelected, 'merge_fields' => [ 'FNAME' => 'Lenity1' ?: '', 'LNAME' => 'Lancer' ?: '', ] ]); $result = $Batch->execute(); $MailChimp->new_batch($batch_id); $result = $Batch->check_status(); echo '<pre>';print_r($result);
The text was updated successfully, but these errors were encountered:
According to the doc, here, the tags field should look like this:
tags
{"tags": [{"name": "Influencer", "status": "active"}]}
So your $tagsSelected array should be something like this:
$tagsSelected
$tagsSelected = [ ['name' => 'tagFromAPI 99', 'status' => 'active'], ['name' => 'tagFromAPI 00', 'status' => 'active'] ]
(not tested)
This said, on update, don't forget to untag with inactive also.
untag
inactive
Sorry, something went wrong.
No branches or pull requests
Hi,
I tried to bulk update mailchimp tags using batch method. I used put method to do the same. But it is not working.
Attaching my code snippet. Please help me out,
$Batch = $MailChimp->new_batch();
The text was updated successfully, but these errors were encountered: