Skip to main content

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

FieldTypeFormatNotes
firstNamestringFirst name
middleNamestringMiddle name (ignored if noMiddleName is true)
noMiddleNamebooleanSet to true if the person has no middle name
lastNamestringLast name
emailstringEmail address
phonestring(XXX) XXX-XXXXPhone 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'
dateOfBirthstringYYYY-MM-DDDate of birth — must be 18–120 years old
ssnstringXXX-XX-XXXXSocial Security Number — raw digits also accepted

Current Address

FieldTypeFormatNotes
currentStreetstringStreet address
currentStreet2stringApt, Suite, Unit, etc.
currentCitystringCity
currentStatestring2-letter codeUS state code (e.g., 'CA', 'NY')
currentZipstringXXXXX or XXXXX-XXXXZIP code — the 9-digit (ZIP+4) form requires a hyphen; 9 raw digits without one will fail validation

Previous Address

FieldTypeFormatNotes
previousStreetstringStreet address
previousStreet2stringApt, Suite, Unit, etc.
previousCitystringCity
previousStatestring2-letter codeUS state code
previousZipstringXXXXX or XXXXX-XXXXZIP 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 via UserContext.userType in SdkConfig, 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:

PropertyTypeDescription
codestringWarning code (e.g., 'INVALID_PREFILL_FIELDS')
messagestringHuman-readable description of what was stripped
invalidFieldsstring[]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.prefill option only applies to view: '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, and previousZip — a pre-filled value that fails these checks does not trigger onWarning; 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/previousZip filled in, or none of them. Pre-filling only some of the group (e.g. previousStreet alone) 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 trigger onWarning.
  • 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