Callback Functions
The following Callback functions are made for the desktop. For mobile integration, please refer to Mobile App Integration.
For desktop integrations, we have defined several optional callback functions (e.g. onSuccess, onError, onExit) that expect data objects as defined below.
Please add the following callbacks to your configuration.
onSuccess: function(data){
// (optional) a callback is called when the action was made successfully
},
onError: function(data){
// (optional) a callback is called when a user encountered an API error
},
onExit: function(data){
// (optional) a callback is called when a user exits Chatbot
},
onSuccess callback
The onSuccess callback function is called when a user has successfully linked an account. It should expect an object that provides the following information:
Parameter | Description | Supported Project |
---|---|---|
userId | ID of the user | Bank Logins, Interchange, Card Management |
step_name | This indicates the point at which the user successfully made an action | Bank Logins, Interchange, Card Management |
type | Type of this event, which is success | Bank Logins, Interchange, Card Management |
institution_name | The full institution name (e.g. "Bank of America") | Bank Logins |
linkedNode | A list of nodes_id strings | Bank Logins, Interchange |
unlinkedNode | A list of nodes_id strings | Interchange |
card | Card information(status) if it was modified | Card Management |
onError callback
The onError callback function is called when a user encounters an API error. It should expect an object that provides the following information:
Parameter | Description | Supported Project |
---|---|---|
userId | ID of the user | Bank Logins, Interchange, Card Management |
error_code | The http_code of error that the user encountered, see Common Errors | Bank Logins, Interchange, Card Management |
http_code | The http code of error that the user encountered, see Common Errors | Bank Logins, Interchange, Card Management |
error_message | The error message that the user encountered | Bank Logins, Interchange, Card Management |
time | The timestamp when the error happened | Bank Logins, Interchange, Card Management |
step_name | This indicates the point at which the user encountered an error | Bank Logins, Interchange, Card Management |
type | Type of this event, which is error | Bank Logins, Interchange, Card Management |
institution_name | The full institution name (e.g. "Bank of America") | Bank Logins |
onExit callback
The onExit callback function is called when a user exits Chatbot. It should expect an object that provides the following information:
Parameter | Description | Supported Project |
---|---|---|
userId | ID of the user | Bank Logins, Interchange, Card Management |
step_name | This indicates the point at which the user exited the Chabot | Bank Logins, Interchange, Card Management |
type | Type of this event, which is exit | Bank Logins, Interchange, Card Management |
institution_name | The full institution name (e.g. "Bank of America") | Bank Logins |
{
"userId": String,
"institution_name": String,
"linkedNode":[
node_id: String,
node_id: String,
],
"unlinkedNode":[
node_id: String,
node_id: String,
],
"step_name": String,
"type": String,
"card": String
}
{
"userId": String,
"institution_name": String,
"error_code": String,
"http_code": String,
"error_message":String,
"time":String,
"step_name": String,
"type": String
}
{
"userId": String,
"institution_name": String,
"step_name": String,
"type": String
}
Updated about 4 years ago