# Reference

# Names matching

First, all names in all incoming documents (as well as PNR data coming from the DCS) are always translated to the MRZ format, compatible with the ICAO 9303 standard, allowing only A-Z letters and spaces in names fields. Please, refer to the name translation steps specification.

MRZ forms are then compared directly — if no direct match, Zamna Client will try to apply configured overrides (eg typos, missing symbols, titles, etc):

Names matching logic

The following overrides are available via the Zamna Client local stack configuration:

Override Target Example Parameters
Ignore missing/extra words
(eg missed middle names)
GIVEN_NAMES "Raoul Fernando Lopez"
-> "Raoul Lopez"
Allowed number of missing words, default 0
Ignore missing/extra characters GIVEN_NAMES, SURNAME "Smith"
-> "Smmith"
- Target,
- Allowed number of missing characters, default 0
Ignore word swaps GIVEN_NAMES, SURNAME "Johnathan Frederick"
-> "Frederick Johnathan"
- Target,
- true/false, default false
Ignore titles
(eg Mr, Dr, etc)
GIVEN_NAMES, SURNAME "Mr Smith"
-> "Smith"
- Target,
- true/false, default false
Allow aliases GIVEN_NAMES "Johnathan"
-> "John"
true/false, default false
Allow initials GIVEN_NAMES "Johnathan Smith"
-> "J Smith"
true/false, default false

# MRZ name

# Overview

All names in all incoming documents (as well as PNR data coming from the DCS) are translated to the MRZ format, compatible with the ICAO 9303 standard, allowing only A-Z letters and spaces in names fields.

# Translation steps

  1. to uppercase

  2. trim (remove spaces at the start and the end)

  3. normalize dashes (convert all to ASCII minus):

    '\u002d', // Hyphen Minus(ASCII)
    '\u2010', // Hyphen
    '\u2011', // Non-Breaking Hyphen
    '\u2012', // Figure Dash
    '\u2013', // En Dash
    '\u2014', // Em Dash
    '\u2015', // Horizontal Bar
    '\u2212', // Minus Sign
    '\u2e3a', // Two Em Dash
    '\u2e3b', // Three Em Dash
    '\uFE58', // Small Em Dash
    '\ufe63', // Small Hyphen Minus
    '\uff0d', // Fullwidth Hyphen Minus)
    
  4. transliterate

    'Á' to "A",
    'À' to "A",
    'Â' to "A",
    'Ä' to "AE",
    'Ã' to "A",
    'Ă' to "A",
    'Å' to "AA",
    'Ā' to "A",
    'Ą' to "A",
    'Ć' to "C",
    'Ĉ' to "C",
    'Č' to "C",
    'Ċ' to "C",
    'Ç' to "C",
    'Đ' to "D",
    'Ď' to "D",
    'Ð' to "D",
    'É' to "E",
    'È' to "E",
    'Ê' to "E",
    'Ë' to "E",
    'Ě' to "E",
    'Ė' to "E",
    'Ē' to "E",
    'Ę' to "E",
    'Ĕ' to "E",
    'Ĝ' to "G",
    'Ğ' to "G",
    'Ġ' to "G",
    'Ģ' to "G",
    'Ħ' to "H",
    'Ĥ' to "H",
    'Í' to "I",
    'Ì' to "I",
    'Î' to "I",
    'Ï' to "I",
    'Ĩ' to "I",
    'İ' to "I",
    'Ī' to "I",
    'Į' to "I",
    'Ĭ' to "I",
    'Ĵ' to "J",
    'Ķ' to "K",
    'Ł' to "L",
    'Ĺ' to "L",
    'Ľ' to "L",
    'Ļ' to "L",
    'Ŀ' to "L",
    'Ń' to "N",
    'Ñ' to "N",
    'Ň' to "N",
    'Ņ' to "N",
    'Ŋ' to "N",
    'Ø' to "OE",
    'Ó' to "O",
    'Ò' to "O",
    'Ô' to "O",
    'Ö' to "OE",
    'Õ' to "O",
    'Ő' to "O",
    'Ō' to "O",
    'Ŏ' to "O",
    'Ŕ' to "R",
    'Ř' to "R",
    'Ŗ' to "R",
    'Ś' to "S",
    'Ŝ' to "S",
    'Š' to "S",
    'Ş' to "S",
    'Ŧ' to "T",
    'Ť' to "T",
    'Ţ' to "T",
    'Ú' to "U",
    'Ù' to "U",
    'Û' to "U",
    'Ü' to "UE",
    'Ũ' to "U",
    'Ŭ' to "U",
    'Ű' to "U",
    'Ů' to "U",
    'Ų' to "U",
    'Ŵ' to "W",
    'Ý' to "Y",
    'Ŷ' to "Y",
    'Ÿ' to "Y",
    'Ź' to "Z",
    'Ž' to "Z",
    'Ż' to "Z",
    'Þ' to "TH",
    'Æ' to "AE",
    'IJ' to "IJ",
    'Œ' to "OE",
    'ẞ' to "SS",
    
  5. replace '-' with a space symbol

  6. remove all double spaces

  7. remove everything except A-Z and spaces

