Use Case: Let Experience Cloud Users Update Contact Records
An Experience Cloud site user will actually exist in your Salesforce as two records – one Contact and one User. Sometimes you might just want to let the users update their contact record directly (For example email opt-in, newsletter preference, etc), so it becomes easier for you to manage the marketing activities. This week we will introduce two different ways to achieve this. Let’s dive in!
* Big thanks to Yvonne for sending in the case!
Lulu Mobile uses Experience Cloud to create their customer community. They also use Contact object to send out marketing emails. On the contact record, there are several marketing-related fields (ex. Email Opt-In, Newsletter Option), and they hope the external users can modify these fields directly from the user profile page.
Contact Id Field On External User Record
Before discussing the two solutions, it is important to know the Contact Id field on the User record. To create an external user, we have to do it from the Contact record. Then the system will populate the Contact Id field on the User record. We can then use this field to distinguish internal and external users.
Solution 1 – Use A Screen Flow To Update Contact Record
We can use a Screen flow with the new Dynamic Form feature and put the Flow component on the User Profile page. This way, the users will be able to update their Contact record. The flow will then need to run in the system context, and we need to configure a sharing set as well.
Solution 2 – Use A Record-Triggered Flow Run On User Record
Alternatively, we can create matching fields for the User object, and put these fields directly on the User detail page. Then we create a Record-Triggered flow that runs when User records are updated. When the external users edit their personal information, the flow will then update the corresponding Contact record.
Solution 1 – Screen Flow | Solution 2 – Record-Triggered Flow | |
---|---|---|
Pros | You can put the flow anywhere on your site | You can combine these fields into the user detail page to provide a unified view |
Cons | Require extra sharing set | Need to duplicate the fields from the Contact to the User object |
Solution 1 – Screen Flow
Solution 2 – Record-Triggered Flow
Solution 1 – Screen Flow
Solution 2 – Record-Triggered Flow
Solution 1 – Screen Flow
Solution 2 – Record-Triggered Flow
Screen Flow / Record-Triggered Flow | Get Records |
Screen Element | Update Records |
Does the solution solve your problem? If not, write us what your problem is and we will build the flow for you!
Thank you for this awesome solve and tutorial!
I am running into an issue when I try to link the email field on the User record to the email field on the Contact record using Solution 2. Since community users have to verify changes to their email, the email address update doesn’t happen immediately on the User record. It then doesn’t get captured in the flow to update the Contact record. Is there a workaround for this?