I have a question about API and autoresponders.
I'm using 2 different campaigns (campaign A doesn't have an autoresponder while B does). I'm also using the move_contact() API to move the same contact from campaign A to campaign B via my website. I mean, the contact when he subscribes is on campaign A then, after some days, I use the move_contact() API to move the contact from campaign A to B.
The first time it works fine. In fact when the contact is moved to campaign B for the first time the autoresponder starts, but If I move the same contact back to campaign A and then I move the same contact back to campaign B the autoresponder doesn't start.
I mean that the autoresponder starts only the first time that the contact is moved to campaign B. If I move the contact to campaign C and then I move back the same contact to campaign B the autoresponder doesn't start as it should.
I need to switch the same contact from a campaign to another various times, and everytime the contact goes back to campaign B I need the same autoresponder to start again. I did several tests but it only works the first time I move the contact to a specific campaign.
Here's a piece of my php code:
// MOVE CONTACT
$result_api = $client->move_contact(
$api_key,
array (
"contact" => $contact_id,
"campaign" => $campaign_id
)
);
// SET CYCLE
$result_setapi = $client->set_contact_cycle(
$api_key,
array (
"contact" => $contact_id,
"cycle_day" => 0
)
);
$contact_id is the ID of the contact in getresponse and $campaign_id is the id of the campaign where I want to move the contact. Both are calculated previously in the code. set_contact_cycle() is the API to set the autoresponder to day 0.
This code moves the contact from campaign A to campaign B, it sets the autoresponder to day 0 correctly and the first email of the autoresponder is sent (I received it after 3-5 minutes). But if later I use the same code to move back the same from campaign B to campaign A and then I use again the same code to move back the contact from campaign A to campaign B that's what it happens:
the contact is moved correctly and now stays in campaign B (good), the autoresponder is set again to day 0 (good) but the email is not sent (bad). I mean, it works everything but the delivery of the email.
I did several tests with different email addresses, I waited hours to receive the emails but no results; I received the email of the autoresponder only the first time I moved a contact to campaign B (the one with the autoresponder). But, as I said, from the second time I move a contact to campaign B the email is not sent anymore, even If in getresponse dashboard I see that the contact is in the right campaign with the day of the autoresponder set correctly to 0.
Am I doing something worng? Is there a mistake in my php code? Do I need to add extra lines or functions to start and restart the autoresponder for the same contact everytime I want?
Thanks