# Platform stats

# Overview

Zamna Client stack collects operational stats in the local PostgreSQL database, deployed with an Airline.

Each entry is marked with external identifiers (booking_id / session_id), thus stats database can be used as a data source for any modern BI tools and platforms.

High-level schema and relations:

Relations prersented are virtual

No actual keys or constraints are implemented — database serves only as stats collector

High-level overview of stats database

# Platform/Orchestration

# Orchestration / PNR-level stats

paxcheck_stats.created_multipax_session_stats

Stats are registered upon session creation.

Column Type Comment
multipax_session_id varchar Platform session id
ext_id varchar External id (eg booking id)
created_at timestamp w/o time zone
departure_date_time_utc timestamp w/o time zone
departure_date_time_local timestamp w/o time zone
arrival_date_time_utc timestamp w/o time zone
arrival_date_time_local timestamp w/p time zone
route_from_airport varchar Departure airport IATA code
route_from_country varchar 3-letter codes from ISO 3166-1 (opens new window)
route_to_airport varchar Arrival airport IATA code
route_to_country varchar 3-letter codes from ISO 3166-1 (opens new window)
pax_number_all integer Total number of passenger in session

paxcheck_stats.finalised_multipax_session_stats

Stats are registered upon session finalisation.

Column Type Comment
multipax_session_id varchar Platform session id
ext_id varchar External id (eg booking id)
created_at timestamp w/o time zone
departure_date_time_utc timestamp w/o time zone
departure_date_time_local timestamp w/o time zone
arrival_date_time_utc timestamp w/o time zone
arrival_date_time_local timestamp w/p time zone
route_from_airport varchar Departure airport IATA code
route_from_country varchar 3-letter codes from ISO 3166-1 (opens new window)
route_to_airport varchar Arrival airport IATA code
route_to_country varchar 3-letter codes from ISO 3166-1 (opens new window)
pax_number_all integer Total number of passenger in session
pax_number_cleared_in_dcs integer Total number of passengers cleared in DCS

# Orchestration / Passenger-level stats

paxcheck_stats.created_pax_session_stats

Each PNR-level session have at least 1 passenger-level session stats.

Stats are registered upon session creation.

Column Type Comment
multipax_session_id varchar Platform session id
pax_session_id varchar Passenger session id
dcs_pax_id varchar External passenger id within the booking
checklist_id varchar Checklist id
created_at timestamp w/o time zone
was_passport_available_in_dcs boolean Whether passport data was already presented in DCS

paxcheck_stats.finalised_pax_session_stats

Each PNR-level session have at least 1 passenger-level session stats.

Stats are registered upon session finalisation.

