magento-engcom / import-export-improvements

Open Software License 3.0
31 stars 29 forks source link

Welcome Email not sent after importing new customer with csv file #85

Open piotrekkaminski opened 6 years ago

piotrekkaminski commented 6 years ago

From @MattDelac on June 26, 2017 12:57

Preconditions

  1. Magento 2.1.6
  2. Php7 / Varnish / MySQL

Steps to reproduce

  1. Import new customers with a CSV file
  2. Use the standard "customer and addresses (single file)" import

Expected result

  1. A "welcome email" is send to the new customers

Actual result

  1. The "welcome email" has not been sent

Is there someone that knows how to bypass this ?

Copied from original issue: magento/magento2#10055

piotrekkaminski commented 6 years ago

From @jordanbrauer on June 30, 2017 17:23

Are you able to use the REST API? I do everything via backdoor with the API and Guzzle in a CLI application I made with the Symfony 3 Console Component which seems to work just fine.

piotrekkaminski commented 6 years ago

From @MattDelac on July 4, 2017 15:54

Hello @jordanbrauer ,

Thanks for your reply.

I will get a look at the REST API. Which on do you think I should use in order to send the welcome email ? However, API is a bit long and to synchronize 7000 clients per day, it will take too much time. The csv import is just fine. I use a module that let me import any csv with a cli (==> easy to script)

Thanks in advance

piotrekkaminski commented 6 years ago

From @magento-engcom-team on October 2, 2017 9:30

@MattDelac, thank you for your report. We've created internal ticket(s) MAGETWO-80547 to track progress on the issue.

piotrekkaminski commented 6 years ago

From @jigar48 on December 14, 2017 7:25

Hello M2,

Is this issue is fixed.

patvarosgabor commented 6 years ago

@MattDelac is this issue solved? Did you get a solution? I have the same issue.

Thnx

dmanners commented 5 years ago

After research with @sawebvisum during a contribution day we found that this is probably not as easy as just adding the send email call. The frontend, admin and webapi all end up in the class app/code/Magento/Customer/Model/AccountManagement.php with the method sendEmailConfirmation(CustomerInterface $customer, $redirectUrl) which takes the customer object filled with information.

For our opinion it would not be a good idea especially with large scale imports to load all the information for customers and loop through each to send the email. In this case I think I would good to either work on a method that can be called using the information we already have at import or a message queue system that we can push "Customer registration emails to send" which will then be processed via a cron at a later date.

I think it would be good to have a discussion from the architecture team as to the best approach here before we start working on this.