# TF-08 — Autoresponder Trigger

| | |
|---|---|
| **Feature** | Autoresponder email sent to prospect after form submission |
| **Test Page** | [`test-pages/01-iframe-embed.html`](../test-pages/01-iframe-embed.html) |
| **Live URL** | https://sfae-forms.jjlo.app/test-pages/01-iframe-embed.html |
| **Status** | 🔜 Planned |
| **Last Verified** | — |
| **Prerequisite** | Access to a real SFAE-connected form + test email address |

---

## What We're Testing

After a prospect submits the form, SFAE should:
1. Trigger the configured autoresponder email
2. Include the correct subject line (from `Autoresponder_Subject` param)
3. Show the correct header image (`Autoresponder_header_img`)
4. Include the document download link (`Doc_Download_Url`) if configured
5. Display the body text (`Autoresponder_body_text`) if set

---

## Prerequisites

- [ ] A live SFAE form with an autoresponder configured (e.g. DE | C01-F03)
- [ ] A test email address not currently a prospect in SFAE (or one you can monitor)
- [ ] SFAE access to verify the autoresponder email template and trigger settings

---

## Test Steps

### 1. Pre-flight Checks in SFAE
- [ ] Navigate to `https://dormakaba.lightning.force.com/lightning/page/pardot/form%2Fforms`
- [ ] Find form `DE | C01-F03--de | Generic Contact Form Service`
- [ ] Confirm autoresponder is assigned and active
- [ ] Note the autoresponder template name

### 2. Submit Test Form
- [ ] Open `01-iframe-embed.html`
- [ ] Fill in all required fields with test data
- [ ] Use a monitored test email address
- [ ] Check both consent checkboxes (GDPR + Marketing)
- [ ] Click Submit

### 3. Autoresponder Email
- [ ] Check test inbox within 5 minutes
- [ ] Email arrives from dormakaba sender address
- [ ] Subject line matches the `Autoresponder_Subject` param (or template default if param empty)
- [ ] Header image loads correctly (matches `Autoresponder_header_img` param)
- [ ] Body text present (if `Autoresponder_body_text` was set)
- [ ] Document download link present (if `Doc_Download_Url` was set)
- [ ] No broken images or placeholder text
- [ ] Unsubscribe link is present (CAN-SPAM / GDPR requirement)

### 4. SFAE Record Verification
- [ ] In SFAE, find the test prospect by email
- [ ] Confirm prospect was created/updated
- [ ] `CONS_registration_gdpr_timestamp` field is populated
- [ ] `CONS_page_URL` field shows the test page URL
- [ ] `CONS_IP_adadress` field shows an IP address
- [ ] Campaign member status updated correctly

### 5. Param Variations
Repeat steps 2–4 with:
- [ ] Custom `Autoresponder_Subject` set via dev toolbar
- [ ] Custom `Autoresponder_body_text` set via dev toolbar
- [ ] Different `Doc_Download_Url` and `Doc_Name`

---

## Pass Criteria

Autoresponder email delivered within 5 minutes. All dynamic content (subject, image, body, link) reflects the URL parameters. Prospect record created correctly in SFAE.

## Notes

This test requires an actual form submission to the live Pardot endpoint.
Use a dedicated test prospect email (e.g. `test+sfae-tf08@dormakaba.com`) to avoid polluting the CRM.
Clean up the test prospect record in SFAE after testing.