Column Type Comment
multipax_session_id varchar Platform session id
pax_session_id varchar Passenger session id
dcs_pax_id varchar External passenger id within the booking
checklist_id varchar Checklist id
created_at timestamp w/o time zone
consent_state varchat UNKNOWN / YES / NO
is_passport_saved_to_dcs boolean Whether passport is added to DCS
is_visa_saved_to_dcs boolean Whether visa is added to DCS
is_passport_verified boolean Whether passport is verrified
is_checklist_ready_to_fly boolean Whether the passenger is Ready To Fly
is_cleared_in_dcs boolean Whether the passengerr is cleared in DCS
was_passport_available_in_dcs boolean Whether passport data was already presented in DCS

# Orchestration / Id (names) mismatches

paxcheck_stats.id_mismatches

Column Type Comment
pax_session_id varchar Passenger session id
checklist_id varchar Checklist id
doc_type varchar PASSPORT, USA_BORDER_CROSSING_CARD, USA_EMBASSY_VISA, USA_ETA, USA_GREEN_CARD, MEX_INE_CARD, MEX_DNR_TAX, IND_OCI_CARD, IND_EMBASSY_VISA, IND_EVISA, COVID19_TEST, COVID19_VACCINE, UNKNOWN
created_at timestamp w/o time zone
number boolean true if mismatch, null otherwise
given_name boolean true if mismatch, null otherwise
surname boolean true if mismatch, null otherwise
birthdate boolean true if mismatch, null otherwise
sex boolean true if mismatch, null otherwise
expiry_date boolean true if mismatch, null otherwise
country_code boolean true if mismatch, null otherwise
nationality boolean true if mismatch, null otherwise

# Checklists

# Checklists / Generation stats

checklist_stats.checklist_created_stats

Stats are registered upon checklist generation.

Column Type Comment
session_id varchar Platform session id
checklist_id varchar Checklist id
created_at timestamp w/o time zone
departure_date_time_utc timestamp w/o time zone
departure_date_time_local timestamp w/o time zone
route_from_airport varchar Departure airport IATA code
route_from_country varchar 3-letter codes from ISO 3166-1 (opens new window)
route_to_airport varchar Arrival airport IATA code
route_to_country varchar 3-letter codes from ISO 3166-1 (opens new window)
traveller_age integer Passenger age

# Checklists / Finalised stats

checklist_stats.checklist_stats

Stats are registered upon checklist finalisation (usually, 4 hours post departure time — configurable).

Column Type Comment
session_id varchar Platform session id
checklist_id varchar Checklist id
created_at timestamp w/o time zone
departure_date_time_utc timestamp w/o time zone
departure_date_time_local timestamp w/o time zone
route_from_airport varchar Departure airport IATA code
route_from_country varchar 3-letter codes from ISO 3166-1 (opens new window)
route_to_airport varchar Arrival airport IATA code
route_to_country varchar 3-letter codes from ISO 3166-1 (opens new window)
checklist_resolution_status varchar READY_TO_FLY, ENTRY_NOT_ALLOWED, ACTION_REQUIRED, UNKNOWN
need_answers boolean True if not all required qualifying questions were answered (ie checklist was not formed)

# Checklist items / Finalised stats

checklist_stats.checklist_item_stats

Stats are registered upon checklist finalisation (usually, 4 hours post departure time — configurable).

Column Type Comment
session_id varchar Platform session id
checklist_id varchar Checklist id
item_status varchar NOT_YET_RESOLVED, RESOLVED
item_type varchar PASSPORT, USA_BORDER_CROSSING_CARD, USA_EMBASSY_VISA, USA_ETA, USA_GREEN_CARD, MEX_INE_CARD, MEX_DNR_TAX, IND_OCI_CARD, IND_EMBASSY_VISA, IND_EVISA, COVID19_VACCINE, UNKNOWN
item_is_info boolean Whether an item is an information-only item (not actionable)
item_had_rules_mismatch boolean deprecated

# Signals

# Signals / Generation stats

add_signals.add_document_signal_stats

Stats are registered upon each signal generation.

Column Type Comment
id uuid
session_id varchar Platform session id
created_at timestamp w/o time zone
document_type varchar INTERNATIONAL_PASSPORT, CAN_NEXUS_CARD, can_permanent_resident_card, usa_green_card, usa_embassy_visa, usa_border_crossing_card, ind_oci_card, ind_embassy_visa
country_code varchar 3-letter codes from ISO 3166-1 (opens new window)

