How to Generate Web-to-Case HTML in Salesforce

In this Salesforce tutorial, we will learn how to generate web-to-case HTML in Salesforce. Also, we will understand the steps of generating web-to-case HTML in Salesforce Lightning and the steps of generating a web-to-case HTML in Salesforce Classic.

The web-to-case generates an HTML code that can immerse into the website, permitting customers to fill out the form and after filling out submit the form directly from our website.

While working with an organization that uses Salesforce, I got a task where I needed to generate a web-to-case HTML in Salesforce. To fulfill this requirement I use the web-to-case HTML generator object that is present under the Feature settings under the Service.

So after looking at the multiple solutions, I found a solution that helped me to generate a web-to-case HTML in Salesforce. If you want to learn how to generate a web-to-case HTML in Salesforce Lightning as well as Salesforce Classic, you have come to the right place.

The following are the topics that we will cover in this salesforce tutorial:

  • Generate Web-to-case HTML in Salesforce
  • How to generate web-to-case HTML in Salesforce Lightning
  • How to generate web-to-case HTML in Salesforce Classic

Generate Web-to-case HTML in Salesforce

In Salesforce generating a web-to-case HTML permit us to gather the information from customers who can submit the case along our website.

This generated web-to-case HTML form can be adjusted to involve the fields that we want to gather the information and this information can be inserted in our website by simply using the HTML code.

This form can be edited to gather the particular information that you need from the customers like the customer contact details, the nature of their inquiry or issue, or any other applicable information.

The web-to-case generates an HTML code that can immerse into the website, permitting customers to fill out the form and after filling out submit the form directly from our website. And this filling information inside the form is automatically captured as a new case in our salesforce account.

This information also permits us to expertly manage and trace customer inquiries and issues. We can easily generate a web-to-case HTML form in Salesforce and also gather valuable customer information through our website.

In this way, we have learned about generating a web-to-case HTML form in Salesforce. Now, let’s move further and see how to generate a web-to-case HTML form in Salesforce. We will explore both the salesforce experiences: Salesforce Lightning and Salesforce Classic.

How to generate web-to-case HTML in Salesforce Lightning

Here we are generating a web-to-case HTML in Salesforce Lightning. If you want to learn how to generate a web-to-case HTML in salesforce lightning follow these steps:

Step-1:  Login into your Salesforce lightning account, Go to the gear icon. Under the gear icon, there are two options present first one is Setup and another one is Service Setup. Here we are clicking on the Setup option.

How to generate web to case HTML in Salesforce
How to generate web-to-case HTML in Salesforce

Step-2: After clicking on the setup, the setup page is open. Enter a Web-to-Case HTML Generator in the Quick Find Box and the Web-to-Case HTML Generator object comes at the top. Click on the  Web-to-Case HTML Generator. And these case auto-response rules are present under Feature Settings.

How to generate web to case HTML in Salesforce lightning
How to generate web-to-case HTML in Salesforce lightning

Step-3: After clicking on the web-to-case HTML generator option, the web-to-case HTML generator settings page is open. Here we are capturing case information from our website.

First for capturing the cases select the cases from the available list and add the cases to the selected field here we have selected the contact name, email, phone, status, and description.

Generate web to case HTML in Salesforce
Generate web-to-case HTML in Salesforce

Step-4: After selecting the fields, now scroll to the bottom of the page. Here we can see that the visible in self-service portal checkbox is checked by default and then enter the URL that the user will be returned to. Here we are entering our website link. After filling in the link click on the generate button that is present at the bottom of the page.

After filling out the form and clicking on the submit button this button redirects us to our website Salesforcefaqs.com.

Generate the web to case html in salesforce
Enter the URL inside the field

Step-5: After clicking on the generate button, the HTML code is generated. Copy and Paste this sample HTML code from here and then click on the finish button that is present under the HTML code.

Generate web to case HTML in Salesforce lightning
The HTML code is generated

Step-6: After copying the HTML code from the capture cases and pasting this code to the notepad. Here we can see that the original name and link of the website that we are entering in the link field are seen as a value.

After that here we can also see the labels of the form. The first label names, the second one is email, the third one is a phone, the fourth one is status, and the fifth one is a description.

And in the end, we can see that a submit button is also created with the help of this HTML code and this submit button redirects us to the link of the website that we are entering in the URL field.

Now save this HTML code to this notepad by simply clicking on the save option that is present under the file. And we can save this HTML file as webtocase.html.

Salesforce generate web to case html
Salesforce generates web-to-case HTML

Step-7: This HTML file is saved on the desktop and we are giving the name of this file as webtocase.

Salesforce lightning generate web to case HTML
Salesforce Lightning generates web-to-case HTML

Step-8: After saving the HTML code to the desktop, right-click on that and then click on the open with option. The anther list is open now select the browser where you want to open the form. We are clicking on Google Chrome you can select any of the browsers.

How to generate a web to case HTML in Salesforce
Click on the Google Chrome

Step-9: After clicking on the google chrome browser, you can see that we are moving to the google chrome browser, and the form is generating with the labels and the submit button.

How to generate a web to case HTML in Salesforce lightning
The form is generated

Step-10: Now fill out the form, firstly fill in the contact name as Kaela Jakubowski after that fill in the email then fill in the phone number, and after that fill in the status. After clicking on the drop-down arrow of the status field, the drop-down list is open. Select the option from the list here we are selecting the working option.

