[SalesForce] Generate new password and notify user immediately

While creating new users from Salesforce UI, we have a checkbox right at the bottom called Generate new password and notify user immediately. This is set to true by default and sends Welcome To Salesforce kind of an email to the newly created user. This email also contains a verification and password reset link.

I have hundreds of users to load in my production environment. Obviously, I would go for data loader to load all the users. However, there is no way to set this checkbox to true through the data loader. Basically, there is no field that could be accessed through the API. One workaround would be to load the data at once, then multi-select all the newly created users and hit Reset Password button on the users' list view. But this only sends a raw password reset email instead of a pretty Welcome to Salesforce email, and I want such an email to be sent across the users.

There is a very useful app on AppExchange called Clone This User, but that too involves a lot of manual work.

So, any idea/suggestions on how to load hundreds of users in bulk and also send them the Welcome to Salesforce email?

Best Answer

By default, you cannot trigger the same email as Salesforce triggers in the scenario you mentioned. I have had a similar situation, which was resolved with coordination between IT and Business as we were not able to trigger the standard email. The approach that was taken was:

  1. Load All Users using data loader
  2. Set their password (to a common password) with a utility written using setPassword() API
  3. Send out a custom welcome email with guidance on their User Credentials along with any custom message that you want to include

However you should also review that because everyone's password initially set can be same, share the credentials in an appropriate manner. Or you can have the utility written in such a way that it generates unique passwords and triggers email along with.