Bridge Events
onEvent types
Event Type | Event Payload | Description |
---|---|---|
LOAD | None | When Bridge module has finished loading |
OPEN | CommonEventData | When Bridge is open and ready to use |
SCREEN_VIEW | ScreenViewData | When a screen of the Bridge was viewed |
EMPLOYER_SELECTED | EmployerSelectedData | When employer was selected in the Bridge |
DOC_UPLOAD_OPENED | CommonEventData | When Document Upload was opened |
DOCUMENTS_UPLOADED | DocumentsUploadedData | When documents of certain type were uploaded |
LINK_CREATED | TaskData | When a user attempts to log in to their payroll provider |
LOGIN_COMPLETED | TaskData | When a user successfully logs in to their payroll provider |
SUCCESS | TaskData | When a user's data successfully retrieved from their payroll provider |
ERROR | ErrorData | When an error occurred during the payroll provider connection process |
UNSUPPORTED_BROWSER | None | When Bridge module does not support the user's browser |
CLOSE | CloseData | When Bridge closes |
CommonEventData
Name | Type | Description |
---|---|---|
bridge_token | string | The bridge_token value passed to TruvBridge.init. |
product_type | string | A type of the product. Can be undefined if bridge_token is expired. |
{
"bridge_token": "b5cb1933e43043a792a9b337af5824e2",
"product_type": "income",
}
ScreenViewData
Name | Type | Description |
---|---|---|
view_name | string | A 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_token | string | The bridge_token value passed to TruvBridge.init. |
product_type | string | A type of the product. |
doc_type | string | Only 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
Name | Type | Description |
---|---|---|
bridge_token | string | The bridge_token value passed to TruvBridge.init. |
product_type | string | A type of the product. |
employer | object | An object with employer data. Contains employer's name. |
{
"bridge_token": "b5cb1933e43043a792a9b337af5824e2",
"product_type": "income",
"employer": {
"name": "Facebook Demo"
}
}
DocumentsUploadedData
Name | Type | Description |
---|---|---|
bridge_token | string | The bridge_token value passed to TruvBridge.init. |
product_type | string | A type of the product. |
doc_type | string | A type of documents uploaded. Can be paystub , w2 or f1099 |
{
"bridge_token": "b5cb1933e43043a792a9b337af5824e2",
"product_type": "income",
"doc_type": "paystub"
}
TaskData
Name | Type | Description |
---|---|---|
public_token | string | A public_token that can be exchanged for an access_token. |
task_id | string | A 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_token | string | The bridge_token value passed to TruvBridge.init. |
product_type | string | A type of the product. |
employer | object | An object with employer data. Contains employer's name. Can be undefined for the admin product type. |
provider_id | string | A 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
Name | Type | Description |
---|---|---|
error | Error | See Errors section for the reference |
public_token | string | The public_token associated to this connection attempt. This field will only be available if the error returned is associated to a public_token. |
task_id | string | A 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_token | string | The bridge_token value passed to TruvBridge.init. |
product_type | string | A 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
Name | Type | Description |
---|---|---|
employer | object | An object with employer data. Contains employer's name. Can be undefined if no employer was selected. |
{
"employer": {
"name": "Facebook Demo"
}
}
Updated 2 months ago