Listening for events:

form.on("<EVENT_NAME>, (message) => {
  console.log(message);
  // Do next step
});

In the Form module, we have mapped SmartUI legacy events to the new events. Please refer to the following table.

Event NameOneSDK EventsVersioning
INITreadyv3
SCREEN:WELCOMEform:welcome:readyv3
SCREEN:DOCUMENT_TYPE_SELECTform:document_type_select:ready
SCREEN:DRIVERS_LICENCE_INPUTform:drivers_license_input:ready
SCREEN:NATIONAL_IDform:national_id:ready
SCREEN:MEDICARE_INPUTform:medicare_input:ready
SCREEN:PASSPORT_INPUTform:passport_input:ready
SCREEN:NAME_INPUTform:name_input:ready
SCREEN:DOB_INPUTform:dob_input:ready
SCREEN:ADDRESS_INPUTform:address_input:ready
SCREEN:DETAILS_SUMMARYform:details_summary:ready
SCREEN:FAILUREform:failure:ready
SCREEN:SUCCESSform:success:ready
SCREEN:NO_MATCHform:no_match:ready
SCREEN:PENDING_VERIFICATIONform:pending_verification:ready
SCREEN:ERRORform:error:ready
DESTROYdestroyv3
FF_SAVE_RESULTresultsv3
FF_CHECK_RESULTresultsv3
FF_SAVE_ERROR
FF_CHECK_ERROR
errorv3
FF_EXTERNAL_IDV_CHECK_COMPLETEDNot applicable anymore (IDV will be triggered separately)v3

For FF_CHECK_RESULT, the results event will return:

  • checkSummary: object with check results and issues found
  • resultSlug: one of
    • success // final
    • pending-success // final
    • too-many-tries // final
    • no-match // will loop
    • partial-match // will loop
  • nextViewSlug: might be the same values as "resultSlug", but also "external-idv" if widget is configured for it
  • applicant: applicant object with personal information, including the applicant's entity id which can be used with our API calls
  • documents: array with all documents and document checks for this applicant
  • attemptCount: how many times has the user attempted checks on this instance of the widget so far
  • maxAttemptCount: max attempt count configured
  • externalIdv: is external IDV activated per configuration
  • isCheckingAddress: are addresses activated per configuration
  • isCheckingIDs: are documents activated per configuration

This is not a complete API description, but among other properties, Applicant and Document objects carry the following information:

Applicant {
  name: { givernName, middleName, familyName },
  addresses: array of { country, postalCode, state, streetNumber, streetName, town, suburb, unitNumber  }
  dateOfBirth: "yyyy-mm-dd",
  profile: "checkProfile/recipe" string
	...
}
Document {
	idType: string of DOCUMENT_TYPE, as defined in our documentation
  idNumber: string,
  idSubType: optional string,
  data: { extra information specific to this idType }
  ...
}

📘

Note on Biometrics and Smart UI

Our current biometrics offering is asynchronous and can take up to 5 mins, we do recommend the following:

  1. Have a warm offboard when the customer finishes biometrics, use the event FF_EXTERNAL_IDV_CHECK_COMPLETED which indicates that Biometrics has been submitted successfully; however, it does NOT indicate biometrics results are finished.
  2. Wait for notification via your webhook endpoint for the final outcome of this entity including biometrics results (this can take up to 5 mins)
  3. Notify the customer of the next step based on the result...