function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Swiderski, ErikSwiderski, Erik 

Use a flow to create a new user

I'd like to create a flow that our HR department can use for onboarding a new hire that creates a user account and configures settings such as assigning a managed package, setting a role, setting a profile, etc.

I haven't found a lot of information on this... is it even possible?
Cloud AtlasCloud Atlas
I am not sure I fully understand your questions.
Flow based on what criteria ??
SalesFORCE_enFORCErSalesFORCE_enFORCEr
I believe your HR department does not use Salesforce so you want to allow them to create a new SFDC user externally. Is that correct? If yes, you need to create a site page with flow embeded in to it.
Swiderski, ErikSwiderski, Erik
Sorry my question wasn't clear. As part of the new hire process I have to manually create a user account in salesforce for an employee. I'd like to create a visual flow that a member of our internal HR department can run that creates a user record with all of the required information. I haven't found a lot of documentation on this.
Cloud AtlasCloud Atlas
+1 SalesFORCE_enFORCEr
I second his idea, if you just wanna expose a page for User Creation to external users.
Create a Site and run the flow in the back end.
See these docs..
https://developer.salesforce.com/page/Sites
Charles NelsonCharles Nelson
You can certainly create users from a flow. The only problem is, there's no way to send them their initial welcome email with the temporary link to set their password. We got all the way to the end of our visual flow that creates the user, a contact and links the two only to find out we would still have to manually reset their password from Setup. 

I thought a workaround might be to include the forgotten password link with a prefill on the username but unfortunately, that doesn't work until it has been reset either. Our process requires that we create a user and a contact record and for that, it doesn't really work or save us much time. 

That said, it will work, you just have an extra step at the end which would be to pull up the new record and send a password reset. You would also have to grant them "Manage Users" permissions which could be a little risky as it grants a lot of permissions.
Kevin KneipKevin Kneip
Charles, thank you for the info, I had a hunch that the 'Generate new password and notify user immediately' would not trigger from a flow. You just save me a ton of developing time. Regards,
Rowan LeanRowan Lean
I would be very much interested if someone could run me through using flow to create a new user form (that allows me to pre-fill certain user fields such as email signature, company phone numbers etc)! Creating new users and setting them up is a complete nightmare with all the extra configuration that needs to be done, I would save a lot of time if i could enter in basic information such as name, email address and phone number and then select from pre-set options via picklists such as what office they are working out of, what is their department/role and then just assign all those basic default values accordingly!

 
Charles NelsonCharles Nelson

@rowan,

Explaining that process would be quite lengthy, its a fairly simple flow, however. The best approach is to understand what is required to insert new User accounts. Those details are provided by salesforce here https://help.salesforce.com/articleView?id=000327115&type=1&mode=1

Then simply add screens, fields and decisions to cover your specific data points needed. You will not, however, be able to do things like assign licenses and other platform permissions via this. Really only allows for user record field data.

Rowan LeanRowan Lean
Thanks @Charles - That's helpful also. I think the part i'm struggling with (as a newbie) is defining different variables for different selections that I would need to make using picklists. But I will trawl through trailhead again and hopefully can learn that there.

Appreciate the help
Tracy WindeckerTracy Windecker
I did find this link to create a flow to assign permission set assignments - I belive this flow would help in also assigning permission sets, Roles, and add managed packages - but still not able to find any flows that will automatcially send first password reset email, if someone finds that let me know but here is the video for the flow Automate Onboarding through Salesfoce Flows (http://Automate Onboarding through Salesforce Flows: Part One)
Aivaras Geraltauskas 1Aivaras Geraltauskas 1
Is there a way to reset the user's password in the flow? I have the same issue of the new user not receiving the welcome email.