# Signals / Check stats

decision_stats.check_decisions

Stats are registered upon each signals check query.

Column Type Comment
id uuid
session_id varchar Platform session id
created_at timestamp w/o time zone
document_type varchar INTERNATIONAL_PASSPORT, CAN_NEXUS_CARD, can_permanent_resident_card, usa_green_card, usa_embassy_visa, usa_border_crossing_card, ind_oci_card, ind_embassy_visa
decision_type varchar MATCH, MISTAKE, UNKNOWN
check_error_fields varchar Mismatched fields, separated by commas
document_country varchar 3-letter codes from ISO 3166-1 (opens new window)

# Signals / Get stats

get_signals.get_document_signal_stats

Stats are registered upon each signals get query.

Column Type Comment
session_id varchar Platform session id
created_at timestamp w/o time zone
attachment_type varchar authenticity_verification, issuance, attached_vaccination, attached_usa_green_card, attached_can_permanent_resident_card, attached_usa_border_crossing_card, attached_usa_embassy_visa
count_returned integer Number of documents matched

# Doc processing

# Doc processing / Stats

docprocessing_stats.processing_stats

Stats are registered upon each processing result.

Column Type Comment
session_id varchar Platform session id
processing_id varchar Doc processing id
created_at timestamp w/o time zone
document_type varchar Passport, USAEmbassyVisa, USAGreenCard, USABorderCrossingCard, INDOciCard, INDEmbassyVisa, DCCNHS, DCCEU
backend varchar Regula, PDF
status varchar RECOGNITION_SUCCESSFUL, RECOGNITION_FAILED, VALIDATION_FAILED
processing_time_ms bigint Overall processing time in milliseconds
issues_count integer Number of issues found
has_doc_type_issue boolean Whether doc type was not recognised or a wrong one
has_field_issue boolean Whether any specific fields were not recognised
has_mrz_checksum_issue boolean Whether MRZ checksum failed

# Doc processing / Processing issues stats

docprocessing_stats.processing_issues

Stats are registered upon each processing result if there were any issues.

Column Type Comment
session_id varchar Platform session id
processing_id varchar Doc processing id
error_code varchar DOCUMENT_TYPE_UNRECOGNISED, FIELD_UNRECOGNISED, MRZ_CHECKSUM_FAILED, QR_MISSING, QR_MALFORMED, QR_MISMATCHED_TO_FILE, QR_VALIDATION_FAILED
error_fields varchar List of the following types, separated by a comma: DATE_OF_BIRTH, ISSUING_COUNTRY, NATIONALITY, DATE_OF_EXPIRY, GIVEN_NAMES, DOCUMENT_NUMBER, SEX, SURNAME, TYPE, NUMBER_OF_ENTRIES, PASSPORT_NUMBER, QR_CODE

# Webview analytics

Webview registers events and submits them to the abstract Events Layer, from which the relevant adapters are firing them to respective Analytics platforms (eg Google/Adobe Analytics).

# Parameters sent with each event

# page_path

Event page Path Comment
Booking not found /session/not-found
Error /session/error
Consent page /session/consent
Multipax / Consent / Customise /session/consent/customize Multipax sessions only
Multipax / Select passenger /session/select-passenger Multipax sessions only
Questions /session/questions
Checklist /session/checklist
Item page /session/item/{item_type}
Item page / Scan /session/item/{item_type}/scan
Item page / Apply process /session/item/{item_type}/apply

# content_group

Alias to page_path

# page_location

Full page URL with identifiers removed

# page_title

Page title where event has happened

# language

Page language

# client_id

pax_session_id - can be linked with the backend platform stats (paxcheck.pax_stats.pax_session_id)

# Events & parameters

# Application loaded

Event name: app_loaded

Parameter Type Description
app_loading_duration integer Duration of app initialisation (seconds)