After that enter the description inside the description field. Here we are writing this is web to case HTML form and then clicking on the submit button.

Generate a web to case HTML in Salesforce
Fill the complete information related to the HTML form

Step-11: After clicking on the submit button this submit button redirects us to our website that URL we are entering in the URL field. Here you can see that the Salesforcefaqs.com website is open.

Generate a web to case HTML in Salesforce lightning
Generate a web-to-case HTML in Salesforce lightning

In this way, we understand how to generate a web-to-case HTML in Salesforce Lightning. Let’s Proceed further and learn how to generate a web-to-case HTML in Salesforce Classic.

Read How to Setup Case Escalation Rule in Salesforce

How to generate web-to-case HTML in Salesforce Classic

Here we are generating a Web-to-Case HTML in Salesforce Classic. If you want to learn how to generate a Web-to-Case HTML in Salesforce Classic follow these steps:

1: First log in to the Salesforce account, when we log in to the account the Salesforce lightning edition is open. Moving to Salesforce Classic, click on the Profile picture. 

The Profile picture drop-down list is open. Under this profile picture list, there is an option to switch to Salesforce Classic. Click on it.

After clicking on the switch to Salesforce Classic option, click on the drop-down arrow of the username. The drop-down list is open, under this list Setup option is present below the My Profile option. Click on the Setup.

How to generate web to case HTML in Salesforce Classic
How to generate web-to-case HTML in Salesforce Classic

2: After clicking on the setup, the setup page is open. Enter a Web-to-Case HTML Generator in the Quick Find Box and the Web-to-Case HTML Generator object comes at the top. Click on the  Web-to-Case HTML Generator. And these case auto-response rules are present under Feature Settings.

Generate web to case HTML in Salesforce Classic
Click on the web to case the HTML generator

3: After clicking on the web-to-case HTML generator option, the web-to-case HTML generator settings page is open. Here we are capturing case information from our website.

First for capturing the cases select the cases from the available list and add the cases to the selected field here we have selected the contact name, email, phone, Priority, and company.

Salesforce classic generate web to case HTML
Salesforce Classic generates web-to-case HTML

4: After selecting the fields, now scroll to the bottom of the page. Here we can see that the visible in self-service portal checkbox is checked by default and then enter the URL that the user will be returned to. Here we are entering our website link.

After filling out the form and clicking on the submit button this button redirects us to our website google.com. After filling the link click on the generate button that is present at the bottom of the page.

How to generate a web to case HTML in Salesforce Classic
Click on the generate button

5: After clicking on the generate button, the HTML code is generated. Copy and Paste this sample HTML code from here and then click on the finish button that is present under the HTML code.

Generate a web to case HTML in Salesforce Classic
Click on the finish button

6: After copying the HTML code from the capture cases and pasting this code to the notepad. Here we can see that the original name and link of the website that we are entering in the link field are seen as a value.

After that here we can also see the labels of the form. The first label names, the second one is email, the third one is a phone, the fourth one is a priority, and the fifth one is a company.

And in the end, we can see that a submit button is also created with the help of this HTML code and this submit button redirects us to the link of the website that we are entering in the URL field.

Now save this HTML code to this notepad by simply clicking on the save option that is present under the file. And we can save this HTML file as webform.html.

Salesforce classic generate a web to case HTML
Salesforce Classic generates a web-to-case HTML

7: This HTML file is saved on the desktop and we are giving the name of this file as webform.html.

How to generate the web to case HTML in Salesforce Classic
The HTML file is saved on the desktop

8: After saving the HTML code to the desktop, right-click on that and then click on the open with option. The anther list is open now select the browser where you want to open the form. We are clicking on Google Chrome you can select any of the browsers.

Generate the web to case HTML in Salesforce Classic
Generate the web-to-case HTML in Salesforce Classic

9: After clicking on the google chrome browser, you can see that we are moving to the google chrome browser, and the form is generating with the labels and the submit button.

Salesforce classic generate the web to case HTML
the form is generated successfully

10: Now fill out the form, firstly fill in the contact name as Kadin Mueller Ph.D. after that fill in the email then fill in the phone number, and after that fill in the Priority. After clicking on the drop-down arrow of the status field, the drop-down list is open. Select the option from the list here we are selecting the working option.

Now enter the name of the company inside the company field. Here we are entering the name as Murray LLC and then clicking on the submit button.

How to generate an web to case HTML in Salesforce Classic
Fill in the information about the web to case HTML generator

11: After clicking on the submit button this submit button redirects us to our website that URL we are entering in the URL field. Here you can see that the Google.com website is open.

Generate an web to case HTML in Salesforce Classic
Google.com website is open

So, with this, we have learned how to generate web-to-case HTML in Salesforce Classic.

Conclusion:

Here we have learned about generating a Web-to-Case HTML in Salesforce. We have also discussed how to generate a Web-to-case HTML in Salesforce.

The generated web-to-case HTML form can be adjusted to involve the fields that we want to gather the information and this information can be inserted in our website by simply using the HTML code.

Moreover, we have learned that both Salesforce Lightning, as well as Salesforce Classic, gives a simple and easy way to determine how to generate a Web-to-Case HTML in Salesforce.

In addition to this, the following are the topics that we have discussed in this blog:

  • Generate Web-to-case HTML in Salesforce
  • How to generate web-to-case HTML in Salesforce Lightning
  • How to generate web-to-case HTML in Salesforce Classic

You may also like to read the following articles: