Hi,
Is there an existing method that creates a Customer (in the ERpNext Selling Module) from a User (in the Core module)? What is the purpose of a User having a “Customer” role if a Customer document is not created?
Regards
Hi,
Is there an existing method that creates a Customer (in the ERpNext Selling Module) from a User (in the Core module)? What is the purpose of a User having a “Customer” role if a Customer document is not created?
Regards
Portal Settings allows you to assign a default role to a user on signup:
What’s the user to customer flow you’re looking at? Elaborating further can help other members to come up with a solution.
I understand this to give a User the “Customer” role upon signup, however this does not automatically create a corresponding record in the “Customer” doctype which is defined in the Selling module.
The user to customer flow is as follows:
As you can see, step 3 is where my question stems from. Because I am developing my own Payment Gateway app, I can try cater for creating a Customer using the User details in the code, but I just want to know if there is an existing method (I have tried searching but could not find).
There are many cases like creating a new user for the existing customer. So admin should create and match records.
But creating a Company when a new user is created should be trivial with a Server Side Script.
Okay, so I see that a Contact is created when a User signs up. I can then use this information to create a Customer (if Customer does not yet exist) using Server side scripting.
If anyone comes across this, these are the steps I took:
User.name==Contact.user
Customer.email_id==Contact.user
Customer.customer_primary_contact== Contact.name
to make sure there is a link with the User through Contact.I think this process ensures there is no duplicate Customer records for a User.