Intermittent disconnections of the Xero or MYOB accounts

To exchange data between the QBO, Xero and MYOB APIs, an initial OAuth authorization is required to be performed by the user. This grants the Maestrano platform access to the customer's accounting data.

In order to be maintained, the OAuth authorization requires an access token to be refreshed periodically by issuing a token renewal request to the external API. OAuth tokens renewals is managed by MNOHub for these three applications. If for some reasons the response containing the new token does not return, the OAuth authorization cannot be maintained and the account will be disconnected. Here are some tips to face disconnections with serenity:




1 - Alerts to configure in your log monitoring tool

To know that an accounting package has been disconnected, you can configure an alert based on the wording "Mnohub Alert". You will receive an alert giving you the group_id and the channel_id impacted by the disconnection as well as the error sent by the accounting package - a first step for your investigation. To set up an alert:

Sumologic

https://help.sumologic.com/Dashboards_and_Alerts/Alerts/Receive_Email_Alerts_from_Scheduled_Searches

Splunk

http://docs.splunk.com/Documentation/Splunk/6.5.1/Alert/Aboutalerts

2 - Error Received by the accounting package

To know more about the reason why your account has been disconnected, the query "Mnohub Alert" will give you the error sent by the accounting package. Depending on the error received, you can contact Maestrano Support or the app's support.

Xero

API errors sent: https://developer.xero.com/documentation/api/http-response-codes/

API status: https://status.developer.xero.com/

Contact support: https://developer.xero.com/contact-xero-developer-platform-support/

Quickbooks

API errors sent: https://developer.intuit.com/docs/0100_quickbooks_online/0200_dev_guides/accounting/error_handling

API status: http://status.developer.intuit.com/

Contact support: https://help.developer.intuit.com/s/contactsupport

MYOB

API errors sent - Essentials: http://developer.myob.com/api/essentials-accounting/api-overview/response-codes/

API errors sent - Accounts Rights: http://developer.myob.com/api/accountright/api-overview/error-codes/

API status: http://status.myob.com/

Contact support: http://developer.myob.com/contact/


3 - Connecting the same account to several organisation

If you connect the same account to several organisations on the same or different tenants, the Oauth keys will be renewed for the second organisation linked, and lost for the first one. This will lead to a disconnection. The application will alert you by sending a 401 error. How to detect them?

Example with Xero:

The goal is to see if the same Xero account was linked to 2 different group_id (cld-xxxx) on your platform.

  1. Identify the Xero account real_id (Xero account unique identifier) linked to the group_id received in the alert: use the search `cld-[xxxx] realm_id` in a time range before the alert was sent
  2. Look for the other group_id: use the search `[realm_id] group_id` in a time range just after the alert was sent
  3. Compare the new group_id and the old one - if they are different, the same Xero account was linked to 2 different organisations

4 - Requests timeout

Usually, requests are configured to time out after 30 to 60 seconds by enterprise proxies. If a request sent by the Maestrano platform to an external system does not respond in a timely fashion, it may be cancelled preventing the response to be received by the platform.

It is advised to set the default requests time out to at least 120 seconds.

5 - Contact the user

To be more pro-active than re-active, it's strongly advised to contact your user(s) in case of a disconnection.

  1. Use the channel_id provided in the alert.
  2. Go to active_admin > Customer Management > Organisations and filter on the channel_id received
  3. At the bottom of the page, you have the user's list for this organisation