Cloudkibo / KiboPush

0 stars 1 forks source link

Work to modify wordpress plugin to send multiple email #8888

Closed sojharo closed 4 years ago

sojharo commented 4 years ago

We need to send an email to customer when he fills the landing page form again and not only on first time submissions.

We will work on plugin here and modify it to call mailchimp api.

sojharo commented 4 years ago

I have filled the support form of MailChimp regarding our problem and this is what I have sent them: I am also trying to do live support chat with them. I am in the queue and agents are busy talking with other customers. As soon as I get to chat with agent, I will update here.

Hello,

I have created a landing page on WordPress. I am using chimpmatic plugin to do integration with mailchimp. On Mailchimp, I have setup email automation on one of my audience list. Email automation is based on tags.

So when someone fills the form on landing page, the email address and other information is sent from WordPress to MailChimp. The contact is added to my audience list with tags applied to it. As per email automation setup, the email goes from MailChimp to that contact.

However, when the same contact fills the form again, the mailchimp is not sending the email to him/her again. We want to do this: everytime someone fills the form on landing page, the mailchimp should send email to that contact. Even if he is returning customer and is filling the form for second time.

We have tried other email automations as well but it is still not working. How do we make sure that email always go even if the customer is already in the audience list.

sojharo commented 4 years ago

I just have had a live chat with support agent as well. He must have sent the copy of conversation to your email address as well. I have not received it yet, but maybe your email is on account so you may receive it. However, I was able to capture screenshots of some of conversation.

Screenshot 2020-06-10 at 7 01 56 PM Screenshot 2020-06-10 at 7 02 01 PM Screenshot 2020-06-10 at 7 02 06 PM Screenshot 2020-06-10 at 7 02 11 PM Screenshot 2020-06-10 at 7 02 21 PM

As soon as I receive the copy of complete conversation on email, I will forward it to you.

I will continue the work on API study and also work on plugin modification from tomorrow.

Edit: Here is the complete chat: https://mailchimp.zendesk.com/requests/7359756/satisfaction/new/S3SRiLklzWfWShC2LLRs83QX8?locale=1&intention=16

sojharo commented 4 years ago

I could not work on this today as most of my time was spent on following tasks:

sojharo commented 4 years ago

I worked further on this on Friday. I studied the chimpmatic pluign code and tried to understand where they are calling mailchimp api. I was not able to understand how it knows when the form is filled by customer. I need to study more on this.

Also, I studied mailchimp API for sending email based on api trigger. I will continue to study the plugin and modify it today to also send email when form is filled.

sojharo commented 4 years ago

I worked on this yesterday and put the api call for triggering email. I am having some trouble in putting my version of plugin inside the wordpress site. When I try to trigger by filling a form, it is not reaching my part of the code. I will work more on this today and try to solve this issue.

sojharo commented 4 years ago

I worked on this issue and spent a lot of time on it. I was able to send the email using MailChimp API call to email address which was given in landing page form. It sent the email successfully. However, when I tried to send the email again to that same email address using that API, the API gave me error and said, "You've already sent this email to the subscriber".

Here is the screenshot of response of API when I tried sending email second time.

Screenshot 2020-06-16 at 11 16 10 PM

I think mailchimp doesn't allow to send the same email to the subscriber again even from their API. I think we should close this issue.

sojharo commented 4 years ago

The next step on this, as discussed in meeting, is to contact support team of mailchimp and tell them that API is not letting us send the email to same customer if he fills the landing page form again. I went to their support chat, but there is no agent present today. I think it is due to any holiday in USA. I will try again on Monday.

Screenshot 2020-06-19 at 3 16 06 PM
jekram commented 4 years ago

Did we send the email as recommended?

sojharo commented 4 years ago

I was not able to work on this issue today as most of my time was gone to these issues:

I had previously sent them email and this was their response:

Screenshot 2020-06-24 at 11 49 52 PM

Live chat is faster as compared to email.

sojharo commented 4 years ago

I have worked further on this today. I have done the following things on this issue:

  1. I tried contacting their support but due to Sunday, they were not available on live chat so I sent them my message on email and told them that we have been trying to send email to subscriber when he fills the landing page for second time and this is not working. I also mentioned that in previous support chat, an agent told me that we can do this with api but api is also not sending email second time and only sends first time.

  2. After this, I have looked further into Mailchimp API to understand more on this issue. As our current automation is set on trigger "when tag is assigned to new subscriber, send an email to them", so I also tried to remove that tag using api call so that next time the same person will fill the landing page form, this tag will be assigned again to him and this should trigger the email again. Still the mailchimp didn't trigger the email again for the subscriber who has already received email first time. I tried doing this through api and manually as well.

  3. I also tried creating the landing page on mailchimp UI and saw if same person fills the landing page form again, does it send the email in this case again or not. It didn't send email again even if the landing page was creating on mailchimp platform and not wordpress. I think I had misunderstanding before and had thought that it will send email again if landing page is created on mailchimp.

I think mailchimp does some internal mapping between subscribers and emails sent to them. So if an email is sent to a subscriber once, then it is not sent again to that subscriber. Their support agent also told this on chat so that we don't accidentally send duplicate emails to customers and they may not unsubscribe from our list.

Workaround:

One workaround to that problem is that we should keep mailchimp automation open for new subscribers and when we have old subscribers coming back to our landing page, then the email should go from wordpress just like baqar did for contact us. The new subscribers will receive the email from mailchimp so that we will be able to keep track of how many new leads we have collected. For returning subscribers, we will send them email from wordpress so that our landing page form is responsive. I have already done this setup. Please let me know if this should work.

We will also wait for mailchimp support and see what answer they give us.

sojharo commented 4 years ago

I have worked on this yesterday and also got solution from the support agent.

Digging right in, you are unable to have a Contact go through the same Workflow more than once, even with the API (our apologies for the information the previous agent shared with you). However, you are able to add on additional emails to the end of your Automation Workflow and filter the emails so that only those that have already received the first email in the Automation Workflow can continue on in the Automation. So for example, you would create the Automation with the email for those that are added to a specific Tag.

They have shown me a workaround by adding multiple emails as series and they should trigger when tag is added. I have worked on this and adding the tag next time when a customer fills the form is remaining here that will be done on plugin code level. I will complete this today.

sojharo commented 4 years ago

I have completed the work on this now. It now sends email to the subscriber if he/she comes to landing page again.

https://kibopush.com/news-messenger-bot/

Second or third email may take around 5 to 10 minutes to reach if they are in waiting queue by mailchimp. Mailchimp will show in UI which emails are in queue.

@bjafri please test this.

bjafri5 commented 4 years ago

Tested. Working fine