Bridge Events

onEvent types

Event TypeEvent PayloadDescription
LOADNoneWhen Bridge module has finished loading
OPENCommonEventDataWhen Bridge is open and ready to use
SCREEN_VIEWScreenViewDataWhen a screen of the Bridge was viewed
EMPLOYER_SELECTEDEmployerSelectedDataWhen employer was selected in the Bridge
DOC_UPLOAD_OPENEDCommonEventDataWhen Document Upload was opened
DOCUMENTS_UPLOADEDDocumentsUploadedDataWhen documents of certain type were uploaded
LINK_CREATEDTaskDataWhen a user attempts to log in to their payroll provider
LOGIN_COMPLETEDTaskDataWhen a user successfully logs in to their payroll provider
SUCCESSTaskDataWhen a user's data successfully retrieved from their payroll provider
ERRORErrorDataWhen an error occurred during the payroll provider connection process
UNSUPPORTED_BROWSERNoneWhen Bridge module does not support the user's browser
CLOSECloseDataWhen Bridge closes

CommonEventData

NameTypeDescription
bridge_tokenstringThe bridge_token value passed to TruvBridge.init.
product_typestringA type of the product. Can be undefined if bridge_token is expired.
{
    "bridge_token": "b5cb1933e43043a792a9b337af5824e2",
    "product_type": "income",
}

ScreenViewData

NameTypeDescription
view_namestringA name of the Bridge screen viewed. Possible values: SELECT_EMPLOYER, PROVIDER_LIST, PROVIDER_LOGIN, PROVIDER_ORG_ID, ERROR, SUCCESS, DOC_UPLOAD, DOC_UPLOAD_TYPES
bridge_tokenstringThe bridge_token value passed to TruvBridge.init.
product_typestringA type of the product.
doc_typestringOnly applicable for DOC_UPLOAD view name. A type of documents to upload. Can be paystub, w2 or f1099
{
  	"view_name": "PROVIDER_LOGIN",
    "bridge_token": "b5cb1933e43043a792a9b337af5824e2",
    "product_type": "income"
}

EmployerSelectedData

NameTypeDescription
bridge_tokenstringThe bridge_token value passed to TruvBridge.init.
product_typestringA type of the product.
employerobjectAn object with employer data. Contains employer's name.
{
    "bridge_token": "b5cb1933e43043a792a9b337af5824e2",
    "product_type": "income",
    "employer": {
        "name": "Facebook Demo"
    }
}

DocumentsUploadedData

NameTypeDescription
bridge_tokenstringThe bridge_token value passed to TruvBridge.init.
product_typestringA type of the product.
doc_typestringA type of documents uploaded. Can be paystub, w2 or f1099
{
    "bridge_token": "b5cb1933e43043a792a9b337af5824e2",
    "product_type": "income",
    "doc_type": "paystub"
}

TaskData

NameTypeDescription
public_tokenstringA public_token that can be exchanged for an access_token.
task_idstringA unique identifier associated with an attempt to use a Link to retrieve payroll data. Include this identifier when opening a support ticket for faster turnaround.
bridge_tokenstringThe bridge_token value passed to TruvBridge.init.
product_typestringA type of the product.
employerobjectAn object with employer data. Contains employer's name. Can be undefined for the admin product type.
provider_idstringA unique identifier associated with the selected provider.
{
    "public_token": "d80ec8255dc54c5eb7cc03ac05d18ebd",
    "task_id": "2b0e7a7dec1d47678fec4e02af621cc0",
    "bridge_token": "b5cb1933e43043a792a9b337af5824e2",
    "product_type": "income",
    "provider_id": "adp",
    "employer": {
      "name": "Facebook Demo"
    }
}

ErrorData

NameTypeDescription
errorErrorSee Errors section for the reference
public_tokenstringThe public_token associated to this connection attempt. This field will only be available if the error returned is associated to a public_token.
task_idstringA unique identifier associated with an attempt to use a Link to retrieve payroll data. Include this identifier when opening a support ticket for faster turnaround.
bridge_tokenstringThe bridge_token value passed to TruvBridge.init.
product_typestringA type of the product.
{
    "error": {
        "error_code": "LOGIN_ERROR",
        "error_message": "Username or password is incorrect",
        "error_type": "LINK_ERROR"
    },
    "public_token": "d80ec8255dc54c5eb7cc03ac05d18ebd",
    "task_id": "5ad1938450c54024bbc967a3a7dc9020",
    "bridge_token": "b5cb1933e43043a792a9b337af5824e2",
    "product_type": "income"
}

CloseData

NameTypeDescription
employerobjectAn object with employer data. Contains employer's name. Can be undefined if no employer was selected.
{
   "employer": {
        "name": "Facebook Demo"
    }
}