Screening Pre-fill
Pre-fill the screening form with known applicant data so users don't have to re-enter information your application already has. Pass a prefill object inside screening in the mount() options when using the screening view.
Basic Usage
const sdk = Intellirent.init({
publishableKey: "pk_live_xxx",
userContext: { userId: "consumer_xyz", userType: "CONSUMER" },
});
await sdk.mount("#container", {
view: "screening",
screening: {
prefill: {
firstName: "John",
middleName: "Michael",
lastName: "Doe",
email: "john.doe@example.com",
phone: "(555) 123-4567",
phoneType: "mobile",
dateOfBirth: "1990-01-15",
currentStreet: "123 Main St",
currentStreet2: "Apt 4B",
currentCity: "San Francisco",
currentState: "CA",
currentZip: "94102",
},
},
});
All fields are optional — pass only the ones you have. Fields that are not provided will remain empty for the user to fill in manually.
Available Fields
Personal Information
| Field | Type | Format | Notes |
|---|---|---|---|
firstName | string | — | First name |
middleName | string | — | Middle name (ignored if noMiddleName is true) |
noMiddleName | boolean | — | Set to true if the person has no middle name |
lastName | string | — | Last name |
email | string | — | Email address |
phone | string | (XXX) XXX-XXXX | Phone number — raw digits also accepted. Must be exactly 10 digits with no country code, and the area code (first digit) cannot be 1 |
phoneType | 'home' | 'mobile' | 'work' | — | 'mobile', 'home', or 'work' |
dateOfBirth | string | YYYY-MM-DD | Date of birth — must be 18–120 years old |
ssn | string | XXX-XX-XXXX | Social Security Number — raw digits also accepted |
Current Address
| Field | Type | Format | Notes |
|---|---|---|---|
currentStreet | string | — | Street address |
currentStreet2 | string | — | Apt, Suite, Unit, etc. |
currentCity | string | — | City |
currentState | string | 2-letter code | US state code (e.g., 'CA', 'NY') |
currentZip | string | XXXXX or XXXXX-XXXX | ZIP code — the 9-digit (ZIP+4) form requires a hyphen; 9 raw digits without one will fail validation |
Previous Address
| Field | Type | Format | Notes |
|---|---|---|---|
previousStreet | string | — | Street address |
previousStreet2 | string | — | Apt, Suite, Unit, etc. |
previousCity | string | — | City |
previousState | string | 2-letter code | US state code |
previousZip | string | XXXXX or XXXXX-XXXX | ZIP code — same format rule as currentZip |
What Cannot Be Pre-filled
The following are not accepted as prefill fields. Any unrecognized field names passed in prefill will be silently stripped and trigger an onWarning callback.
- Business fields (
companyName,noLegalEntity) — END_USER-only, not part of the CONSUMER flow - Consent fields (
termsAccepted,fcraConsentAccepted,consentAccepted, etc.) — FCRA compliance requires explicit user action - Signature fields (
signatureTyped,signatureDrawn) — requires explicit user action - User type (
userType) — controlled viaUserContext.userTypeinSdkConfig, not prefill - Any unknown field names — only the fields listed above are accepted
Handling Warnings
If any prefill fields are invalid (wrong name, wrong type, or not allowed), the SDK emits a warning via the onWarning callback. The valid fields are still applied — only the invalid ones are dropped.
await sdk.mount("#container", {
view: "screening",
screening: {
prefill: {
firstName: "Alex",
lastName: "Johnson",
companyName: "Acme Corp", // will be stripped (not a CONSUMER field)
termsAccepted: true, // will be stripped (consent field)
favoriteColor: "blue", // will be stripped (unknown field)
},
},
onWarning: (warning) => {
// warning.code === 'INVALID_PREFILL_FIELDS'
// warning.invalidFields === ['companyName', 'termsAccepted', 'favoriteColor']
console.warn(warning.message);
},
});
The onWarning callback receives:
| Property | Type | Description |
|---|---|---|
code | string | Warning code (e.g., 'INVALID_PREFILL_FIELDS') |
message | string | Human-readable description of what was stripped |
invalidFields | string[] | Field names that were rejected |
Example: Full Pre-fill
await sdk.mount("#container", {
view: "screening",
screening: {
prefill: {
firstName: "Alex",
middleName: "Ray",
lastName: "Johnson",
email: "alex@gmail.com",
phone: "(555) 987-6543",
phoneType: "mobile",
dateOfBirth: "1992-03-14",
ssn: "123-45-6789",
currentStreet: "456 Oak Ave",
currentStreet2: "Unit 2",
currentCity: "Austin",
currentState: "TX",
currentZip: "73301",
previousStreet: "789 Pine St",
previousCity: "Dallas",
previousState: "TX",
previousZip: "75201",
},
},
});
Notes
- Pre-filled values appear in the form fields when the screening form loads. Users can review and edit them before submitting.
- The
screening.prefilloption only applies toview: 'screening'. It has no effect on'reports'or'report'views. - Validation still runs on all fields at submission time, regardless of whether they were pre-filled or entered manually. This includes format checks on
phone,dateOfBirth,currentZip, andpreviousZip— a pre-filled value that fails these checks does not triggeronWarning; it simply leaves that step showing as incomplete until the user corrects it. - Previous-address fields are all-or-nothing: the form accepts either all four of
previousStreet/previousCity/previousState/previousZipfilled in, or none of them. Pre-filling only some of the group (e.g.previousStreetalone) leaves the step showing as incomplete until the user fills in the rest or clears them manually — same as a format failure, this does not triggeronWarning. - Values are sanitized at the trust boundary (postMessage receiver). Only allowlisted field names with correct types pass through. Field name/type allowlisting and format validation are separate checks — a field with a valid name and type but an invalid format is passed through and only caught at the format-validation step above.
Next Steps
- Getting Started — Installation and setup
- Lifecycle Events — Track mount/unmount operations