Ready to learn a few tricks and enhance your Salesforce Platform Strategy? When you finish reading this article, you will know how to use Salesforce Flow to Convert a Contact to Person Account.
Person accounts store information about individual people by combining certain account and contact fields into a single record. By default, Salesforce accounts are business accounts, which are used to store information about companies or other entities (B2B).
Person accounts extend the standard business-to-business account functionality by allowing you to store information about individual consumers (B2C).
After enabling person accounts , You can use both business accounts and person accounts in the same org.
Before we learn how to do this, it is important to have certain considerations.
Do your research before enabling person accounts in your org to make sure this is the best approach for you to deal with your company’s B2C requirements
Since a person account is a combination of a contact (2 kb) and an account (2 kb) records in one record, each single person account takes 4kb of storage so keep that in mind
Check your Account and Contact Apex code and customize it to make sure that nothing clashes with the new implementation.
The organization-wide default sharing is set so that either Contact is (Controlled by Parent) or both Account and Contact are Private.
It is recommended that you test out the functionality of person account on a Sandbox first before enabling it in your production environment.
Some applications on AppExchange does not support person account functionalities, check with the app provider before implementing an app.
For more considerations, please refer to the official salesforce documentation at:
https://help.salesforce.com/articleView?id=sf.account_person_behavior.htm&type=5
Now that we have talked about these important considerations, we are ready to learn how to convert accounts.
A travel agency has travelers listed as records in a custom object, each traveler record is associated with a contact by a lookup field.
The company has asked their salesforce admin to implement an automation process to convert the attached contact to each traveler that has no accounts associated with them to a person account to match the company’s work process.
● Each account must have one contact. It cannot have more than one.
● The account and contact must have the same record owner.
● The account and contact must have the same currency values.
● The Parent Account field on the Account must be blank.
● The Reports To field on the Contact must be blank.
● The Account is not set as a Parent Account for any other accounts.
● The Contact is not set as a Reports To for any other contacts.
In Summary, the flow should:
● Grab the newly associated contact and check if it is not associated with an account
● Create a new account that is in accordance with the considerations of conversion, and associate the newly created account with that contact
● Convert the account to a person account (The conversion from a business account has to be in a separate transaction: no other fields should be updated other the record type id of the account in each record update)
Set the object and criteria of triggering the flow (on Traveler create, on Traveler create/update), and before/after save.
Get the contact related to the traveler.
Check if the contact has any accounts related to it.
If contact has no related account, get the id of the account record type that is not a person account record type (Supplier in our case) and store its value in the variable “SupplierAccountRecordTypeID”
Similarly, get the id of the person account record type and store it in the variable “PersonAccountRecordTypeID”
Now let us create an account to associate with the contact: we make sure that the newly created account meets converting considerations depending on our org, has a record type different than a person account, and then we store its ID in our “NewAccountID” variable.
Do not worry about the name of the account, as the person account will have the name value of the contact.
To associate the contact and the account together, we update the Account field on the contact record, and we also make sure that the “Report to” field is cleared to meet requirements:
Finally, we update the newly Created account that is associated with our contact to a person account:
We should now be set! our flow should look something like this:
Person accounts can be a great solution for small and mid-sized companies that are mainly business to consumer oriented, and while it was avoided by most companies in the past for its many considerations, it has recently become a go-to for most B2C Companies.
We hope that this flow helps you implement person accounts more gracefully in your company, Happy Automation!
In Nubessom we have more than 10 years helping companies around the world achieve their Salesforce, CRM and business automation needs.
We are experts in boosting business performance with Cloud Applications. We are Salesforce Consulting Partner you were looking for, please reach us by clicking here or check our website www.nubessom.com for more details.
Alex is one of the key members at Nubessom, he has passion to learn new features and mentoring his peer colleagues, and enjoys helping clients to automate everything CRM related!
© 2024 Nubessom Consulting All Rights Reserved