How does Web-to-Case integrate external website contact forms directly into Salesforce support queues?
Answer
Basics: Support teams often need a public "Contact us" form that creates a Case without email. Web-to-Case does this with a form you paste onto any web page, no login required.
How it works:
- Setup > Web-to-Case: enable it, choose a default Case Origin (for example Web), a default Response Template for auto-response, and optionally a default Case Owner.
- Click the Web-to-Case HTML Generator, choose fields, and copy the generated form with your org ID.
- Paste into your website; the form posts to the Salesforce servlet endpoint.
- On submit, Salesforce creates the Case, runs active case assignment rules if "Assign using active assignment rules" is set, and matches an existing Contact by the Web Email address.
- An auto-response rule can email the customer, and the Case follows queue and escalation rules.
Advanced / deep dive: The form is public, so it is a spam target. Add reCAPTCHA (a documented option in the generator) and validate fields in your page. Daily volume is limited (documented as 5,000 cases per 24 hours; confirm the overflow behavior in current limits). Cases are created in system context, so permissions of the submitter do not apply. For richer, authenticated, and mobile-friendly service, consider Email-to-Case, Experience Cloud sites with case creation, Embedded Service/Messaging for Web, or Agentforce Service channels. Custom fields appear in the form using their field IDs, so add them in the generator and add hidden fields to set values such as record type and priority.
Code / config example:
<form action="https://webto.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8" =>