How can I utilize force.com sites for creating a public-facing portal?

118    Asked by Daminidas in Salesforce , Asked on Feb 27, 2024

I am currently developing a customer support system in the form of a portal for a particular company by using Salesforce. This particular portal needs to be accessible to customers without credentials from Salesforce. How can I leverage force.com sites to create a public-facing portal where customers can log in, submit support tickets, etc? 

Answered by Damini das

 In the context of Salesforce, you can create a public-facing portal by using force.com sites by using these following steps:-

Create Visualforce pages

First, try to develop Visualforce pages for designing the interface of users for the customer support portal. These pages would include forms for submitting support tickets and displaying ticket statuses.

Implement controllers

Now you can write an apex controller for handling the logic behind the Visualforce pages. These particular controllers would Interact with the data of Salesforce, such as creating support tickets and other things to do.

Configuration of force.com sites

Now try to set up a force.com site in your Salesforce org to make the customer support portal publicly accessible.

Customer authentication

Since the customers would not have the Salesforce credentials, you would need to execute a custom authentication mechanism such as using a self-registration Process.

Secure access

Try to ensure that the force.com site is properly secured to prevent unauthorised access and protect customer data. You can use the built-in security measures of Salesforce for this particular objective.

Here is a simplified example given of what the Visualforce page and apex controller might look like for submitting a support ticket:-

// SupportTicketController.cls

Public class SupportTicketController {
    Public Support_Ticket__c newTicket { get; set; }
    Public SupportTicketController() {
        newTicket = new Support_Ticket__c();
    }
    Public PageReference submitTicket() {
        Insert newTicket;
        Return null; // Redirect to confirmation page or stay on the same page
    }
}


Your Answer