Quiltt Logo

Reconnect

Connections can sometimes enter into an error state that prevents new data from being synced. While some errors are intermittent in nature due to upstream connectivity issues with the institution, Connections can also break due to a simple password change or security upgrade at the bank. When this occurs:

  1. The Connection status will change to ERROR_REPAIRABLE.
  2. Regular syncing will be interrupted and no new data will be synced, including associated accounts and transactions, until the Connection is repaired.
  3. To restore syncing, the user will need to complete the Reconnect Flow by re-authenticating with their financial institution.

Link to this section#Implementing Reconnect

To allow your user to repair the Connection, configure your Connector for the Reconnect flow by passing in the affected Connection ID.

Upon launching the Connector, your user will be automatically prompted to re-authenticate to their institution using the upstream provider (i.e. Plaid or MX). Once they have successfully re-authenticated, the Connection will resume syncing. You can track the Connection status via, webhooks, GraphQL subscription or via polling.

Link to this section#HTML

<button quiltt-button="<CONNECTOR_ID>" quiltt-connection="<CONNECTION_ID>">Reconnect</button>

Link to this section#React

import { QuilttButton } from '@quiltt/react'

export const App = () => {
  const handleSuccess = (metadata) => {
    console.log('Successfully reconnected: ', metadata.connectionId)
    // Refetch data or redirect user...
    // Send your user a notification...
  }

  return (
    <QuilttButton
      connectorId="<CONNECTOR_ID>"
      connectionId="<CONNECTION_ID>"
      onExitSuccess={handleSuccess}
    >
      Reconnect
    </QuilttButton>
  )
}

Link to this section#Connector Events

When the user successfully completes the flow, the Connector exited.successful event will fire. You can attach a callback with the JavaScript API or use the onExitSuccess prop on the React component. See the JavaScript API guide for more information about the event.

Link to this section#Server-side Webhooks

To be notified when a Connection needs to be repaired, you can subscribe to the connection.synced.errored.repairable event via Webhooks.

When the Connection has successfully synced again, the connection.synced.successful will fire, and the Connection status will change to SYNCED.

Link to this section#How to Simulate a Connection Error

To test the flow, you can place Sandbox Connections into a user-repairable state using the connectionSimulateError GraphQL mutation.

You can call the mutation in the GraphQL Explorer from the Quiltt Dashboard, or by calling the Profile GraphQL API.

Link to this section#Request

mutation SimulateError {
  connectionSimulateError(input: { id: "conn_14TJiFDKRJlPiBHuukUIlXZ" }) {
    success
    record {
      id
      status
    }
  }
}

Link to this section#Response

{
  "data": {
    "success": true,
    "record": {
      "id": "conn_14TJiFDKRJlPiBHuukUIlXZ",
      "status": "ERROR_REPAIRABLE"
    }
  }
}