# Application error

Event name: app_error

# Page view

Event name: page_view

Session-level parameters (every page)

Parameter Type Description
all_pax_count integer Number of passengers in session/booking
ready_to_fly_pax_count integer Number of Ready To Fly passengers
all_pax_ready_to_fly integer 0 / 1 - are all the passengers Ready To Fly?
days_to_departure integer Number of days until departure
hours_to_departure integer Number of hours until departure (if less then 1 day until)

Passenger-level parameters (page level >= passenger)

Parameter Type Description
pax_type string infant / child / adult
pax_status string ready-to-fly / entry-not-allowed / action-required / unknown (checklist on hold)
pax_consent_state integer 0 / 1
pax_questions_answered string none / some / all
unresolved_items_number integer Number of unresolved items in the checklist (only if all questions were answered)
has_issues_items_number integer Number of items with issues in the checklist (only if all questions were answered)
resolved_items_number integer Number of resolved items in the checklist (only if all questions were answered)
info_items_number integer Number of info items in the checklist (only if all questions were answered)

Item-level parameters (page level >= item)

Parameter Type Description
item_type string Type of item (eg passport, usa-green-card, etc)
item_status string not-yet-available / not-yet-resolved / has-issues / resolved
upload_error_shown integer 0 / 1 - upload error shown?
id_match_error_shown integer 0 / 1 - id match error shown?

Event name: consent_submitted

Parameter Type Description
all_consented integer 0 / 1 - all passengers consented?
some_consented integer 0 / 1 - some passengers consented?

Event name: consent_revoked

# Questions / Presented

Event name: questions_presented

Parameter Type Description
questions_number integer Number of questions presented

# Questions / Answered

Event name: questions_answered

Parameter Type Description
questions_number integer Number of questions answered

# Item / Manual input picked

Event name: manual_selected

Parameter Type Description
item_type string Type of item (eg passport, usa-green-card, etc)

# Item / Manual input / Form touched

Event name: form_touched

Parameter Type Description
item_type string Type of item (eg passport, usa-green-card, etc)
field string Field name

# Item / Manual input / Mismatch found

Event name: form_mismatch

Parameter Type Description
item_type string Type of item (eg passport, nexus-card, etc)
mismatch_fields_number integer Number of fields mismatched

# Item / Scanner picked

Event name: scanner_selected

Parameter Type Description
item_type string Type of item (eg passport, usa-green-card, etc)

# Item / Scanner / Closed

Event name: scanner_closed

Parameter Type Description
scanner_work_duration integer Duration of the scanner been active (with no result) in seconds

# Item / File upload picked

Event name: upload_selected

Parameter Type Description
item_type string Type of item (eg passport, usa-green-card, etc)

# Item / File upload / File selected

Event name: upload_file_selected

Parameter Type Description
item_type string Type of item (eg passport, usa-green-card, etc)
``

# Item / Apply started

Event name: apply_started

Parameter Type Description
item_type string Type of item (eg passport, usa-green-card, etc)
is_scan integer 0 / 1
is_upload integer 0 / 1
is_manual integer 0 / 1
image_size integer (for scans and file uploads) Size of the file uploaded in bytes

# Item / Apply failed

Event name: apply_failed

Parameter Type Description
item_type string Type of item (eg passport, usa-green-card, etc)
failed_to_process integer 0 / 1 - upload/recognition failed
id_mismatch_error integer 0 / 1 - id mismatch
rules_mismatch_error integer 0 / 1 - rules mismatch
is_scan integer 0 / 1
is_upload integer 0 / 1
is_manual integer 0 / 1

# Item / Apply success

Event name: apply_success

Parameter Type Description
item_type string Type of item (eg passport, usa-green-card, etc)
is_scan integer 0 / 1
is_upload integer 0 / 1
is_manual integer 0 / 1

# Passenger became Ready To Fly

Event name: pax_ready_to_fly

# Passenger became unresolved

Event name: pax_became_unresolved

# All passengers became Ready To Fly

Event name: all_paxes_ready_to_fly