{"id":3205,"date":"2020-06-10T05:49:55","date_gmt":"2020-06-10T11:19:55","guid":{"rendered":"https:\/\/www.emizentech.com\/blog\/?p=3205"},"modified":"2022-01-21T11:42:32","modified_gmt":"2022-01-21T11:42:32","slug":"create-web-to-lead-web-to-case-forms-in-salesforce","status":"publish","type":"post","link":"https:\/\/multisitelocal.ezxdemo.com\/blog\/create-web-to-lead-web-to-case-forms-in-salesforce.html","title":{"rendered":"How To Create Web To Lead \/ Web To Case Forms &#8211; Salesforce"},"content":{"rendered":"<h2><span class=\"ez-toc-section\" id=\"Web-to-lead\"><\/span>Web-to-lead<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A web-to-lead form is an essential component of marketing and sales automation. The aim is to capture data presented by website visitors, such as contact information and product interest, and store it as a &#8220;lead&#8221; record in a CRM product, in this case Salesforce.<\/p>\n<p>The use cases are many, but the concept is similar. A visitor to your website is presenting contact information on your website and this submission creates a record as a lead in Salesforce. It is a way to get feedback on your product and services or to grow your marketing database.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Steps_to_Create_Web-to-lead\"><\/span>Steps to Create Web-to-lead<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Go to Setup -&gt; Search for Lead -&gt; Click web-to-Lead -&gt; then click Create Web-to-Lead form<img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-3215 size-full\" src=\"\/blog\/wp-content\/uploads\/sites\/2\/2020\/06\/Steps-to-Create-Web-to-lead-0.png\" alt=\"Steps to Create Web-to-lead\" width=\"1111\" height=\"535\" \/><\/p>\n<p>Select fields and Enter Return URL. If you want Captcha Enable <strong>\u201cInclude reCAPTCHA Key Pair\u201d<\/strong> otherwise deselect it.<img decoding=\"async\" class=\"aligncenter wp-image-3210 size-full\" src=\"\/blog\/wp-content\/uploads\/sites\/2\/2020\/06\/Include-reCAPTCHA-Key-Pair-1.png\" alt=\"Include reCAPTCHA Key Pair\" width=\"1104\" height=\"519\" \/><\/p>\n<h4>For reCAPTCHA you need to go to this link<\/h4>\n<p><a href=\"https:\/\/developers.google.com\/recaptcha\/docs\/settings\" target=\"_blank\" rel=\"noopener\">https:\/\/developers.google.com\/recaptcha\/docs\/settings<\/a><br \/>\nBy logging into your Gmail account you can create key value pairs for reCAPTCHA<\/p>\n<p>Here, I am not including recaptcha.<img decoding=\"async\" class=\"aligncenter wp-image-3209 size-full\" src=\"\/blog\/wp-content\/uploads\/sites\/2\/2020\/06\/For-reCAPTCHA-2.png\" alt=\"For reCAPTCHA\" width=\"1105\" height=\"392\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3218 size-full\" src=\"\/blog\/wp-content\/uploads\/sites\/2\/2020\/06\/web-to-lead-3.png\" alt=\"web to lead\" width=\"1107\" height=\"401\" \/><\/p>\n<p>This is the complete code:<\/p>\n<p>Create this form in Your PC and save it in <strong>.html<\/strong> format.<\/p>\n<pre>&lt;!--  ----------------------------------------------------------------------  --&gt;\r\n&lt;!--  NOTE: Please add the following &lt;META&gt; element to your page &lt;HEAD&gt;.      --&gt;\r\n&lt;!--  If necessary, please modify the charset parameter to specify the        --&gt;\r\n&lt;!--  character set of your HTML page.                                        --&gt;\r\n&lt;!--  ----------------------------------------------------------------------  --&gt;\r\n\r\n&lt;META HTTP-EQUIV=\"Content-type\" CONTENT=\"text\/html; charset=UTF-8\"&gt;\r\n\r\n&lt;!--  ----------------------------------------------------------------------  --&gt;\r\n&lt;!--  NOTE: Please add the following &lt;FORM&gt; element to your page.             --&gt;\r\n&lt;!--  ----------------------------------------------------------------------  --&gt;\r\n\r\n\r\n\r\n&lt;form action=\"https:\/\/webto.salesforce.com\/servlet\/servlet.WebToLead?encoding=UTF-8\" method=\"POST\"&gt;\r\n\r\n\/\/Here Oid is Organization Id or org id,  To Navigate Go to Setup &gt; Administration Setup &gt; Company Profile &gt; Company Information \u2013 you\u2019ll see your OID listed as a field on that page as well. \r\n&lt;input type=hidden name=\"oid\" value=\"00D7F000003ggss\"&gt;\r\n&lt;input type=hidden name=\"retURL\" value=\"http:\/\/www.google.com\"&gt;\r\n\/\/If the debug value is set to \u201c1\u201d you will see a confirmation after you submit your lead like the one below. You will want to remove this once you go live \u2013 it\u2019s just for testing. \r\n\r\n&lt;!--  ----------------------------------------------------------------------  --&gt;\r\n&lt;!--  NOTE: These fields are optional debugging elements. Please uncomment    --&gt;\r\n&lt;!--  these lines if you wish to test in debug mode.                          --&gt;\r\n&lt;!--  &lt;input type=\"hidden\" name=\"debug\" value=1&gt;                              --&gt;\r\n&lt;!--  &lt;input type=\"hidden\" name=\"debugEmail\"                                  --&gt;\r\n&lt;!--  value=\"sapnagulabchandani23@gmail.com\"&gt;                                 --&gt;\r\n&lt;!--  ----------------------------------------------------------------------  --&gt;\r\n&lt;label for=\"first_name\"&gt;First Name&lt;\/label&gt;&lt;input  id=\"first_name\" maxlength=\"40\" name=\"first_name\" size=\"20\" type=\"text\" \/&gt;&lt;br&gt;\r\n&lt;label for=\"last_name\"&gt;Last Name&lt;\/label&gt;&lt;input  id=\"last_name\" maxlength=\"80\" name=\"last_name\" size=\"20\" type=\"text\" \/&gt;&lt;br&gt;\r\n&lt;label for=\"email\"&gt;Email&lt;\/label&gt;&lt;input  id=\"email\" maxlength=\"80\" name=\"email\" size=\"20\" type=\"text\" \/&gt;&lt;br&gt;\r\n&lt;label for=\"company\"&gt;Company&lt;\/label&gt;&lt;input  id=\"company\" maxlength=\"40\" name=\"company\" size=\"20\" type=\"text\" \/&gt;&lt;br&gt;\r\n&lt;label for=\"city\"&gt;City&lt;\/label&gt;&lt;input  id=\"city\" maxlength=\"40\" name=\"city\" size=\"20\" type=\"text\" \/&gt;&lt;br&gt;\r\n&lt;label for=\"state\"&gt;State\/Province&lt;\/label&gt;&lt;input  id=\"state\" maxlength=\"20\" name=\"state\" size=\"20\" type=\"text\" \/&gt;&lt;br&gt;\r\n&lt;input type=\"submit\" name=\"submit\"&gt;\r\n&lt;\/form&gt;\r\n\r\n<\/pre>\n<h4><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3211 size-full\" src=\"\/blog\/wp-content\/uploads\/sites\/2\/2020\/06\/Lead-in-Salesforce-after-submission-of-Lead-4.png\" alt=\"Lead in Salesforce after submission of Lead\" width=\"586\" height=\"233\" \/>Here you can find the Lead in Salesforce after submission of Lead.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3213 size-full\" src=\"\/blog\/wp-content\/uploads\/sites\/2\/2020\/06\/Salesforce-web-lead-5.png\" alt=\"Salesforce web lead\" width=\"1047\" height=\"434\" \/><br \/>\nAlso Read: <a href=\"https:\/\/multisitelocal.ezxdemo.com\/blog\/component-communication-in-lwc.html\">How To Do Component Communication In LWC In Salesforce<\/a><\/h4>\n<h4>If Added reCaptcha<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3216 size-full\" src=\"\/blog\/wp-content\/uploads\/sites\/2\/2020\/06\/web-lead-setup-6.jpg\" alt=\"web lead setup\" width=\"674\" height=\"528\" \/><\/p>\n<h4>You will find this form<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3214 size-full\" src=\"\/blog\/wp-content\/uploads\/sites\/2\/2020\/06\/Salesform-form-7.jpg\" alt=\"Salesform form\" width=\"300\" height=\"291\" \/><\/p>\n<div class=\"center-imgs\"><a href=\"https:\/\/multisitelocal.ezxdemo.com\/contact-us.html?utm_source=blog&amp;utm_medium=banner&amp;utm_campaign=emizen_blog\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2389 size-full\" src=\"\/blog\/wp-content\/uploads\/sites\/2\/2020\/05\/hire-salesforce-developers-1.png\" alt=\"hire salesforce developers\" width=\"1000\" height=\"200\" \/><\/a><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Web-to-case\"><\/span>Web-to-case<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Web to Case is a tool through which you can post a simple, random web page that allows your customers. To submit a case directly to your Salesforce.com instance. This means that you can present a public case<br \/>\nPage on your website with your own branding and style.<br \/>\nWhen your customer posts a case via Web to Case, a few fields are generally required, most importantly the name and the email address.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Prerequisites_for_Web-to-case_are\"><\/span>Prerequisites for Web-to-case are<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li>1. Create a custom case field if necessary.<\/li>\n<li>2. To create a default email template for automatic notification that will be sent to your customers upon submission matter.<\/li>\n<li>3. Cases Create case queues if you want to assign incoming cases to queues as well as individual users.<\/li>\n<li>4. The Customize support settings to select the default owner of cases that do not meet the criteria in your assignment Rule.<\/li>\n<li>5. Generated Create an active case assignment rule to ensure how web-generated cases are assigned to or inserted into users<\/li>\n<li>6. Queues. If you do not set an active assignment rule, all web-generated cases are assigned to the default owner<\/li>\n<li>7. You specify in the support settings.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"For_Web-to-case_Settings\"><\/span>For Web-to-case Settings<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Go to Setup -&gt; Quick Find Box -&gt; web-to-case<\/p>\n<p>Here you can require the Captcha, you can Select Case Origin from Phone, Email or Web.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3206 size-full\" src=\"\/blog\/wp-content\/uploads\/sites\/2\/2020\/06\/basic-settings-8.png\" alt=\"basic settings\" width=\"376\" height=\"204\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3217 size-full\" src=\"\/blog\/wp-content\/uploads\/sites\/2\/2020\/06\/web-to-case-settings-9.png\" alt=\"web to case settings\" width=\"1102\" height=\"500\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"To_create_Web-to-case_html_form\"><\/span>To create Web-to-case html form<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3207 size-full\" src=\"\/blog\/wp-content\/uploads\/sites\/2\/2020\/06\/capture-cases-10.png\" alt=\"capture cases\" width=\"1103\" height=\"471\" \/>Go to Setup -&gt; Self-Service or Search for Web-to-Case-HTML-Generator -&gt; Then to create form Select Fields for Case -&gt; Return Url -&gt; reCAPTCHA Key Pair if needed.<\/p>\n<p>Then Click on Generate. It will Generate this form:<\/p>\n<pre>&lt;!--  ----------------------------------------------------------------------  --&gt;\r\n&lt;!--  NOTE: Please add the following &lt;META&gt; element to your page &lt;HEAD&gt;.      --&gt;\r\n&lt;!--  If necessary, please modify the charset parameter to specify the        --&gt;\r\n&lt;!--  character set of your HTML page.                                        --&gt;\r\n&lt;!--  ----------------------------------------------------------------------  --&gt;\r\n&lt;META HTTP-EQUIV=\"Content-type\" CONTENT=\"text\/html; charset=UTF-8\"&gt;\r\n&lt;!--  ----------------------------------------------------------------------  --&gt;\r\n&lt;!--  NOTE: Please add the following &lt;FORM&gt; element to your page.             --&gt;\r\n&lt;!--  ----------------------------------------------------------------------  --&gt;\r\n&lt;form action=\"https:\/\/webto.salesforce.com\/servlet\/servlet.WebToCase?encoding=UTF-8\" method=\"POST\"&gt;\r\n&lt;input type=hidden name=\"orgid\" value=\"00D7F000003ggss\"&gt;\r\n&lt;input type=hidden name=\"retURL\" value=\"http:\/\/www.google.com\"&gt;\r\n&lt;!--  ----------------------------------------------------------------------  --&gt;\r\n&lt;!--  NOTE: These fields are optional debugging elements. Please uncomment    --&gt;\r\n&lt;!--  these lines if you wish to test in debug mode.                          --&gt;\r\n&lt;!--  &lt;input type=\"hidden\" name=\"debug\" value=1&gt;                              --&gt;\r\n&lt;!--  &lt;input type=\"hidden\" name=\"debugEmail\"                                  --&gt;\r\n&lt;!--  value=\"sapnagulabchandani23@gmail.com\"&gt;                                 --&gt;\r\n&lt;!--  ----------------------------------------------------------------------  --&gt;\r\n&lt;label for=\"name\"&gt;Contact Name&lt;\/label&gt;&lt;input  id=\"name\" maxlength=\"80\" name=\"name\" size=\"20\" type=\"text\" \/&gt;&lt;br&gt;\r\n&lt;label for=\"email\"&gt;Email&lt;\/label&gt;&lt;input  id=\"email\" maxlength=\"80\" name=\"email\" size=\"20\" type=\"text\" \/&gt;&lt;br&gt;\r\n&lt;label for=\"phone\"&gt;Phone&lt;\/label&gt;&lt;input  id=\"phone\" maxlength=\"40\" name=\"phone\" size=\"20\" type=\"text\" \/&gt;&lt;br&gt;\r\n&lt;label for=\"subject\"&gt;Subject&lt;\/label&gt;&lt;input  id=\"subject\" maxlength=\"80\" name=\"subject\" size=\"20\" type=\"text\" \/&gt;&lt;br&gt;\r\n&lt;label for=\"description\"&gt;Description&lt;\/label&gt;&lt;textarea name=\"description\"&gt;&lt;\/textarea&gt;&lt;br&gt;\r\n&lt;input type=\"submit\" name=\"submit\"&gt;\r\n&lt;\/form&gt;\r\n<\/pre>\n<h4><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3212 size-full\" src=\"\/blog\/wp-content\/uploads\/sites\/2\/2020\/06\/salesforce-form-11.png\" alt=\"salesforce form\" width=\"575\" height=\"235\" \/>Here is the case, created from Web<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3208 size-full\" src=\"\/blog\/wp-content\/uploads\/sites\/2\/2020\/06\/case-created-from-Web-12.png\" alt=\"case, created from Web\" width=\"524\" height=\"176\" \/><\/h4>\n<p>If you ever require assistance for a complicated project based on salesforce then our team of professional and adroit <a href=\"https:\/\/multisitelocal.ezxdemo.com\/salesforce-consulting.html\">salesforce consultants<\/a> and developers will be perfect. We have been providing <a href=\"https:\/\/multisitelocal.ezxdemo.com\/salesforce.html\">salesforce development services<\/a> to clients all over the world for a long time and have been able to help them achieve their goals.<\/p>\n<h4>Also Read:<\/h4>\n<p> <a href=\"https:\/\/multisitelocal.ezxdemo.com\/blog\/create-custom-report-types-salesforce.html\">How To Create A Custom Report Type In Salesforce<\/a> and <a href=\"https:\/\/multisitelocal.ezxdemo.com\/blog\/database-stateful-in-batch-apex.html\">How To Use Database.Stateful In Batch Apex In Salesforce<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Web-to-lead A web-to-lead form is an essential component of marketing and sales automation. The aim is to capture data presented by website visitors, such as contact information and product interest, and store it as a &#8220;lead&#8221; record in a CRM product, in this case Salesforce. The use cases are many, but the concept is similar.<\/p>\n","protected":false},"author":39,"featured_media":3233,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"MSN_Categories":"Uncategorized","MSN_Publish_Option":false,"MSN_Is_Local_News":false,"MSN_Is_AIAC_Included":"Empty","MSN_Location":"[]","MSN_Add_Feature_Img_On_Top_Of_Post":false,"MSN_Has_Custom_Author":false,"MSN_Custom_Author":"","MSN_Has_Custom_Canonical_Url":false,"MSN_Custom_Canonical_Url":"","_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[87],"tags":[],"class_list":{"0":"post-3205","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-salesforce-development"},"modified_by":"emizentech","featured_image_src":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-content\/uploads\/sites\/2\/2020\/06\/How-To-Create-Web-To-Lead-_-Web-To-Case-Forms-in-Salesforce-1.jpg","featured_image_src_square":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-content\/uploads\/sites\/2\/2020\/06\/How-To-Create-Web-To-Lead-_-Web-To-Case-Forms-in-Salesforce-1.jpg","author_info":{"display_name":"Virendra Sharma","author_link":"https:\/\/multisitelocal.ezxdemo.com\/blog\/author\/salesforce"},"_links":{"self":[{"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/posts\/3205","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/comments?post=3205"}],"version-history":[{"count":0,"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/posts\/3205\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/media\/3233"}],"wp:attachment":[{"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/media?parent=3205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/categories?post=3205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multisitelocal.ezxdemo.com\/blog\/wp-json\/wp\/v2\/tags?post=3205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}