# How does Web-to-Case facilitate inbound support lead capture directly from company websites?

**Topic:** Service Cloud · **Difficulty:** Medium · **Tags:** Service Cloud, Web-to-Case, Inbound Support

Read it on the site: https://www.forcechallenges.com/interview-questions/how-does-web-to-case-facilitate-inbound-support-lead-capture-directly-from-company-websites

## Answer

**Basics:** Add a form to your public site with fields such as name, email, subject and description. When submitted, Salesforce creates a case with Origin = Web, runs assignment and auto-response rules, and optionally links to a matching contact by email.

**How it works:**
1. Setup > Web-to-Case > Enable; set default case origin, default response template and default owner behavior.
2. Click Generate the HTML, pick fields, set the return URL.
3. Paste the HTML into your website.
4. Submission posts to the Salesforce servlet; the case is created, the assignment rule runs, and the auto-response is sent.
5. Salesforce can match Contact by email (Web Email to Contact).

**Advanced / deep dive:** Limits: a daily cap on Web-to-Case submissions (5,000 per 24 hours by default; excess is held pending or dropped, verify current handling and raising the limit through Support). The form does not support file attachments, and spam protection is limited, so add reCAPTCHA or a server-side honeypot and consider your own backend that calls the REST API (or an Experience Cloud site or Apex REST on a Site) for richer validation, attachments and no per-day constraints. Security: anonymous submissions mean no authentication; do not accept sensitive data. The "case origin" and default priority can be hidden fields. Custom fields use their field IDs as input names.

**Code / config example:**
```html
<form action="https://webto.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8" method="POST">
  <input type="hidden" name="orgid" value="00D000000000000">
  <input type="hidden" name="retURL" value="https://example.com/thanks">
  <input type="hidden" name="origin" value="Web">
  <label>Name</label><input name="name" required>
  <label>Email</label><input name="email" type="email" required>
  <label>Subject</label><input name="subject" required>
  <label>Description</label><textarea name="description"></textarea>
  <input type="submit" value="Submit">
</form>
```

**Hidden gotchas & must-remember points:**
- Web-to-Lead creates leads; Web-to-Case creates cases; do not mix them up.
- The form has no built-in spam protection by default.
- The Case Description field can hold long text (32,000 characters), but the Subject is limited.
- Rich field types such as picklists must use valid values or the submission can fail silently or save blanks.
- Attachments are not supported by the standard form.
- Cases created this way use the assignment rule and auto-response rule that are active.

**Best practice:** Put a protected endpoint or Experience Cloud form in front of production sites, and monitor the daily volume.

---
Source: ForceChallenges · last updated 2026-11-02
