Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Web-to-Case entry
How-to guide

Setting up Web-to-Case for a public contact form

Setting up Web-to-Case takes about 30 minutes for a basic form: enable the feature, generate the HTML, configure routing rules, enable reCAPTCHA, embed the form on the public site, and test end-to-end.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated May 16, 2026

Setting up Web-to-Case takes about 30 minutes for a basic form: enable the feature, generate the HTML, configure routing rules, enable reCAPTCHA, embed the form on the public site, and test end-to-end.

  1. Enable Web-to-Case

    Setup, Web-to-Case Settings, check Enable Web-to-Case. Set the Default Case Origin (typically Web) and the Default Response Template.

  2. Generate the HTML form

    Setup, Web-to-Case, Generate HTML. Pick which Case fields to expose. Set the Return URL (where the visitor lands after submission). Click Generate, copy the HTML output.

  3. Embed the form on the public site

    Paste the HTML into the website page (WordPress, marketing site, custom HTML page). Style the form to match the brand. Test that the form submits to the right Salesforce endpoint.

  4. Configure Auto-Response Rules

    Setup, Auto-Response Rules, New. Create rules that match Case criteria and send templated acknowledgment emails. The first matching rule wins; order matters.

  5. Configure Assignment Rules

    Setup, Case Assignment Rules, New. Create rules that match Case criteria and assign the Case Owner to a user or queue. Set a Default Case Owner for unmatched cases.

  6. Enable reCAPTCHA

    Setup, Web-to-Case Settings, configure reCAPTCHA. Get the key from Google Cloud, paste into Salesforce. Re-generate the HTML with reCAPTCHA enabled.

  7. Test end-to-end

    Submit a test case through the public form. Confirm the Case appears in Salesforce with the right field values, the Owner is set correctly, and the submitter receives the auto-response email.

Default Case Originremember

Picklist value applied to every Web-to-Case submission. Typically Web. Used for reporting on the source of cases.

Default Response Templateremember

Email template sent to the submitter when no Auto-Response Rule matches. Acts as a fallback acknowledgment.

Return URLremember

The page the visitor lands on after form submission. Usually a thank-you page.

reCAPTCHA Integrationremember

Google reCAPTCHA key configuration that adds spam protection to the form.

Default Case Ownerremember

User or queue that receives any Case not matched by an Assignment Rule. Required to avoid orphaned cases.

Gotchas
  • Web-to-Case is capped at 5,000 submissions per day. The 5,001st submission is rejected. For higher volume, use a custom REST API integration or Experience Cloud.
  • Without reCAPTCHA, spam submissions can flood the org. Enable reCAPTCHA on every production Web-to-Case form, no exceptions.
  • The HTML form generator outputs bare-bones markup. Production forms need styling and client-side validation that the generator does not provide.
  • Auto-Response and Assignment Rules run on the first match only. Rule order is critical. Test order changes carefully; a new rule inserted at the wrong position changes routing for existing scenarios.
  • Hidden fields in the HTML can be manipulated by sophisticated submitters. Validate critical fields on the server side through Validation Rules or a Flow rather than relying on hidden field values.

See the full Web-to-Case entry

Web-to-Case includes the definition, worked example, deep dive, related terms, and a quiz.