Create a Headless Registration Handler
Create an Apex class for your registration handler. You reference this Apex class when you configure Experience Cloud settings on the Login & Registration page.
| Required Editions |
|---|
| Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions |
-
From Setup, in the Quick Find box, enter
Apex, and then select Apex Classes. -
Click New.
-
Fill the class with your headless registration handler code. You can paste in the code from the example.
-
Save the class, and note its name.
Here’s an example headless registration handler. This registration handler creates a user and links it to the account and profile that you created earlier in this guide.
This sample code is for demonstration only. Always test code before deploying it to a production environment.